🦘 Math Kangaroo Grade All Felix 1-2 Ecolier 3-4 Benjamin 5-6 Kadett 7-8 Junior 9-10 Student 11-12 ⇄ switch contest
2010 Math Kangaroo

Problem 30

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?

Figure for Math Kangaroo 2010 Problem 30
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)
  1. Starting and ending black forces an odd number of stripes, k.
  2. 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.
  3. Total = 21 + 84 + 11 = 116.
Mark: · log in to save