Analysis

Four bugs, one side each, and infinitely many turns

Four bugs sit at the corners of a square and each walks straight at the next. They spiral into the centre, circling it infinitely often, and yet each walks exactly one side of the square — no more. A curve can turn through an infinite angle and still have a finite length, and the pursuit shows why: every quarter-turn is the same picture shrunk by a fixed factor, so the turns go on for ever while their lengths add up like a geometric series.

Worth reading first: Which curves have a length at all · The curve that bends as far as it has gone.

The curve that bends as far as it has gone built Euler’s spiral, whose arms wind for ever into two points: infinitely long curves that end a finite distance away. This essay is about the opposite combination, which sounds more paradoxical and is easier to see. A curve of finite length that winds round a point infinitely many times.

It arises from a puzzle. Four bugs sit at the corners of a square table, and at the same moment each starts to walk, at the same steady speed, directly towards the bug on its left — not towards where that bug was, but towards wherever it is now, adjusting continuously. The four chase one another round and round, and all four meet in the centre. How far does each one walk? The answer is the side of the square, exactly; and on the way each bug circles the centre infinitely often. The essay computes the chase, draws the spiral at four magnifications to show why the turns never stop, counts them, and sets the four bugs beside the older curve of pursuit, a dog chasing a hare.

The chase stays a square

4 bugs chasing one another. n=4: path length 0.999988 simulated, 1.000000 exact.
Fig. 1 Four bugs start at the corners of a square with side 1, and each walks at the same speed directly towards the next. The dashed squares show them at three moments, always at the corners of a smaller, turned square, and each walks exactly 1 before they meet.

The first thing to see is that the bugs never stop forming a square. The arrangement starts symmetric under a quarter-turn about the centre — rotating the table by 90∘90^\circ carries each bug to the next — and the rule each bug follows is the same rule turned by 90∘90^\circ. So whatever happens to one bug happens to the next turned by a quarter, and at every moment the four are at the corners of a square, smaller than the original and rotated. The dashed squares in the figure show three such moments.

That symmetry turns a hard problem into an easy one. Look at one bug and the one it is chasing. The chaser moves straight along the line between them, at speed 1. The chased bug moves along the next side of the current square, which is perpendicular to that line. So its motion has no component towards or away from the chaser, and the distance between them shrinks at exactly the chaser’s speed, 1. They start one side apart, so they meet when each has walked one side. The figure’s numerical integration — a small-step solution of the four coupled equations of motion — agrees: 0.99999, with the remainder lost in the last microscopic steps.

None of this required knowing the shape of the path. The length came out of the rate at which one distance shrinks, which the length belongs to the journey would recognise: the length of a curve travelled at unit speed is the time the travelling takes, and the time is decided by the gap.

Six bugs walk twice as far

6 bugs chasing one another. n=6: path length 1.999977 simulated, 2.000000 exact.
Fig. 2 Six bugs on a regular hexagon of side 1, each walking at the next. The hexagon’s corners are less sharp, each bug’s target moves partly away from it, and each walks 2 before they meet.

The same argument works for any regular polygon, with one change. With nn bugs, the chased bug moves along the next side of the current nn-gon, which makes an angle of 2π/n2\pi/n with the line from the chaser — the polygon’s exterior angle. Its velocity therefore has a component cos⁡(2π/n)\cos(2\pi/n) away from the chaser along the line between them. The gap shrinks at speed 1−cos⁡(2π/n)1 - \cos(2\pi/n), and each bug walks

Ln=s1−cos⁡(2π/n)L_n = \frac{s}{1 - \cos(2\pi/n)}

before the bugs meet, where ss is the starting side. For a square the cosine is zero and L4=sL_4 = s. For a triangle the target moves partly towards the chaser, cos⁡(120∘)=−12\cos(120^\circ) = -\tfrac12, and L3=23sL_3 = \tfrac23 s: three bugs meet sooner. For a hexagon cos⁡60∘=12\cos 60^\circ = \tfrac12, and L6=2sL_6 = 2s. The figure shows the six spirals, each wider and more leisurely than the square’s, because each bug is chasing a target running half away from it.

The polygons stay regular for the same reason as before — the configuration and the rule share the polygon’s rotational symmetry — and every bug’s path is a copy of every other’s turned about the centre. That is why, in every one of these figures, one curve drawn and rotated is the whole picture.

The longer the polygon, the longer the chase

