One hundred ants, one meter stick, and a simple rule when they meet. The result seems to depend on everything — positions, directions, collisions — but there is something that remains invariant and simplifies everything.

The stick of a hundred ants

Riddle statement

A straight stick measures 1 meter.

On it there are 100 ants, in any positions.
They all move at 1 centimeter per second.
Each one initially chooses one of the two possible directions along the stick.

When two ants collide, they turn around.
When one reaches an end, it falls.

What is the longest possible time after which you can ensure that the stick is already empty?

Show solution

Solution

The key idea is that there is no need to distinguish some ants from others.

When two ants collide and turn around, the overall effect on the system is identical to that of two ants that simply pass each other and continue on. Since they are all the same, no one can tell the difference.

This allows us to replace the original problem with a much simpler one: 100 ants that do not interact with each other, each one advancing in a straight line until falling at one end.

In this version, the maximum time is reached by an ant that is at the worst possible point: one end of the stick, heading towards the opposite end. That ant travels exactly 100 centimeters at 1 centimeter per second.

The longest guaranteed time is, therefore, 100 seconds.