Skip to content

Five hundred bouncing ants on a one-foot string

Question

A string is one foot long. Five hundred ants are dropped onto it at independent uniformly random positions, each facing left or right at random, and all crawl at one foot per minute. Whenever two ants meet they both turn around. An ant reaching an end falls off. What is the expected time until the string is empty?

Short answer

500501\tfrac{500}{501} minutes. A collision with reversal looks exactly like the two ants passing through each other, so the string empties when the slowest 'ghost' ant walks off. Each ghost's exit time is the distance to the end it faces, which is uniform on [0,1][0,1], and the expected maximum of 500500 such uniforms is 500501\tfrac{500}{501}.

Adapted from Zhou, A Practical Guide to Quantitative Finance Interviews, sec. 4.6 Order Statistics, 'Random ants', p.101; question and answer rewritten by SelfMadeQuant.com.

See the hint and the full worked solution in the question bank (free account).

Open the worked solution

Lessons behind this question

Start with a free lesson: Expectation, Variance and Covariance is part of a free topic. Create a free account, no card needed, to read it in full with worked solutions.

Read it free