Lambdia

Twenty Miles of Fly, and the Series Nobody Should Finish

Two riders twenty-five miles apart close at fifty miles an hour, so a forty mile an hour fly shuttling between them flies exactly twenty miles. The series of shuttle legs gives the same twenty, with a first leg of 100/7 and a round-trip ratio of 1/21, but no finite number of legs ever reaches it: after eighty legs the exact total is twenty minus about 2.6e-52. The general law is wD/(a+b), and it holds identically in the rider speeds rather than by luck at 20 and 30.

Two motorcycles start twenty-five miles apart on a straight road and ride at each other, one at twenty miles an hour and one at thirty. A fly leaves the front wheel of the first rider at forty miles an hour, reaches the second rider, turns instantly, flies back, and keeps shuttling until the two machines meet and the fly is caught between them. How far does the fly travel?

The problem is famous because it has a five-second answer and a five-minute answer, and both are correct. Which one you reach for says something about how you read a question. The five-minute route is a geometric series, and the reason to write this article is that the series deserves better than the wave of the hand it usually gets: it converges, it converges to the right number, and it converges in a way that quietly explains why nobody should try to finish it under time pressure.

What the problem is actually assuming

Everything moves at constant speed along one line. Rider AA starts at position 00 and moves up the line at a=20a = 20, rider BB starts at D=25D = 25 and moves down it at b=30b = 30, and the fly moves at w=40w = 40, reversing direction with no loss of time whenever it touches a rider. Distances are miles and times are hours, so every speed is miles per hour.

One hypothesis is doing real work and is almost never stated: the fly has to be faster than the faster rider. Here 40>3040 > 30, so the fly always catches up and the shuttling never stalls. Drop that and the problem stops being well posed rather than becoming harder. A fly at twenty miles an hour launched towards a rider closing at thirty would reach that rider, but on the way back it would never catch the other one, and the sequence of legs simply ends. The verification code for this article refuses that case with an error rather than returning a plausible number, which is the behaviour I want from anything that computes a shuttle.

Time the process instead of the path

The riders approach each other, so the gap between them shrinks at the sum of their speeds.

a+b=20+30=50 mpha + b = 20 + 30 = 50 \text{ mph}
(1)

A twenty-five mile gap closing at fifty miles an hour is gone after 25/50=1/225/50 = 1/2 hour. Sanity check from the other side: in half an hour the riders themselves cover 2012=1020 \cdot \tfrac12 = 10 and 3012=1530 \cdot \tfrac12 = 15 miles, and 10+15=2510 + 15 = 25, which is exactly the gap they began with.

The fly is airborne for that whole half hour, because it starts when they start and it is caught when they meet. Its speed never changes. So its distance is speed times time, and the reversals are irrelevant to the total.

40×12=20 miles40 \times \tfrac{1}{2} = 20 \text{ miles}
(2)
Fig. 1 — The riders take half an hour to meet, so the fly is in the air for half an hour. The zigzag has infinitely many segments and they all fit inside the same half hour.

The series the shortcut skips

Suppose you insist on adding the legs. The first leg is a two-body chase: the fly and rider BB close on each other at 40+30=7040 + 30 = 70 miles an hour over a gap of twenty-five miles, so the leg lasts 25/7025/70 hours and the fly covers

402570=100714.29 miles40 \cdot \frac{25}{70} = \frac{100}{7} \approx 14.29 \text{ miles}
(3)

At the moment the fly touches rider BB, the gap between the riders has shrunk to 2/72/7 of what it was. The return leg shrinks it by a further factor of 1/61/6. So each complete round trip multiplies the remaining gap by

waw+bwbw+a=20701060=121\frac{w - a}{w + b} \cdot \frac{w - b}{w + a} = \frac{20}{70} \cdot \frac{10}{60} = \frac{1}{21}
(4)

The legs therefore come in pairs, the first pair being 1007+10021=40021\tfrac{100}{7} + \tfrac{100}{21} = \tfrac{400}{21}, and every later pair is 1/211/21 of the one before it. That is a geometric series with a ratio well under one, so it converges, and its sum is

k040021(121)k=400/2111/21=20\sum_{k \ge 0} \frac{400}{21} \left(\frac{1}{21}\right)^{k} = \frac{400/21}{1 - 1/21} = 20
(5)
Fig. 2 — The legs of the zigzag, in exact fractions. Every round trip scales the remainder by 1/21, and the partial sums climb towards 20 from below without ever arriving.

Twenty miles again. The series is not wrong. It is slow, and it needs a convergence argument the one-line route never needs, which is why treating it as the method of choice costs you an interview rather than a mark.

Why no finite number of legs will do

Here is the detail I find most interesting, and it is the reason the video crossed out the series as a method and never as a value. The partial sums approach twenty strictly from below. They never reach it. After eighty legs the exact rational total is twenty minus roughly 2.6×10522.6 \times 10^{-52}, which for any practical purpose is twenty and is nonetheless not twenty. A candidate who decides to add legs until the answer stops changing has committed to an infinite amount of arithmetic.

What is exactly true after every single leg is a conservation statement rather than an equality with the answer.

Invariant of the shuttle

Let SnS_n be the distance the fly has already flown after nn legs and let gng_n be the gap remaining between the riders at that moment. Then Sn+wgna+bS_n + \dfrac{w\,g_n}{a + b} is the same for every nn, and its value is the answer. The second term is the flight the fly still owes on the gap that is left, so the identity says the fly is always exactly on schedule.

Since gn0g_n \to 0 and the second term is positive for every finite nn, the flown distance rises to the answer without touching it. That is the formal content of the picture: infinitely many legs inside a finite half hour, in the same family of situations as Zeno's dichotomy, where an unbounded number of steps takes a bounded amount of time because the steps shrink fast enough.

The general law

Write the problem with letters: gap DD, rider speeds aa and bb, fly speed w>max(a,b)w > \max(a, b). Summing the legs the long way and simplifying gives

distance flown  =  wDa+b\text{distance flown} \;=\; \frac{wD}{a + b}
(6)

which is speed times the duration of the chase, so the two routes agree identically in aa and bb rather than agreeing by luck at a=20, b=30a = 20,\ b = 30. Equation (6) also makes the structure obvious. The fly speed enters linearly, the rider speeds only through their sum, and the geometry of the zigzag has vanished completely. Nothing about which rider is faster survives into the answer, and neither does the shape of the path.

One near miss worth naming, because it is the other plausible reflex: charging the fly only its first leg gives 100/714.3100/7 \approx 14.3 miles, which is not the answer. Someone who quotes that number has read the question as asking for the first crossing.

What the shortcut hides

I want to push back gently on the way this problem is usually told, where the series is the joke and the clock is the punchline. The clock argument is only sound because the total distance flown depends on nothing except elapsed time, and that in turn is only true because the fly's speed is constant and the turns are instantaneous. Give the fly a moment to decelerate and turn around, and the clock argument still gives an upper bound but no longer the exact answer, while the series becomes a genuinely different computation. The elegance is real and it is a consequence of the idealisation, not a substitute for noticing it.

Sources and further reading

Every number here was checked three ways before publication. The duration and the answer were computed in exact rational arithmetic; the zigzag was walked leg by leg in exact fractions, tracking three positions and finding each meeting by hand without ever using a closing speed, with the invariant above asserted after each of eighty legs and over a grid of thirty-two combinations of gap and speeds; and the geometric series was summed symbolically. The one check that failed on the first attempt was the naive one, asserting that a truncated sum equals twenty, and that failure is what put the paragraph about convergence into this article.

Comments · 0

Be the first to comment.