Maths Olympiad Prep

Library / /79 of 1394

Combinatorics Difficulty 4.7 AIME Find the answer United States

Problem:

A particular coin can land on heads (H), on tails (T), or in the middle (M), each with probability 13\frac{1}{3}. Find the expected number of flips necessary to observe the contiguous sequence HMMTHMMT...HMMT, where the sequence HMMT is repeated 2016 times.

A number or a short expression. Fractions can be typed as 3/2, and spacing doesn't matter.

Solution

Solution:

Let E0E_{0} be the expected number of flips needed. Let E1E_{1} be the expected number more of flips needed if the first flip landed on H. Let E2E_{2} be the expected number more if the first two landed on HM. In general, let EkE_{k} be the expected number more of flips needed if the first kk flips landed on the first kk values of the sequence HMMTHMMT...HMMT.

We have
Ei={1+13Ei+1+13E1+13E0i≢0(mod4)1+13Ei+1+23E0i0(mod4) E_{i} = \left\{ \begin{array}{lll} 1 + \frac{1}{3} E_{i+1} + \frac{1}{3} E_{1} + \frac{1}{3} E_{0} & i \not\equiv 0 & (\bmod 4) \\ 1 + \frac{1}{3} E_{i+1} + \frac{2}{3} E_{0} & i \equiv 0 & (\bmod 4) \end{array} \right.

Using this relation for i=0i=0 gives us E1=E03E_{1} = E_{0} - 3. Let Fi=13iEiF_{i} = \frac{1}{3^{i}} E_{i}. By simple algebraic manipulations we have
Fi+1Fi={23i+1E0i≢0(mod4)13i23i+1E0i0(mod4) F_{i+1} - F_{i} = \left\{ \begin{array}{lll} -\frac{2}{3^{i+1}} \cdot E_{0} & i \not\equiv 0 & (\bmod 4) \\ -\frac{1}{3^{i}} - \frac{2}{3^{i+1}} \cdot E_{0} & i \equiv 0 & (\bmod 4) \end{array} \right.

We clearly have F20164=0F_{2016 \cdot 4} = 0 and F0=E0F_{0} = E_{0}. So adding up the above relations for i=0i=0 to i=201641i=2016 \cdot 4 - 1 gives
E0=2E0i=12016413ik=02015134k=E0(13201641)113201648081 \begin{aligned} -E_{0} & = -2 E_{0} \sum_{i=1}^{2016 \cdot 4} \frac{1}{3^{i}} - \sum_{k=0}^{2015} \frac{1}{3^{4k}} \\ & = E_{0}\left(\frac{1}{3^{2016 \cdot 4}} - 1\right) - \frac{1 - \frac{1}{3^{2016 \cdot 4}}}{\frac{80}{81}} \end{aligned}
so E0=380688180E_{0} = \frac{3^{8068} - 81}{80}.

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.