Skip to main content

AMC 12 Mock Exam 4 Problem 20

Problem 20 of 25

Priya is designing a weekly exercise routine, Monday through Sunday, that she will repeat every week indefinitely. On each day of the week she either trains or rests. To avoid injury, she must never train on three consecutive days, and this includes stretches that cross from one week into the next (for example, Saturday, Sunday, and the following Monday). How many different weekly routines are possible?

Answer choices

Show solution

Solution

First ignore the week boundary. Let ana_n be the number of length-nn train/rest strings with no three consecutive training days. A valid string of length n≥3n\ge3 ends in rest, rest–train, or rest–train–train, so an=an−1+an−2+an−3a_n=a_{n-1}+a_{n-2}+a_{n-3} with a0=1a_0=1, a1=2a_1=2, a2=4a_2=4. This gives a3=7a_3=7, a4=13a_4=13, a5=24a_5=24, a6=44a_6=44, a7=81a_7=81.

Now subtract the 77-day strings that are valid within the week but create a run of at least three training days across the boundary. Such a string starts with exactly p∈{1,2}p\in\{1,2\} training days followed by a rest, and ends with a rest followed by exactly q∈{1,2}q\in\{1,2\} training days, where p+q≥3p+q\ge3. The days strictly between those two rests can be any valid string of length 7−p−q−27-p-q-2: (p,q)=(1,2): a2=4,(2,1): a2=4,(2,2): a1=2.(p,q)=(1,2):\ a_2=4,\qquad (2,1):\ a_2=4,\qquad (2,2):\ a_1=2. (The all-training week is already excluded from the 8181.) Hence the number of routines is 81−(4+4+2)=7181-(4+4+2)=\boxed{71}.

Tagged: cyclic binary strings avoiding three consecutive 1s