Try this beautiful problem from the American Invitational Mathematics Examination I, AIME I, 1995 repeatedly flipping a fair coin.

## Flipping a Fair Coin – AIME I, 1995

Let p be the probability that, in the process of repeatedly flipping a fair coin, one will encounter a run of 5 heads before on encounters a run of 2 tails. Given that p can be written in the form \(\frac{m}{n}\), where m and n are relatively prime positive integers, find m+n.

- is 107
- is 37
- is 840
- cannot be determined from the given information

**Key Concepts**

Integers

Probability

Algebra

## Check the Answer

Answer: is 37.

AIME I, 1995, Question 15

Elementary Number Theory by David Burton

## Try with Hints

Let A be head flipped

B be tail flipped

outcomes are AAAAA, BAAAAA, BB. ABB, AABB, AAABB, AAAABB

with probabilities \(\frac{1}{32}\), \(\frac{1}{64}\), \(\frac{1}{4}\), \(\frac{1}{8}\), \(\frac{1}{16}\), \(\frac{1}{32}\), \(\frac{1}{64}\)

with five heads AAAAA, BAAAAA sum =\(\frac{3}{64}\) and sum of outcomes=\(\frac{34}{64}\)

or, m=3, n=34

or, m+n=37.

## Other useful links

- https://www.cheenta.com/rational-number-and-integer-prmo-2019-question-9/
- https://www.youtube.com/watch?v=lBPFR9xequA