Maths Olympiad Prep

Library / /1292 of 1394

, 2023

Combinatorics Difficulty 6.0 National Olympiad Prove it United States

Problem:

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.

Solution

Solution:

Notice that the order in which the people leave the line is irrelevant. Give each right-facing person a weight of 11, and each left-facing person a weight of 1-1. We claim the answer for some arrangement of these 2n2n people is 2-2 times the minimum prefix sum. For instance:

 LRRLRLLLRRRRL (2)(2)4 RRRLLRLLLRRL (2)(1)2 \begin{gathered} \text{ LRRLRLLLRRRRL } \rightarrow (-2)(-2) \rightarrow 4 \\ \text{ RRRLLRLLLRRL } \rightarrow (-2)(-1) \rightarrow 2 \end{gathered}

Proof. The final configuration is always of the form

Figure 1

and the minimum prefix sum is invariant. As the final configuration has minimum prefix sum kk, we are done.

So, we want to find the expected value of the minimum prefix sum across all such strings of 11s and 1-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 22 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: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.