AMC 10 Step by Step

2019 AMC 10B Problem 25

P21-25~6 minPrint

How many sequences of 00 s and 11 s of length 1919 are there that begin with a 00 , end with a 00 , contain no two consecutive 00 s, and contain no three consecutive 11 s?

Log in to save your progress.
Show solution without answering

Key insight

After the first 0, the string breaks into pieces 10 and 110. Count how many of each fit into 18 more digits, then choose where the long pieces go.

Solution

The rules say what can sit between two 00s, so cut the string at its 00s.

Step 1: the building blocks.

  1. Two 00s can never be next to each other, so between neighboring 00s there is at least one 11.
  2. There are never three 11s in a row, so between neighboring 00s there are at most two 11s.
  3. The string starts and ends with 00. So after the first 00, it is a chain of blocks, each block being 1010 or 110110. For example, 0 10 110 100\,10\,110\,10 is the string 0101101001011010.

Step 2: how many blocks?

4. Say there are kk blocks, and jj of them are the long block 110110. The short blocks have 22 digits and the long ones 33, so the total length is
1+2k+j=19,soj=18−2k.1 + 2k + j = 19, \quad\text{so}\quad j = 18 - 2k.
5. The number of long blocks is between 00 and kk. So 18−2k≥018 - 2k \ge 0 means k≤9k \le 9, and 18−2k≤k18 - 2k \le k means k≥6k \ge 6.

Step 3: count the arrangements. For each kk, choose which jj of the kk block positions hold the long blocks.

blocks kklong blocks jjways (kj)\binom{k}{j}
666611
77443535
88222828
990011

Total: 1+35+28+1=651 + 35 + 28 + 1 = 65.

The answer is (C) 65\boxed{\textbf{(C)}\ 65}.

Why this works

Rules like "no two 00s in a row" and "no three 11s in a row" limit what can appear between the 00s. That turns the string into a chain of a few allowed blocks, and counting chains of a given length is just choosing where the long blocks go. Look for this block picture before writing a long list.

Alternative approach

Let ana_n count the good strings of length nn. Every good string longer than 11 ends with the block 1010 or 110110, and removing it leaves a shorter good string. So an=an−2+an−3a_n = a_{n-2} + a_{n-3}, starting from a1=1a_1 = 1 (the string 00), a2=0a_2 = 0, a3=1a_3 = 1 (the string 010010). The values for n=1,2,…,19n = 1, 2, \ldots, 19 are
1,0,1,1,1,2,2,3,4,5,7,9,12,16,21,28,37,49,65.1, 0, 1, 1, 1, 2, 2, 3, 4, 5, 7, 9, 12, 16, 21, 28, 37, 49, 65.
So a19=65a_{19} = 65.

Concise solution

A shorter write-up, the way contest solutions are usually written. It may take a different route from the solution above.

Between consecutive 00s there must be at least one 11 (no 0000) and at most two (no 111111). So after the initial 00, the string is a sequence of blocks, each either 1010 or 110110.

Suppose there are kk blocks, jj of which are 110110. The length is
1+2k+j=19⟹j=18−2k.1 + 2k + j = 19 \quad\Longrightarrow\quad j = 18 - 2k.
Since 0≤j≤k0 \le j \le k, we need 6≤k≤96 \le k \le 9. For each kk, choose which jj of the kk blocks are the long ones:

kkj=18−2kj = 18 - 2k(kj)\binom{k}{j}
661
7435
8228
901

Total: 1+35+28+1=651 + 35 + 28 + 1 = 65.

The answer is (C) 65\boxed{\textbf{(C)}\ 65}.

Review in the AoPS books

Similar problems

Problem © Mathematical Association of America (MAA), American Mathematics Competitions. Reproduced for non-commercial educational use. Solution and commentary are original to this site.