中文 / English
← Archive

Two Trains and a Persistent Fly

Issue 17 Warm-up Published 21 Sep 2026

Tier Warm-up — Two Trains and a Persistent Fly

The problem

Two railway stations are kilometres apart. Train A leaves the first station at km/h towards the second; simultaneously train B leaves the second station at km/h towards the first. A fly starts on the front of train A and flies at a steady km/h back and forth between the two trains, turning around instantly each time, until the trains meet. How far does the fly travel in total?
  • The trains travel on the same straight track towards each other.
  • The fly never slows down and its turns take no time.

Take a minute

Reveal hint 1
Summing the infinitely many legs of the fly's journey is possible but painful. Is there something you already know that makes it unnecessary?
Reveal hint 2
The fly flies for exactly as long as it takes the trains to meet.

Solution

Answer kilometres.

Derivation

  1. Compute the time until the trains meet.

  2. Recognise that the fly is airborne the whole time.

  3. Multiply by its speed.

  4. Compare with the hard route.

  5. Notice how far it is.