Planet

Two Trains and a Fly

On Dynamos, two trains approach each other on the same track from opposite directions, while a fly wearing goggles zips back and forth between the locomotives

Kinesys lands, by pure chance, right on the tracks of Dynamos’s main line. Liz moves it just in time: a train whooshes past at full speed. “Okay, no panic. It’s just another planet where nobody stands still,” she says, dancing nervously in place.

Worrying news comes from the control tower: because of a switching error, two trains are running on the same track, heading straight for each other. Luckily, on Dynamos every locomotive has enormous foam-rubber bumpers, and no passenger will get hurt.

M00N, however, has noticed something smaller: a frightened fly zipping back and forth between the two trains. Dord watches its frantic path and loses patience: “What a messy flight. And the calculation is so simple.”

The Riddle

Two trains leave at the same moment, one from Pendolia station bound for Rotaria and the other from Rotaria station bound for Pendolia. Neither train makes any stops along the way, and both travel at a constant 50 mph.

At the very moment the trains depart, a fly that had landed on the locomotive of the Pendolia train, startled by the motion, takes off and starts flying along the tracks toward Rotaria at 60 mph. When it meets the train from Rotaria, it turns around and heads back toward Pendolia at the same speed. The fly keeps going like this, reversing direction every time it meets one of the two trains.

Because of a switching error, the two trains are bound to collide head-on (gently, thanks to the foam-rubber bumpers), and the fly will end up trapped between the bumpers. Given that the two stations are exactly 100 miles apart, what is the total distance the fly travels before it gets trapped between the two trains?

Hint

Don’t try to add up all the legs of the fly’s flight: there are infinitely many. Ask yourself instead how long it flies.

Solution

The fly traveled exactly 60 miles.

The solution is very simple and doesn’t require adding up all the individual legs of its back-and-forth flight. The two trains close in on each other at a relative speed of 50 + 50 = 100 mph, so they meet exactly one hour after departure. The fly flew for one hour at a constant speed, covering 60 miles.

(The fly, for the record, gets away with nothing worse than a big scare: Dynamos foam rubber is extremely soft.)