Problem 30 · 2010 Math Kangaroo
Stretch
Counting & Probability
careful-countingcasework
A barcode as pictured is made up of alternate black and white stripes. The code always starts and ends with a black stripe. Each stripe (black or white) has width 1 or 2, and the total width of the barcode is 12. How many different barcodes of this kind are there if one reads from left to right?

Show answer
Answer: E — 116
Show hints
Hint 1 of 2
An odd number of stripes is needed so it starts and ends black.
Still stuck? Show hint 2 →
Hint 2 of 2
Count compositions of 12 using widths 1 and 2 with an odd number of parts.
Show solution
Approach: count compositions of 12 into 1's and 2's (odd part-count)
- Starting and ending black forces an odd number of stripes, k.
- With k stripes there are 12-k twos: k=7 gives C(7,5)=21, k=9 gives C(9,3)=84, k=11 gives C(11,1)=11.
- Total = 21 + 84 + 11 = 116.
Mark:
· log in to save