How far the bugs walk. 3:0.6667/0.6667 4:1.0000/1.0000 5:1.4472/1.4472 6:2.0000/2.0000 7:2.6559/2.6560 8:3.4142/3.4142 9:4.2743/4.2743 10:5.2360/5.2361 11:6.2993/6.2994 12:7.4640/7.4641
Fig. 3 The distance each bug walks for 3 to 12 bugs on a polygon of side 1: dots from the simulation, the curve from the formula, two thirds for a triangle, exactly 1 for a square, 2 for a hexagon, and the dashed curve n2/2π2n^2/2\pi^2 that it approaches.

The figure plots LnL_n for three to twelve bugs, the dots from integrating the motion and the curve from the formula, and they agree to four decimal places at every size. The distance grows quickly: 1.447 for a pentagon, 3.414 for an octagon, 7.464 for twelve bugs, all on polygons of side 1.

The growth has a simple explanation. With many bugs, the polygon is nearly a circle and each bug is chasing a neighbour almost alongside it, moving almost parallel to it; the gap closes very slowly, because the target is running nearly straight away. For small angles 1−cos⁡α≈α2/21 - \cos\alpha \approx \alpha^2/2, so Ln≈2s/(2π/n)2=n2s/(2π2)L_n \approx 2s/(2\pi/n)^2 = n^2 s/(2\pi^2), the dashed curve. In terms of the polygon’s size it is cleaner still: the perimeter is P=nsP = ns, and Ln≈nP/(2π2)L_n \approx nP/(2\pi^2), so each bug walks about n/20n/20 times the whole perimeter. A hundred bugs on a circle would each walk round it about five times before meeting.

The same picture at every magnification

The centre of the chase, magnified. square pursuit spiral r = r0 e^(-theta), r0 = 0.707107; panels magnified 1.000, 4.810, 23.141, 111.318.
Fig. 4 The four paths from a square, and the centre magnified by eπ/2=4.81e^{\pi/2} = 4.81 at each step: every magnification shows the same picture turned by a quarter.

What shape is each path? For the square, the chaser always moves along a side of the current square, and the side makes a fixed angle of 45∘45^\circ with the line from the bug to the centre. A curve that crosses every ray from a centre at the same angle is a logarithmic spiral — the equiangular spiral that Euler’s spiral’s essay drew from a curvature of 1/s1/s — and for 45∘45^\circ its equation in polar coordinates is r=r0e−θr = r_0 e^{-\theta}: every radian of turning shrinks the distance to the centre by a factor of ee. The figure’s first panel draws the four spirals from the closed form, which matches the simulation at every point checked.

The other panels magnify the centre by eπ/2=4.81e^{\pi/2} = 4.81, then by that again, then again. Each magnification shows the same picture turned by a quarter. That is the logarithmic spiral’s defining property, self-similarity: scaling it by eπ/2e^{\pi/2} is the same as rotating it by 90∘90^\circ. So there is no magnification at which the spiral stops turning and heads straight in; whatever is seen at one scale is seen again at every smaller one, turned. Since each quarter-turn brings the bug only a factor of 4.81 closer, it must make infinitely many quarter-turns to reach the centre.

And yet the length is finite, and the self-similarity says why. Each quarter-turn is the previous one shrunk by 4.81, so it is 4.81 times shorter. The lengths of the successive quarter-turns form a geometric series with ratio 1/4.811/4.81, and such a series has a finite sum, as the sum that fits in one square drew. Infinitely many turns, each a fixed fraction of the one before, add up to one side of the square.

The spiral is a complex exponential

The spiral can also be reached without any geometry, and the route explains why the answer is so clean. Put the centre of the square at the origin of the complex plane and write the four bugs as zz, iziz, −z-z and −iz-iz: a quarter-turn, which multiplying is turning identified with multiplication by ii, carries each bug to the next. The first bug walks towards the second, so its velocity points along iz−z=(i−1)ziz - z = (i - 1)z. If time is measured not in seconds but in a variable τ\tau that runs faster as the bugs close in, so that the speed is ∣i−1∣ ∣z∣|i - 1|\,|z| rather than 1, the equation of motion becomes

dzdτ=(i−1) z,\frac{dz}{d\tau} = (i - 1)\,z,

