Expected Time for All Ants to Fall Off a Stick
A stick has length $L$. There are $n$ ants on the stick at positions $p_1, p_2, \ldots, p_n$ (where $0 < p_i < L$). Each ant independently and with equal probability chooses to walk left or right at speed 1. When two ants collide, they instantly reverse directions. When an ant reaches either end of the stick, it falls off.
Let $T$ be the time until all ants have fallen off.
1. What is the maximum possible value of $T$ (the worst-case time for all ants to fall off)?
2. For a given set of positions $\{p_1, \ldots, p_n\}$, what is $E[T]$, the expected time for all ants to fall off?
Express your answers in terms of the positions $p_i$ and the stick length $L$.
Open the full interactive solver, hints, and worked solution →