Maths Olympiad Prep

Library / /631 of 860

Combinatorics Difficulty 5.3 AIME, harder Find the answer

There are 100 people standing in a line from left to right. Half of them are randomly chosen to face right (with all (10050)\binom{100}{50} possible choices being equally likely), and the others face left. Then, while there is a pair of people who are facing each other and have no one between them, the leftmost such pair leaves the line. Compute the expected number of people remaining once this process terminates.

A number or a short expression. Spacing and $ signs are ignored.

Solution

Notice that the order in which the people leave the line is irrelevant. Give each right-facing person a weight of 1, and each left-facing person a weight of -1. We claim the answer for some arrangement of these 2n2n people is -2 times the minimum prefix sum. For instance: LRRLRLLLRRRRL(2)(2)4\text{LRRLRLLLRRRRL} \rightarrow(-2)(-2) \rightarrow 4 RRRLLRLLLRRL(2)(1)2\text{RRRLLRLLLRRL} \rightarrow(-2)(-1) \rightarrow 2 Proof. The final configuration is always of the form LLLLkRRRRk\underbrace{\mathrm{LL} \ldots \mathrm{LL}}_{k} \underbrace{\mathrm{RR} \ldots \mathrm{RR}}_{k} and the minimum prefix sum is invariant. As the final configuration has minimum prefix sum is kk, we are done. So, we want to find the expected value of the minimum prefix sum across all such strings of 1s and -1s. To find this, we will instead compute the equivalent value k=1Pr[maximum prefix sum is k]\sum_{k=1}^{\infty} \operatorname{Pr}[\text{maximum prefix sum is } \geq k] Consider the kkth term of this sum, and the corresponding walk from (0,0)(0,0) to (2n,0)(2n, 0) with L corresponding to a step of (1,1)(1,-1) and R corresponding to a step of (1,1)(1,1). Consider the point PP at y=ky=k with minimal xx-coordinate, and reflect the remainder of the walk across y=ky=k. This gives a path that ends at (2n,2k)(2n, 2k). Noting that this is a bijection between walks from (0,0)(0,0) to (2n,2k)(2n, 2k) and walks that reach y=ky=k, we have k=1Pr[maximum prefix sum is k]=k=1(2nnk)(2nn)=12[(k=(2nnk)(2nn))1]=12(22n(2nn)1)\begin{aligned} \sum_{k=1}^{\infty} \operatorname{Pr}[\text{maximum prefix sum is } \geq k] & =\sum_{k=1}^{\infty} \frac{\binom{2n}{n-k}}{\binom{2n}{n}} \\ & =\frac{1}{2}\left[\left(\sum_{k=-\infty}^{\infty} \frac{\binom{2n}{n-k}}{\binom{2n}{n}}\right)-1\right] \\ & =\frac{1}{2}\left(\frac{2^{2n}}{\binom{2n}{n}}-1\right) \end{aligned} Adjusting for the factor of 2 we saved at the beginning, our final answer for n=50n=50 is 2100(10050)1\frac{2^{100}}{\binom{100}{50}}-1.

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: Omni-MATH, licensed Apache-2.0. Statement and solution reproduced as published; topic and difficulty added by this site.