which is linear, and whose solution the curve that is its own slope would write down at once: z=z0 e(i−1)τ=z0 e−τeiτz = z_0\,e^{(i-1)\tau} = z_0\,e^{-\tau} e^{i\tau}. The factor eiτe^{i\tau} turns the bug round the centre at a steady rate and the factor e−τe^{-\tau} shrinks its distance at a steady proportional rate. That is a logarithmic spiral, and its two rates are equal because the real and imaginary parts of i−1i - 1 have equal size — which is the 45∘45^\circ angle again, now as arithmetic. For nn bugs the multiplier is e2πi/n−1e^{2\pi i/n} - 1 instead, its real and imaginary parts are cos⁡(2π/n)−1\cos(2\pi/n) - 1 and sin⁡(2π/n)\sin(2\pi/n), and their ratio sets how tightly that spiral winds: flatter for many bugs, whose spirals sweep wide arcs before closing in.

The reparametrisation is the one honest trick in this. In the variable τ\tau the bugs never arrive — e−τe^{-\tau} is never zero — and in real time they arrive at a definite moment, because real time is τ\tau slowed down in proportion to the shrinking distance, and the integral of e−τe^{-\tau} over all τ\tau is finite. Two numbers decide the flow classified linear flows in the plane by the two numbers of their matrix, and the bugs’ flow is a stable spiral, the case where the trajectories wind into the origin; the pursuit simply runs along it at a constant speed instead of an exponentially decaying one, and so reaches the centre in finite time with finite length.

Three turns to a nanometre

Infinitely many turns, very slowly. 1e-1: 0.311, 1e-2: 0.678, 1e-3: 1.044, 1e-4: 1.411, 1e-5: 1.777, 1e-6: 2.144, 1e-7: 2.510, 1e-8: 2.877, 1e-9: 3.243; simulated angle 16.165 to r=6.72e-8
Fig. 5 For four bugs on a square of side 1 metre, the number of full turns each has made round the centre by the time it is within a given distance of it. Getting within a nanometre takes 3.24 turns, and the total is infinite.

“Infinitely many turns” sounds like a lot of turning, and the figure shows how little it is in practice. On a table one metre square, each bug starts 0.7070.707 metres from the centre. By r=r0e−θr = r_0 e^{-\theta}, the angle it has turned when it is within rr of the centre is ln⁡(r0/r)\ln(r_0/r) radians. Coming within ten centimetres takes a third of a turn; within a millimetre, just over one turn; within a nanometre — roughly the width of ten atoms — 3.24 turns. Each additional full turn brings the bug a factor of e2π≈535e^{2\pi} \approx 535 closer.

So the turning is logarithmic in the distance, which is to say, very slow. The bugs would need fewer than thirteen turns to come within the Planck length of the centre, and they do make those turns, and infinitely many more, all within the final unmeasurably small fraction of their walk. The simulation tracks the turning down to a distance of less than a ten-millionth and finds the accumulated angle equal to ln⁡(r0/r)\ln(r_0/r) to within a hundredth of a radian. Real bugs have bodies and would collide long before; mathematical bugs are points and do not.

This is the sharpest version of a distinction which curves have a length at all drew: a curve’s length and how much it winds are independent. A curve can wiggle infinitely often and have infinite length, like the graphs in that essay; it can also turn infinitely often and have finite length, provided the turns shrink fast enough. What decides length is the sum of the pieces, and a geometric series can be summed however many terms it has.

Bugs that look, then step

Bugs that look, then step. h=0.2: 2.00000 in 10 steps; h=0.1: 1.50000 in 15 steps; h=0.05: 1.25000 in 25 steps; h=0.02: 1.12000 in 56 steps; h=0.01: 1.07000 in 107 steps; h=0.005: 1.04500 in 209 steps; h=0.002: 1.01400 in 507 steps; h=0.001: 1.00800 in 1008 steps
Fig. 6 Bugs that look at their target, walk a fixed step straight towards where it was, and look again, from the corners of a unit square. The polygonal paths at three step sizes, and the distance each bug walks, approaching 1 as the step shrinks.

The continuous chase is an idealisation, and a real pursuer looks, moves and looks again. The figure replaces each bug by one that takes steps of a fixed length hh straight towards where its target was at the start of the step. With large steps the paths are coarse polygons that overshoot and cut corners; as hh shrinks they approach the smooth spirals. The distance each bug walks before the four are within one step of each other comes out at 2.0 for steps of a fifth, 1.07 for steps of a hundredth, 1.008 for a thousandth — approaching 1.

That convergence is not automatic, and the staircase that is not the diagonal is the warning. There, a sequence of staircases converged to the diagonal of a square point by point, and their lengths stayed at 2 while the diagonal’s is 2\sqrt2: lengths need not follow shapes to the limit. The stepping bugs avoid the trap because their steps point in nearly the right direction — each step is along the true direction of pursuit at its start — and length depends on direction. The staircase’s steps were always horizontal or vertical, never along the diagonal, and that is why its length never converged. The pursuit’s discretisation is honest; the staircase’s is not.

