JEEOlympiad

A fair coin is flipped repeatedly until the pattern Heads-Tails-Heads…

Question

A fair coin is flipped repeatedly until the pattern Heads-Tails-Heads (HTH) first appears as three consecutive flips. Let E be the expected number of flips required. E is a rational number m/n in lowest terms; find m+n.

✓ Verified answer: 11checked by our engine — not a guess

Step-by-step solution

Use an absorbing Markov chain on the progress toward HTH.

States by the longest matching suffix: S0 = '' (no progress), S1 = 'H', S2 = 'HT', and absorbing 'HTH'.
Transitions (each flip H or T with prob 1/2):

- From S0: H -> S1, T -> S0.

- From S1: H -> S1 (the new H restarts a length-1 prefix), T -> S2.

- From S2 ('HT'): H -> absorb (HTH done!), T -> S0.

Let E0,E1,E2 be expected remaining flips from each state.

E0 = 1 + (1/2)E1 + (1/2)E0
E1 = 1 + (1/2)E1 + (1/2)E2
E2 = 1 + (1/2)(0) + (1/2)E0
From the first: (1/2)E0 = 1 + (1/2)E1 => E0 = 2 + E1.
From the second: (1/2)E1 = 1 + (1/2)E2 => E1 = 2 + E2.
Third: E2 = 1 + (1/2)E0.
Substitute: E1 = 2 + 1 + (1/2)E0 = 3 + (1/2)E0. And E0 = 2 + E1 = 5 + (1/2)E0 => (1/2)E0 = 5 => E0 = 10.
So E = 10 = 10/1, m+n = 10+1 = 11.

Final answer11

Stuck on a problem like this?

Paste any JEE or NEET question — verified working, a confidence %, and an honest “not sure” instead of a bluff.

Solve my doubt →

More Probability solutions