Maths Olympiad Prep

Library / HMMT February /1171 of 1302

HMMT February, 2020

Combinatorics Difficulty 5.9 AIME, harder Prove it United States

Problem:

Max repeatedly throws a fair coin in a hurricane. For each throw, there is a 4%4\% chance that the coin gets blown away. He records the number of heads HH and the number of tails TT before the coin is lost. (If the coin is blown away on a toss, no result is recorded for that toss.) What is the expected value of ∣H−T∣|H-T|?

Solutions — 3

Solution 1

Solution:

In all solutions, p=125p=\frac{1}{25} will denote the probability that the coin is blown away. Let D=∣H−T∣D=|H-T|. Note that if D≠0D \neq 0, the expected value of DD is not changed by a coin flip, whereas if D=0D=0, the expected value of DD increases by 11. Therefore E(D)\mathbf{E}(D) can be computed as the sum over all nn of the probability that the nnth coin flip occurs when D=0D=0. This only occurs when n=2k+1n=2k+1 is odd, where the probability that the first nn coin flips occur is (1−p)2k+1(1-p)^{2k+1} and the probability that D=0D=0 after the first n−1n-1 flips is (2kk)4k\frac{\binom{2k}{k}}{4^k}. Therefore
E(D)=(1−p)∑k=0∞(1−p2)2k(2kk)=1−p1−(1−p)2 \begin{aligned} \mathbf{E}(D) & =(1-p) \sum_{k=0}^{\infty}\left(\frac{1-p}{2}\right)^{2k}\binom{2k}{k} \\ & =\frac{1-p}{\sqrt{1-(1-p)^{2}}} \end{aligned}
using the generating function
∑k=0∞(2kk)xk=11−4x \sum_{k=0}^{\infty}\binom{2k}{k} x^{k}=\frac{1}{\sqrt{1-4x}}
Plugging in p=125p=\frac{1}{25} yields E(D)=247\mathbf{E}(D)=\frac{24}{7}.

Solution 2

Solution:

For each n⩾0n \geqslant 0, the probability that Max made nn successful throws (not counting the last throw) is p(1−p)np(1-p)^{n}.

Claim: Assuming Max made n⩾1n \geqslant 1 throws, the expected value of ∣H−T∣|H-T| is given by
∏k=1⌊(n−1)/2⌋2k+12k. \prod_{k=1}^{\lfloor(n-1)/2\rfloor} \frac{2k+1}{2k}.

Proof. If nn is odd then the expected value for n+1n+1 will be equal to that for nn; since ∣H−T∣|H-T| will be nonzero, it will be equally likely to increase or decrease after the coin is flipped. Therefore, it suffices to compute the expected value for the nn odd case. This is
∑i=0(n−1)/2(ni)⋅(n−2i)2n−1=n−∑i=0(n−1)/2(ni)⋅2i2n−1=n⋅(1−2⋅∑i=0(n−3)/2(n−1i)2n−1)=n⋅(n−1(n−1)/2)2n−1 \begin{aligned} \frac{\sum_{i=0}^{(n-1)/2}\binom{n}{i} \cdot (n-2i)}{2^{n-1}} & = n - \frac{\sum_{i=0}^{(n-1)/2}\binom{n}{i} \cdot 2i}{2^{n-1}} \\ & = n \cdot \left(1 - \frac{2 \cdot \sum_{i=0}^{(n-3)/2}\binom{n-1}{i}}{2^{n-1}}\right) \\ & = n \cdot \frac{\binom{n-1}{(n-1)/2}}{2^{n-1}} \end{aligned}
=n!(n−1)!!2=n!!(n−1)!!=∏k=1(n−1)/22k+12k \begin{aligned} & = \frac{n!}{(n-1)!!^{2}} \\ & = \frac{n!!}{(n-1)!!} \\ & = \prod_{k=1}^{(n-1)/2} \frac{2k+1}{2k} \end{aligned}
as desired.

Using the claim, we have
E(∣H−T∣)=p(∑n=1∞(1−p)n∏k=1⌊(n−1)/2⌋2k+12k)=p(1−p)(2−p)∑m=0∞((1−p)2m∏k=1m2k+12k)=p(1−p)(2−p)(1−(1−p)2)−3/2=1−pp(2−p). \begin{aligned} \mathbf{E}(|H-T|) & = p\left(\sum_{n=1}^{\infty}(1-p)^{n} \prod_{k=1}^{\lfloor(n-1)/2\rfloor} \frac{2k+1}{2k}\right) \\ & = p(1-p)(2-p) \sum_{m=0}^{\infty}\left((1-p)^{2m} \prod_{k=1}^{m} \frac{2k+1}{2k}\right) \\ & = p(1-p)(2-p)\left(1-(1-p)^{2}\right)^{-3/2} \\ & = \frac{1-p}{\sqrt{p(2-p)}}. \end{aligned}
Plugging in p=125p=\frac{1}{25} gives
E(∣H−T∣)=2425⋅5⋅57=247. \mathbf{E}(|H-T|) = \frac{24}{25} \cdot 5 \cdot \frac{5}{7} = \frac{24}{7}.

Solution 3

Solution:

Let EnE_{n} be the expected value of ∣H−T+n∣|H-T+n|. By symmetry, E−n=EnE_{-n}=E_{n} for all nn. Considering what happens in the next throw gives
2En=(1−p)En−1+(1−p)En+1+2pn 2E_{n} = (1-p)E_{n-1} + (1-p)E_{n+1} + 2pn
for all n⩾0n \geqslant 0. Now let α=1−p(2−p)1−p<1\alpha = \frac{1-\sqrt{p(2-p)}}{1-p} < 1 be the smaller root of (1−p)x2−2x+(1−p)=0(1-p)x^{2} - 2x + (1-p) = 0. From
∑n=1∞2αnEn=∑n=1∞αn((1−p)En−1+(1−p)En+1+2pn)=α(1−p)E0+(2α−(1−p))E1+∑n=1∞2pnαn+∑n=2∞2αnEn \begin{aligned} \sum_{n=1}^{\infty} 2\alpha^{n} E_{n} & = \sum_{n=1}^{\infty} \alpha^{n}\left((1-p)E_{n-1} + (1-p)E_{n+1} + 2pn\right) \\ & = \alpha(1-p)E_{0} + (2\alpha - (1-p))E_{1} + \sum_{n=1}^{\infty} 2pn\alpha^{n} + \sum_{n=2}^{\infty} 2\alpha^{n}E_{n} \end{aligned}
we have
(1−p)E1−α(1−p)E0=∑n=1∞2pnαn=2pα(1−α)2 (1-p)E_{1} - \alpha(1-p)E_{0} = \sum_{n=1}^{\infty} 2pn\alpha^{n} = \frac{2p\alpha}{(1-\alpha)^{2}}
As E0=(1−p)E1E_{0} = (1-p)E_{1}, this gives
E0(1−α(1−p))=2pα(1−α)2 E_{0}(1-\alpha(1-p)) = \frac{2p\alpha}{(1-\alpha)^{2}}
Plugging in p=125p=\frac{1}{25} and α=34\alpha=\frac{3}{4} gives E0=247E_{0}=\frac{24}{7}.

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

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