Maths Olympiad Prep

Library / /985 of 1394

, 2024

Combinatorics Difficulty 5.5 AIME, harder Prove it United States

Problem:

Rishabh has 20242024 pairs of socks in a drawer. He draws socks from the drawer uniformly at random, without replacement, until he has drawn a pair of identical socks. Compute the expected number of unpaired socks he has drawn when he stops.

Solutions — 2

Solution 1

Solution:

We solve for the expected number of total socks drawn and subtract two at the end.
Let EnE_{n} be the expected number of socks drawn for nn pairs of socks, so that E1=2E_{1}=2. Suppose there are nn pairs of socks, Rishabh continued to draw socks until the drawer was empty, and without loss of generality let the last sock drawn be red. If we ignore the two red socks, the process is equivalent to drawing from a drawer with n1n-1 pairs of socks. Let kk be the number of socks drawn until a pair of identical socks is found, after ignoring the two red socks. Then the first red sock has probability k2n1\frac{k}{2 n-1} of being before this stopping point, so the expected value is k+k2n1=k2n2n1k+\frac{k}{2 n-1}=k \cdot \frac{2 n}{2 n-1}. Since the expected value of kk is En1E_{n-1}, we have
En=2n2n1En1 E_{n}=\frac{2 n}{2 n-1} \cdot E_{n-1}
Applying this recurrence, we get
En=(2n)!!(2n1)!!=2nn!(2n1)!!=4n(n!)2(2n)!=4n(2nn) E_{n}=\frac{(2 n)!!}{(2 n-1)!!}=\frac{2^{n} \cdot n!}{(2 n-1)!!}=\frac{4^{n} \cdot(n!)^{2}}{(2 n)!}=\frac{4^{n}}{\binom{2 n}{n}}
Subtracting two and plugging in n=2024n=2024 gives a final answer of 42024(40482024)2\frac{4^{2024}}{\binom{4048}{2024}}-2.

Solution 2

Solution:

Let P(k)P(k) denote the probability that Rishabh draws more than kk socks. We compute P(k)P(k) for all 0k20240 \leq k \leq 2024 (and note P(k)=0P(k)=0 for larger kk).
The number of ways to draw kk socks, none identical to each other, is
40484046(40502k)=2k2024!(2024k)! 4048 \cdot 4046 \cdots (4050-2k) = 2^{k} \cdot \frac{2024!}{(2024-k)!}
while the total number of ways to draw kk socks is
40484047(4049k)=4048!(4048k)! 4048 \cdot 4047 \cdots (4049-k) = \frac{4048!}{(4048-k)!}
Thus,
P(k)=2k2024!(2024k)!4048!(4048k)!=2024!4048!2k(4048k)!(2024k)!=1(40482024)2k(4048k2024) P(k) = \frac{2^{k} \cdot \frac{2024!}{(2024-k)!}}{\frac{4048!}{(4048-k)!}} = \frac{2024!}{4048!} \cdot \frac{2^{k}(4048-k)!}{(2024-k)!} = \frac{1}{\binom{4048}{2024}} \cdot 2^{k} \binom{4048-k}{2024}
The expected number of socks drawn is
P(0)+P(1)++P(2024)=1(40482024)k=020242k(4048k2024) P(0)+P(1)+\cdots+P(2024)=\frac{1}{\binom{4048}{2024}} \sum_{k=0}^{2024} 2^{k}\binom{4048-k}{2024}
This sum is equivalent to Putnam 2020 A2. We claim that it is equal to 420244^{2024}. We do this via a counting argument: we count how many ways there are to choose at least half of the elements from the set {1,2,,4049}\{1,2, \ldots, 4049\}. On the one hand that is 240492=42024\frac{2^{4049}}{2}=4^{2024}. On the other hand, letting k+1k+1 be the 2025th largest element chosen, there are (4048k2024)\binom{4048-k}{2024} ways to choose the elements larger than it, and 2k2^{k} ways to choose the elements smaller than it. Varying kk, we get
k=020242k(4048k2024)=42024 \sum_{k=0}^{2024} 2^{k}\binom{4048-k}{2024}=4^{2024}
This means the expected number of socks is
42024(40482024) \frac{4^{2024}}{\binom{4048}{2024}}
and subtracting two for the matching pair gives 42024(40482024)2\frac{4^{2024}}{\binom{4048}{2024}}-2.

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.