Maths Olympiad Prep

Library / /1250 of 1394

, 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 HT|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=HTD=|H-T|. Note that if D0D \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 (1p)2k+1(1-p)^{2k+1} and the probability that D=0D=0 after the first n1n-1 flips is (2kk)4k\frac{\binom{2k}{k}}{4^k}. Therefore
E(D)=(1p)k=0(1p2)2k(2kk)=1p1(1p)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=114x \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 n0n \geqslant 0, the probability that Max made nn successful throws (not counting the last throw) is p(1p)np(1-p)^{n}.

Claim: Assuming Max made n1n \geqslant 1 throws, the expected value of HT|H-T| is given by
k=1(n1)/22k+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 HT|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(n1)/2(ni)(n2i)2n1=ni=0(n1)/2(ni)2i2n1=n(12i=0(n3)/2(n1i)2n1)=n(n1(n1)/2)2n1 \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!(n1)!!2=n!!(n1)!!=k=1(n1)/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(HT)=p(n=1(1p)nk=1(n1)/22k+12k)=p(1p)(2p)m=0((1p)2mk=1m2k+12k)=p(1p)(2p)(1(1p)2)3/2=1pp(2p). \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(HT)=2425557=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 HT+n|H-T+n|. By symmetry, En=EnE_{-n}=E_{n} for all nn. Considering what happens in the next throw gives
2En=(1p)En1+(1p)En+1+2pn 2E_{n} = (1-p)E_{n-1} + (1-p)E_{n+1} + 2pn
for all n0n \geqslant 0. Now let α=1p(2p)1p<1\alpha = \frac{1-\sqrt{p(2-p)}}{1-p} < 1 be the smaller root of (1p)x22x+(1p)=0(1-p)x^{2} - 2x + (1-p) = 0. From
n=12αnEn=n=1αn((1p)En1+(1p)En+1+2pn)=α(1p)E0+(2α(1p))E1+n=12pnαn+n=22α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
(1p)E1α(1p)E0=n=12pnα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=(1p)E1E_{0} = (1-p)E_{1}, this gives
E0(1α(1p))=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,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.