Ants on a Stick
The problem
A bunch of ants sit on a one-meter stick at random positions, each facing left or right. They all walk at exactly 1 m/s. Rules:
- When two ants meet head-on, both reverse direction.
- When an ant reaches an end, it falls off.
In the worst case (any number of ants, any positions, any starting directions), how long until all ants have fallen off?