Probability

The March of the Ants

Difficulty
Five hundred infinitesimal ants are distributed independently and uniformly at random along a 1-foot string. Each ant immediately chooses a direction (left or right, with equal probability and independently) and moves along the string at 1 foot per minute. If two ants collide head-on, they instantly reverse directions and keep going. When an ant reaches either end, it falls off. What is the expected time for all ants to fall off the string?
Reported at 3 firmsIMC Trading · Wincent · SIGI’ve seen this in an interviewI’ve seen this
Scratchpad