AMC 10 Step by Step

2026 AMC 10A Problem 12

P11-15~5 minPrint

A drawer has 100100 red socks and 100100 blue socks. Pippi randomly removes one sock at a time, without replacement, until all the socks of one color have been removed. What is the probability that there are exactly 22 socks left in the drawer once that happens?

Log in to save your progress.
Show solution without answering

Key insight

Picture the socks in a random line. The socks left over are the unbroken same-color run at the end, so read the line from the back.

Solution

Taking socks out one at a time at random is the same as first shuffling all 200200 socks into a random line and then taking them from the front. Pippi stops early, so some socks at the back of the line are never taken. The whole problem is about what the back of the line looks like.

  1. A tiny example. Suppose the drawer had only 22 red (R) and 22 blue (B) socks. There are 66 equally likely lines:
LinePippi takesColor used upSocks left
RRBBR, Rred22 (BB)
RBRBR, B, Rred11 (B)
RBBRR, B, Bblue11 (R)
BRRBB, R, Rred11 (B)
BRBRB, R, Bblue11 (R)
BBRRB, Bblue22 (RR)

In every row, the socks left are exactly the block of same-colored socks at the very end of the line. For example, RRBB ends in BB, with a red sock just before that block.

2. Why that is always true. Pippi stops right after taking the last sock of some color, say the last red. Every sock behind it in the line is blue, since no reds are left. And the sock she just took is red, so the blue block behind it starts right there. So:
socks left=the block of one color at the end of the line.\text{socks left} = \text{the block of one color at the end of the line.}

  1. What "exactly 2 left" means. The end block has length exactly 22 when the last two socks in the line are the same color and the third sock from the end is the other color.

4. Fill the line from the back. A random line read backwards is still a random line, so the last spot is equally likely to hold any of the 200200 socks, the spot before it is equally likely to hold any of the 199199 others, and so on. Take the case "last two red, third from the end blue":
- last sock red: 100200\frac{100}{200};
- second to last red, given that: 9999 reds among 199199 socks, so 99199\frac{99}{199};
- third from the end blue: 100100 blues among 198198 socks, so 100198\frac{100}{198}.

Multiply, using 100200=12\frac{100}{200} = \frac12 and 99198=12\frac{99}{198} = \frac12:
100200⋅99199⋅100198=12⋅12⋅100199=25199.\frac{100}{200} \cdot \frac{99}{199} \cdot \frac{100}{198} = \frac12 \cdot \frac12 \cdot \frac{100}{199} = \frac{25}{199}.

5. The other color. "Last two blue, third from the end red" has the same probability, 25199\frac{25}{199}, because the two colors have the same number of socks. The two cases cannot happen together, so add them:
25199+25199=50199.\frac{25}{199} + \frac{25}{199} = \frac{50}{199}.

  1. Check with the tiny example. The same method gives 2⋅24⋅13⋅22=132 \cdot \frac{2}{4} \cdot \frac{1}{3} \cdot \frac{2}{2} = \frac{1}{3}, and the table above shows 22 of the 66 lines leaving exactly 22 socks. They agree.

The answer is (D) 50199\boxed{\textbf{(D)}\ \frac{50}{199}}.

Why this works

A process that stops "when something runs out" is easier to study as one complete random order: what is left over is decided entirely by the end of that order. Reading the order from the back replaces a long process (up to 198198 draws) with three simple draws. Whenever a question asks about the last items or the leftovers, try looking at the order from the end.

Alternative approach

Count lines instead of multiplying probabilities. Every arrangement of 100100 R's and 100100 B's in a row is equally likely, and there are (200100)\binom{200}{100} of them.

A line ends with "B, R, R" when its last three spots are fixed that way and the other 197197 spots hold the remaining 9898 R's and 9999 B's. That is (19798)\binom{197}{98} lines. Dividing and cancelling the factorials,
(19798)(200100)=100⋅99⋅100200⋅199⋅198=25199,\frac{\binom{197}{98}}{\binom{200}{100}} = \frac{100 \cdot 99 \cdot 100}{200 \cdot 199 \cdot 198} = \frac{25}{199},
the same as Step 4. Doubling for lines ending "R, B, B" gives 50199\frac{50}{199}.

Concise solution

A shorter write-up, the way contest solutions are usually written. It may take a different route from the solution above.

Shuffle the 200200 socks into a uniformly random order and let Pippi draw from the front. She stops just after the last sock of one color, so the socks left are exactly the maximal block of one color at the end of the order. Exactly 22 remain if and only if positions 200200 and 199199 match in color and position 198198 has the other color. Reading from the back,
P=2⋅100200⋅99199⋅100198=50199.P = 2 \cdot \frac{100}{200} \cdot \frac{99}{199} \cdot \frac{100}{198} = \frac{50}{199}.

The answer is (D) 50199\boxed{\textbf{(D)}\ \frac{50}{199}}.

Review in the AoPS books

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.