Problem 30.4 Easy Free 1 variation

Ants on a String

Alice has 4040 ants and Bob has 8080 ants. They stand at opposite ends of an infinitesimally thin, infinitely long string, and all 120120 ants begin crawling along it, Alice’s ants heading towards Bob and Bob’s ants heading towards Alice. Whenever two ants meet, both instantly reverse direction; no ant ever stops or turns back on its own. Eventually every ant walks off one end of the string. Let xx be the number of ants that reach Alice’s end and yy the number that reach Bob’s end. Find x−yx-y.

Work it out, then compare with the answer.

SolutionShow the worked solution

Assume, as the problem intends, that all ants crawl at the same constant speed.

Key idea. A collision makes two ants reverse direction. If we swap their labels at that instant, the picture is the same as two ants passing straight through each other. Swapping labels does not change where ants are at any moment. So the set of occupied positions and directions is exactly that of 120120 “ghost” ants that ignore each other completely.

In the ghost picture, each of Alice’s 4040 ants walks straight to Bob’s end. Each of Bob’s 8080 ants walks straight to Alice’s end. We only count how many ants arrive at each end, not which ones, so the real system gives the same counts:

x=80,y=40.x = 80,\qquad y = 40.

Hence

x−y=40\boxed{x-y=40}

Variations

The same idea with a twist. Each solution gives only the changed step.

Variation 30.4a

Alice has 4040 ants and Bob has 8080 ants. They stand at opposite ends of an infinitesimally thin, infinitely long string, and all 120120 ants begin crawling along it, Alice’s ants heading towards Bob and Bob’s ants heading towards Alice. Whenever two ants meet, both instantly reverse direction; no ant ever stops or turns back on its own. Find the total number of collisions that occur before all the ants have left the string.

Work it out, then compare with the answer.

Solution

Use the same ghost picture. Each real collision is a meeting of two ghosts moving in opposite directions, and each such meeting is a real collision.

Ghosts moving the same way never meet, because they have equal speeds. Each of Alice’s ghosts starts on Alice’s side of every one of Bob’s ghosts, and they move towards each other. So each such pair meets exactly once.

The number of collisions is therefore the number of opposite-direction pairs, 40⋅8040\cdot 80:

3200\boxed{3200}