Ant Collisions
1 Dec 2010
Puzzle

Peter and Cynthia stand at each end of a straight line segment. Peter sends 50 ants towards Cynthia, one after another. Cynthia sends 20 ants towards Peter. All ants travel along the straight line segment. Whenever two ants collide, they simply bounce back and start traveling in the opposite direction. How many ants reach Peter and how many reach Cynthia? How many ant collisions take place?

Source

Variation of ants puzzles found in Peter Winkler's puzzle book.

Solution

Imagine that when two ants meet, they switch identities. So even after a collision, two ants are traveling in two opposite directions. It follows that 20 ants return to Peter while 50 ants reach Cynthia. To calculate the number of ant collisions, imagine that each ant carries a message. So Peter has sent 50 messages to Cynthia, one message per ant. Similarly, Cynthia has sent 20 messages to Peter, one message per ant. Further, imagine that the two ants swap messages when they collide. Then a message always makes forward progress. Each of Cynthia's messages goes through 50 ant collisions. Each of Peter's messages goes through 20 ant collisions. The total number of collisions is 50 times 20, which is 1000.