Six ants are walking at 1cm/second on a very narrow stick 100cm long:

  • Ant 1: starts at 0, facing right
  • Ant 2: starts at 20, facing right
  • Ant 3: starts at 30, facing left
  • Ant 4: starts at 40, facing right
  • Ant 5: starts at 60, facing right
  • Ant 6: starts at 80, facing left
Ants on a Stick

When two ants run into each other, they immediately turn around and walk in the other direction.

How long does it take before the last ant walks off the stick?


Solution

Exactly 100 seconds.

The trick is that when two ants run into each other, it is equivalent to them walking through each other. And if they just walk through each other, it is clear that the first ant starting at 0 will take 100 seconds to walk to the other end.

Leave a Reply

Your email address will not be published. Required fields are marked *