A dog and a hare

A dog chasing a hare along a straight line. k=1: gap 0.5000; k=1.5: caught after 1.7999; k=2: caught after 1.3334
Fig. 7 A hare runs straight up the dashed line and a dog starting one unit away always runs straight at it. A faster dog catches the hare after running k2/(k2−1)k^2/(k^2 - 1); a dog exactly as fast settles in half the starting distance behind.

The bugs’ problem was posed by Édouard Lucas in 1877, about three dogs at the corners of a triangle, and solved by Henri Brocard the same year. It is a descendant of an older question. In 1732 Pierre Bouguer asked what path a ship takes when it pursues another ship sailing a straight course, always steering straight at it — the curve of pursuit. The figure poses it as a dog chasing a hare. The hare runs along a straight line at speed 1; the dog starts one unit to the side, runs kk times as fast, and always heads straight at the hare.

If the dog is faster, k>1k > 1, it catches the hare, and the distance it runs is k2/(k2−1)k^2/(k^2 - 1) times the starting distance: 1.8 for a dog half as fast again, 43\tfrac43 for one twice as fast. The figure’s simulation agrees to three decimal places. The formula has the same flavour as the bugs’: the length comes from a rate of closure, here not constant, but with an integral that can be done exactly. And it shows the pursuit’s inefficiency: a dog that ran straight to the point of capture, knowing the hare’s course, would run k/k2−1k/\sqrt{k^2 - 1}, which for k=2k = 2 is 1.1551.155 against 1.3331.333.

If the dog is exactly as fast, it never catches the hare. It falls in behind it on the same line and the gap shrinks towards a limit — exactly half the starting distance, which the simulation reproduces as 0.500. The dog closes half the gap and then can never close the rest, because once it is behind the hare, running straight at it is running in the same direction at the same speed.

What the simulation cannot settle

Every figure here integrates the motion numerically, with a step small enough that its results agree with the closed-form lengths to four or five decimal places, and the closed forms are what the figures check against. But a numerical solution stops: the simulated bugs are halted when they are a hundred-thousandth of a unit apart, and the spiral beyond that is drawn from the formula r=r0e−θr = r_0 e^{-\theta}, not computed. The infinitely many turns are a consequence of the formula, and no simulation can display them; the magnified panels show four of them, and the argument from self-similarity supplies the rest.

The model also hides an assumption that is worth stating. The bugs are points moving at exactly equal speeds and perfectly symmetric starting positions. Perturb one bug’s speed or position slightly and the symmetry is broken; the polygon is no longer regular, and the bugs no longer meet at one moment at the centre. The chase still ends in a meeting for the square in practice, but the clean formula is a property of the symmetric case, and how the general case behaves is a harder question.

Still open: bugs that start anywhere

For symmetric starts the problem is solved completely. For arbitrary starting positions — nn bugs anywhere in the plane, each chasing the next in a fixed cyclic order — much less is known. Do they always end up meeting at a single point? Do they always meet at the same time, all at once, or can some pairs collide first, after which the rule is undefined? It is known that for some starting positions a bug can reach its own target before the whole group meets — a partial collision, after which the rule says nothing — so the clean ending of the symmetric case is not guaranteed. Which starting positions end in a single simultaneous meeting, and whether the bugs’ polygon must approach a regular shape as it shrinks, have been studied for small numbers of bugs and are not settled in general. It is the kind of question that the symmetry argument, which did all the work here, has nothing to say about.

A geometric series that winds

Four bugs on a square, each walking straight at the next, meet in the centre after walking exactly one side, because each moves perpendicular to its pursuer and the gap closes at full speed. For nn bugs the distance is 1/(1−cos⁡(2π/n))1/(1 - \cos(2\pi/n)) sides — two thirds for a triangle, two for a hexagon, about n2/2π2n^2/2\pi^2 for many. The square’s paths are logarithmic spirals that look the same at every magnification, so they circle the centre infinitely often, 3.24 times before coming within a nanometre on a one-metre table; yet each quarter-turn is 4.81 times shorter than the last, so the turns add up like a geometric series to a finite length. A curve can turn through an infinite angle in a finite distance, and the bugs walk one.

Shares its objects with

Essays that name at least two of the same things, and that neither author linked.

Named objects

A dashed tag is an object no other essay names yet.

Arc lengthDifferential equationGeometric seriesLimitLogarithmic spiralSelf-similarity