Skip to main content

AMC 12 Mock Exam 3 Problem 16

Problem 16 of 25

A string of letters, each AA or BB, is called odd-blocked if every maximal block of consecutive identical letters has odd length. For example, ABBBAABBBA and BAAAAABBAAAAAB are odd-blocked, but AABABAABAB is not. How many odd-blocked strings of length 1212 are there?

Answer choices

Show solution

Solution

An odd-blocked string is determined by its first letter (22 choices) and the ordered list of its block lengths, which is a composition of 1212 into odd parts (the letters then alternate).

Let cnc_n be the number of compositions of nn into odd parts. If the last part is 11, removing it leaves a composition of n−1n-1; if the last part is at least 33, reducing it by 22 leaves a composition of n−2n-2; both maps are bijections. So cn=cn−1+cn−2c_n=c_{n-1}+c_{n-2} with c1=c2=1c_1=c_2=1, the Fibonacci numbers: c12=144c_{12}=144. The answer is 2⋅144=2882\cdot144=\boxed{288}.

Tagged: recursive counting: strings with odd runs