Collision symmetry

FreeBrainteaserEasyJane StreetSIGFive Rings

Priya and Theo each raise ants. Priya has 4040 ants and Theo has 8080 ants. They stand at opposite ends of an infinitesimally wide string and release all their ants onto it simultaneously. All ants move at the same constant speed. Whenever two ants meet, they both reverse direction. Each ant moves only forward. Let xx be the number of ants that reach Priya and yy the number that reach Theo. Compute xyx - y.

Solution

The key insight is that when two ants meet and reverse direction, the system is equivalent to the ants passing through each other without interaction, because the ants are indistinguishable. Under this "pass-through" model, each ant simply continues in its original direction forever. Therefore, the number of ants that reach Priya's end equals the number of ants that were initially moving leftward (toward Priya), and the number that reach Theo's end equals the number initially moving rightward (toward Theo).

Initially, all 40 ants at Priya's end move rightward (toward Theo), and all 80 ants at Theo's end move leftward (toward Priya). Under the pass-through equivalence, the ants that reach Priya are those that started at Theo's end and moved leftward: 80 ants. The ants that reach Theo are those that started at Priya's end and moved rightward: 40 ants. Thus x=80x = 80, y=40y = 40, and

xy=8040=40.x - y = 80 - 40 = 40.

More formally, let xx be the number reaching Priya and yy the number reaching Theo. Under the pass-through model, each ant's trajectory is a straight line from its start to the opposite end. Since all ants move at the same speed, the number reaching each end is exactly the number that started at the opposite end. Hence x=80x = 80, y=40y = 40, and the difference is 4040.

Related problems