2019 AMC 10B Problem 21
Debra flips a fair coin repeatedly, keeping track of how many heads and how many tails she has seen in total, until she gets either two heads in a row or two tails in a row, at which point she stops flipping. What is the probability that she gets two heads in a row but she sees a second tail before she sees a second head?
Show solution without answering
Key insight
The first four flips are forced to be T, H, T, H. After that, list the ways to finish with two heads and add their probabilities.
Solution
The game stops at the first repeat, so until the end the flips must alternate. Let us see what the conditions force, one flip at a time.
Step 1: the first four flips are forced.
- Flip 1 must be T. If it were H, the next flips would go H, T, H, ... and the second head (flip 3) would come before the second tail. The only other options are HH or HTT, which stop too early or end with tails.
- Flip 2 must be H. A second T would give TT and end with tails.
- Flip 3 must be T. An H would give THH: two heads in a row, but only one tail seen. The second tail would never come before the second head.
- Flip 4 must be H. A T would give THTT and end with tails.
After T, H, T, H she has seen the second tail (flip 3) before the second head (flip 4). That part of the condition is now settled. The chance of this start is .
Step 2: she must still finish with HH.
5. From here the flips keep alternating until a repeat. The winning sequences are
- THTH H (length , probability ),
- THTH TH H (length , probability ),
- THTH THTH H (length , probability ),
- and so on, each as likely as the one before.
6. Add them up. Call the sum :
Multiplying by gives , so and .
The answer is .
Why this works
In "flip until something happens" problems, the conditions often force the first few flips completely. Work out that forced start first. Then the rest of the game is a simple repeating pattern, and adding the probabilities of all the ways it can end is a sum where each term is a fixed fraction of the one before.
Alternative approach
After T, H, T, H, let be the chance of ending with HH, starting right after a head. The next flip is H (she wins, chance ) or T. After a T, the next flip must be H to keep going (chance ), and then she is in the same situation as before. So , which gives . The answer is .
Concise solution
A shorter write-up, the way contest solutions are usually written. It may take a different route from the solution above.
Trace what the conditions force. Until she stops, the flips must alternate (a repeat ends the game).
- Flip 1 must be : if it were , the second tail could only come after a second head or via , which stops with tails.
- Flip 2 must be (a would end the game with ).
- Flip 3 must be : an gives , ending with only one tail seen.
- Flip 4 must be : a gives , ending with tails.
After , which has probability , she has seen two tails and two heads, with the second tail (flip 3) before the second head (flip 4). The condition is met; she just needs to eventually finish with .
Let be the probability of finishing with when the last flip was and the game is still running. The next flip is (done, probability ) or ; after a , the following flip must be to survive (probability ), returning to the same state. So
The answer is , so .
Review in the AoPS books
- Introduction to Counting & Probability, Chapter 8: Basic Probability Techniques (§8.5)
- Introduction to Algebra, Chapter 21: Sequences & Series (§21.1, §21.2, §21.3, §21.4)
- Intermediate Counting & Probability, Chapter 10: Recursion
- Prealgebra, Chapter 15: Problem-Solving Strategies (§15.4)
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.