Math paradoxes

The coastline paradox A ruler half as long. How much longer is the coast?About 19% longer, every time.

The west coast of Great Britain is measured on a detailed map with a pair of dividers: the legs are set 100 km apart on the map's scale, and the dividers walk along the coast. Then the legs are set to 50 km and the same coast is walked again. By what percentage is the coast longer the second time? Lock in your answer, then check it: walk an island with dividers yourself, look at Richardson's plot and read the explanation.

The west coast of Great Britain is measured with dividers set to 100 km, then to 50 km. It feels as if a coast has some length of its own and the second measurement only refines it a little. In fact, according to Lewis Fry Richardson's data, each halving of the step adds about 19%, and the length never settles on any number. Every bay has smaller bays of its own, and a shorter step goes into them each time.

Make a guess
+19 %for every halving of the step
L ~ ε1−DRichardson's law
D ≈ 1.25west of Britain
The puzzle

One coast, two pairs of dividers

This is how lengths have been measured on maps for centuries: the dividers step along a line, and the steps are multiplied by their length. Try answering in your head first, then walk the coast yourself.

  1. 1

    A detailed map

    On the table is a large, detailed map of the west coast of Great Britain, with every bay, headland and rock you can make out on it.

  2. 2

    A 100 km step

    The legs of the dividers are set 100 km apart on the map's scale. One leg goes on the coast, the other swings forward onto the coast too, and so on, step by step, to the end of the coast. The coast's length is the number of steps times 100 km.

  3. 3

    A 50 km step

    Then the legs are brought in to half, 50 km, and the same coast is walked just as carefully.

  4. 4

    The question

    By what percentage is the coast longer in the second measurement than in the first?

Intuition says

"A coast has a length of its own. A shorter step follows the bends a little more closely: a per cent or two, and after that almost nothing changes"

In fact the coast gets about 19% longer. With a 25 km step it grows by about as much again, and again with 12.5 km. Not every line behaves like this: a circle or a straight road barely changes. But a coast keeps showing a shorter step new bays.

What we assume

  • The map is detailed enough: its small bends are smaller than both steps.
  • Both legs of the dividers always land exactly on the coastline.
  • The steps are counted honestly, from one end of the coast to the other, none skipped.
  • We compare two lengths: steps × 100 km and steps × 50 km.
one step land sea
Round 1 · Guess

How much longer will the coast be?

Pick an answer from the rows under the slider or type a number: by what percentage the coast measured with a 50 km step is longer than the one measured with a 100 km step.

Your answer will be compared with the right one here.

Hints

Hard to decide? Open the hints one at a time: the easy one first, then stronger ones.

Next: the solution

Next comes the explanation, with spoilers

The next rounds measure coasts: you walk an island with dividers yourself, the computer measures dozens of islands and a circle, and then comes the explanation. Answer round 1 first, or go on?

You chose to always show all rounds.

Round 2 · Try it yourself

Walk an island with dividers

This is a made-up island about as wide as Great Britain, with coves within coves. Pick a step for the dividers and press "Walk": the orange chain shows every step. Zoom into a bay to see where a short step goes. For comparison, switch to a round island.

This measurement

Every step on this island

The last column: how many times longer the coast is than with a step twice as long. On the round island it soon becomes 1.00; on the ragged one it stays around 1.2.

Round 3 · Simulation

Richardson's plot: dozens of islands and a circle

The computer builds 12 random islands of two kinds: smoother and more ragged, roughly like the coasts Richardson measured. It walks each island with dividers at seven steps, from 200 km down to 3 km, and also a round island of radius 400 km. Both axes of the plot are logarithmic: each gridline multiplies rather than adds.

Coast length against the step

ragged islands, D = 1.25 smoother islands, D = 1.13 circle law with slope 1 − D

One of the islands

Ragged: step halved, the coast
–
Smoother: step halved, the coast
–
Circle: from 100 to 3 km
–

Average lengths

The circle soon reaches 2π × 400 ≈ 2513 km and stays there. The islands don't stop: their dots lie on straight lines rising to the left. The slope of the line is 1 − D. For a single island the growth jumps around from step to step, as in real measurements, but on average it stays constant. The averages here are geometric, since the changes multiply rather than add.

Once you answer, the simulation code appears here so you can run it yourself.

Check it yourself in code

The same simulation, short and with no libraries. Run the JavaScript in your browser console (F12) or in Node; the Python needs only the standard library.

JavaScript
// Random islands with fractal dimension D: every side becomes 4 copies of length r with a bump into the sea or the land, 4 · r^D = 1.
// Each island is walked with dividers at several steps, and the growth in length is compared with Richardson's law 2^(D−1).
const KM = 400, D = 1.25, ISLANDS = 100, STEPS = [100, 50, 25, 12.5];
function island(D) {
  const r = Math.pow(4, -1 / D), hb = (1 - 2 * r) / 2, h = Math.sqrt(r * r - hb * hb);
  let P = [];
  for (let i = 0; i < 7; i++) { const a = 2 * Math.PI * i / 7 + (Math.random() - .5) * .5, rad = 1 + (Math.random() - .5) * .45; P.push([Math.cos(a) * rad, Math.sin(a) * rad]); }
  for (let d = 0; d < 5; d++) {
    const Q = [];
    for (let i = 0; i < P.length; i++) {
      const A = P[i], B = P[(i + 1) % P.length], ux = B[0] - A[0], uy = B[1] - A[1], s = Math.random() < .5 ? 1 : -1;
      Q.push(A, [A[0] + r * ux, A[1] + r * uy], [A[0] + .5 * ux + s * h * uy, A[1] + .5 * uy - s * h * ux], [A[0] + (1 - r) * ux, A[1] + (1 - r) * uy]);
    }
    P = Q;
  }
  return P;
}
// dividers: the next leg lands where the coast first leaves the circle of radius eps around the last one
function measure(P, eps) {
  const n = P.length; let cx = P[0][0], cy = P[0][1], i = 0, steps = 0;
  for (;;) {
    let k = i;
    for (; k < n; k++) { const B = P[(k + 1) % n]; if ((B[0] - cx) ** 2 + (B[1] - cy) ** 2 >= eps * eps) break; }
    if (k === n) return steps * eps + Math.hypot(P[0][0] - cx, P[0][1] - cy);
    const A = k === i ? [cx, cy] : P[k], B = P[(k + 1) % n], ex = B[0] - A[0], ey = B[1] - A[1], fx = A[0] - cx, fy = A[1] - cy;
    const a = ex * ex + ey * ey, b = 2 * (ex * fx + ey * fy), c = fx * fx + fy * fy - eps * eps;
    const t = (-b + Math.sqrt(Math.max(0, b * b - 4 * a * c))) / (2 * a);
    cx = A[0] + t * ex; cy = A[1] + t * ey; i = k; steps++;
  }
}
const logs = STEPS.map(() => 0);
for (let j = 0; j < ISLANDS; j++) {
  const P = island(D);
  STEPS.forEach((e, i) => { logs[i] += Math.log(measure(P, e / KM) * KM) / ISLANDS; });
}
STEPS.forEach((e, i) => console.log('step', e, 'km: average length', Math.exp(logs[i]).toFixed(0),
  i ? ', growth +' + (100 * (Math.exp(logs[i] - logs[i - 1]) - 1)).toFixed(1) + '%' : ''));
const per = Math.exp((logs[STEPS.length - 1] - logs[0]) / (STEPS.length - 1));
console.log('Step halved, on average: ×' + per.toFixed(3), 'Richardson\'s law 2^(D−1) =', Math.pow(2, D - 1).toFixed(3));
// for comparison, a circle of radius 400 km: the length settles at 2πr
const C = Array.from({ length: 4096 }, (_, i) => [Math.cos(2 * Math.PI * i / 4096), Math.sin(2 * Math.PI * i / 4096)]);
console.log('Circle, steps of 100 and 50 km:', (measure(C, 100 / KM) * KM).toFixed(1), (measure(C, 50 / KM) * KM).toFixed(1), '2πr =', (2 * Math.PI * KM).toFixed(1));
Python
# Random islands with fractal dimension D: every side becomes 4 copies of length r with a bump into the sea or the land, 4 · r^D = 1.
# Each island is walked with dividers at several steps, and the growth in length is compared with Richardson's law 2^(D−1).
import math, random

KM, D, ISLANDS, STEPS = 400, 1.25, 100, [100, 50, 25, 12.5]

def island(D):
    r = 4 ** (-1 / D)
    hb = (1 - 2 * r) / 2
    h = math.sqrt(r * r - hb * hb)
    P = []
    for i in range(7):
        a = 2 * math.pi * i / 7 + (random.random() - .5) * .5
        rad = 1 + (random.random() - .5) * .45
        P.append((math.cos(a) * rad, math.sin(a) * rad))
    for _ in range(5):
        Q = []
        for i, A in enumerate(P):
            B = P[(i + 1) % len(P)]
            ux, uy = B[0] - A[0], B[1] - A[1]
            s = 1 if random.random() < .5 else -1
            Q += [A, (A[0] + r * ux, A[1] + r * uy), (A[0] + .5 * ux + s * h * uy, A[1] + .5 * uy - s * h * ux),
                  (A[0] + (1 - r) * ux, A[1] + (1 - r) * uy)]
        P = Q
    return P

# dividers: the next leg lands where the coast first leaves the circle of radius eps around the last one
def measure(P, eps):
    n = len(P)
    cx, cy = P[0]
    i = steps = 0
    while True:
        k = i
        while k < n:
            B = P[(k + 1) % n]
            if (B[0] - cx) ** 2 + (B[1] - cy) ** 2 >= eps * eps:
                break
            k += 1
        if k == n:
            return steps * eps + math.hypot(P[0][0] - cx, P[0][1] - cy)
        A = (cx, cy) if k == i else P[k]
        B = P[(k + 1) % n]
        ex, ey, fx, fy = B[0] - A[0], B[1] - A[1], A[0] - cx, A[1] - cy
        a, b, c = ex * ex + ey * ey, 2 * (ex * fx + ey * fy), fx * fx + fy * fy - eps * eps
        t = (-b + math.sqrt(max(0, b * b - 4 * a * c))) / (2 * a)
        cx, cy = A[0] + t * ex, A[1] + t * ey
        i, steps = k, steps + 1

logs = [0.0] * len(STEPS)
for _ in range(ISLANDS):
    P = island(D)
    for i, e in enumerate(STEPS):
        logs[i] += math.log(measure(P, e / KM) * KM) / ISLANDS
for i, e in enumerate(STEPS):
    grow = f", growth +{100 * (math.exp(logs[i] - logs[i - 1]) - 1):.1f}%" if i else ""
    print("step", e, "km: average length", f"{math.exp(logs[i]):.0f}", grow)
per = math.exp((logs[-1] - logs[0]) / (len(STEPS) - 1))
print("Step halved, on average:", f"×{per:.3f}", "Richardson's law 2^(D−1) =", f"{2 ** (D - 1):.3f}")
# for comparison, a circle of radius 400 km: the length settles at 2πr
C = [(math.cos(2 * math.pi * i / 4096), math.sin(2 * math.pi * i / 4096)) for i in range(4096)]
print("Circle, steps of 100 and 50 km:", f"{measure(C, 100 / KM) * KM:.1f}", f"{measure(C, 50 / KM) * KM:.1f}", "2πr =", f"{2 * math.pi * KM:.1f}")
Round 4 · Explanations

A shorter step finds new bays

Intuition pictures a coast as a smooth line that the dividers only "cut" a little at the bends. But a real coast is broken at every scale: a bay has smaller bays, they have coves, by the coves there are rocks. Each shorter step goes around what the longer one jumped over.

In plain wordspictures, analogies, small numbers

“In plain words” is hidden on all puzzles.

Under a magnifier

One bay, three steps

100 km step 50 km step 25 km step

This is a piece of the island from round 2, magnified four times. The black 100 km step jumps straight across the bay as if it weren't there. The orange 50 km step goes inside but misses the smaller coves. The blue 25 km step goes around those too, but skips still smaller ones. This card explains why the coast gets longer, not yet why by 19%: that comes under "Strictly".

Bays within bays

Magnify a piece of coast and it looks like the whole coast

On the left is one side of the island, next a piece of it magnified about three times, then a piece of that piece magnified about 9 times. They differ, but they are equally ragged. So each shortening of the step runs into new bends, always in the same proportion, and the coast gets longer by about the same share each time.

For comparison

Magnify a circle and it straightens out

stepcircle of radius 400 km
200 km2,487 km
100 km2,507 km
50 km2,512 km
25 km2,513 km
2πr2,513.3 km

A smooth line under a magnifier becomes almost straight, and a step half as long finds nothing new on it: from 100 to 50 km the circle grows by only 0.2%. That is what intuition counts on. A coast is different: magnifying it doesn't make it any smoother.

Rigoroustables, charts, formulas

“Rigorous” is hidden on all puzzles.

A power law

L(ε) ≈ M · ε1−D

Richardson plotted the lengths measured with different steps ε and found that for each coast or border they follow the law L(ε) ≈ M · ε1−D, where M and D are constants of that line. For a circle D = 1, and the length does not depend on the step. The bigger D, the faster the length grows as the step shrinks.

A step half as long multiplies the length by (½)1−D = 2D−1, whatever the step itself is. So the growth is the same from 100 to 50 km as from 50 to 25 km:

lineDstep ÷ 2
circle, straight line1+0 %
coast of South Africa1.02+1.4%
coast of Ireland1.20+14.9%
west coast of Britain1.25+18.9%
Koch curve (round 5)1.26+19.9%
coast of Norway with its fjords1.52+43%

D values from Richardson's data as quoted by Mandelbrot in his 1967 paper.

How to read the plot

On logarithmic axes the law becomes a straight line

step ×2 length ÷1.19 coast, slope −0.25 circle, slope 0 step ε, log scale → L

A turns multiplying into adding: log L = log M + (1 − D) · log ε. So on axes where every gridline multiplies by the same number, a power law becomes a straight line with slope 1 − D. For a circle the slope is 0; for the west of Britain, −0.25. Hence Richardson's recipe: measure a coast with several steps, draw a line through the points, D = 1 − slope.

The line has no ceiling: if Britain's law held all the way down to a 1 m step, the coast would come out about 17.8 times longer than with a 100 km step. In practice the law is checked only over the scales where the measured dots really lie on a line.

For formula lovers

Steps, length and dimension

The number of divider steps grows as the step shrinks, as a power with exponent D.

N(ε)≈Mε−D,L(ε)=N(ε)ε≈Mε1−D

A step half as long: the factor does not depend on ε.

L(ε/2)L(ε)=2D−1,D=1.25:20.25≈1.189

Take logarithms and the law becomes a line; D is read from the slope.

logL=logM+(1−D)logε,D=1−slope

A self-similar line made of n copies, each scaled by r: the similarity dimension.

nrD=1,DKoch=log4log3≈1.2619

Intuition silently assumes that N(ε) grows like 1/ε, that is, D = 1, as for a circle. Then N(ε) · ε tends to a constant, and that constant is what we call the length. For a coast the exponent is bigger than 1, and the product N · ε grows without end.

Deepergeneralisations, theory, history

“Deeper” is hidden on all puzzles.

Fractal dimension

Between a line and an area

A segment is made of 2 halves, each half the size: 2 × (½)1 = 1, dimension 1. A square is made of 4 small squares, each half the size: 4 × (½)2 = 1, dimension 2. The Koch curve is made of 4 copies, each a third of the size: 4 × (⅓)D = 1 gives D = log 4 / log 3 ≈ 1.26. This curve is "more" than a line but "less" than an area.

The islands on this page are built the same way: each side is replaced by 4 copies, each 0.33 times the size, each one bulging into the sea or into the land at random. The copies' length is chosen so that 4 × 0.33D = 1 at D = 1.25. A real coast has no exact self-similarity, only a statistical one: a piece is on as ragged as the whole. Mandelbrot named such objects fractals in 1975.

Richardson and Mandelbrot

From a border dispute to a new geometry

Lewis Fry Richardson, a meteorologist and a Quaker, was looking at whether the chance of war between neighbours depends on the length of their shared border. Collecting data, he saw that different countries' reference books gave very different lengths for the same borders: 987 and 1,214 km for the border between Spain and Portugal. He remeasured coasts and borders with different steps and found the power law. Richardson died in 1953, and the paper came out in 1961, as an appendix to his "Statistics of Deadly Quarrels".

Hardly anyone noticed these plots until Benoit Mandelbrot read a dimension D in them and published "How Long Is the Coast of Britain?" in Science in 1967. In 1982 his book "The Fractal Geometry of Nature" came out, and the word "fractal" became commonplace.

Round 5 · Going further

A snowflake, scale and reference books

Mathematicians build a perfect coast from a rule, and it has an infinite perimeter around a finite area. For real coasts the conclusion is simple: a length without the measuring step is not a number.

The Koch snowflake

Perimeter, in triangle perimeters
Area, in triangle areas

The maths

Infinite perimeter, finite area

In 1904 Helge von Koch described a curve with no tangent at any point. At each step the middle third of every side is replaced by two sides of a triangle: there are four times as many sides, each a third as long, so the perimeter is multiplied by 4/3. After n steps it is (4/3)n of the original and grows without bound. The area, meanwhile, tends to 8/5 of the triangle's area: the new triangles keep getting smaller, and their sum is a geometric series.

For the snowflake, Richardson's "coast" is exact: a step a third as long gives exactly 4/3 of the length, that is ε1−D with D = log 4 / log 3. For real coasts, D is more often estimated by box counting: lay a grid with spacing s over the map and count the boxes the coast touches. There are about s−D of them.

The logic

A quantity that depends on scale means nothing without the scale

The round 2 island, 200 km step
–
only big headlands show
The same island, 6 km step
–
An honest record
L at ε
or D plus the length at one step

Both numbers are right, because they answer different questions. "The length of a coast" without the measuring step is like "speed" without saying over what time it was taken: over an hour's drive and over a second of overtaking you get different numbers. Only lengths measured with the same step can be compared, and for "how much coast a country has", D is more useful, since it does not depend on the step.

The same goes for a GPS track of a run: the watch drops a point every few seconds, and that is its divider step. The more often the points, the more small turns (and small jitter of the GPS itself) enter the sum, and the same route shows a longer distance.

In practice

Reference books disagree by multiples

Coastline lengths from the CIA World Factbook and the World Resources Institute (WRI), as collected in Wikipedia's "List of countries by length of coastline". WRI used the World Vector Shoreline database at 1 : 250,000; the CIA's scale is not stated. Whoever measured in more detail got more, and the leader differs from country to country.

CountryCIAWRIlarger / smaller
Finland1,250 km31,119 km×25
Australia25,760 km66,530 km×2.6
Ukraine2,782 km4,953 km×1.8
United Kingdom12,429 km19,717 km×1.6
Norway83,281 km53,199 km×1.6

Norway's mapping authority, Kartverket, gives yet another number: 100,915 km including islands (2012 data in Statistics Norway's yearbook). The Spain–Portugal border Richardson started from differed by 23% between the two countries' reference books: 987 and 1,214 km. Check it yourself: measure your favourite river on a map at different zooms.

Bonus · At work

Where this shows up at work

Real situations from marketing, analytics, product and business where the same maths applies. Only known data, research and plain calculations you can check.

Analytics

The number of sessions depends on the timeout

The situation
Google Analytics 4 ends a session after 30 minutes of inactivity. The timeout can be set from 5 minutes to 7 hours 55 minutes, and other analytics tools have their own rules. Someone opens an article, steps away for 40 minutes and comes back.
The trap
With a 30-minute timeout that's two sessions; with 60 minutes, one. The timeout works like the divider step: the number of sessions, session conversion, pages per session and average duration all depend on it. Comparing GA with product analytics, or a month before and after a settings change, compares coasts measured with different steps.
How to plan for it
Compare only metrics with the same definition, and write the timeout next to the number. For decisions use person-level metrics (the share of users who bought), which depend less on this step.

Source: Google Analytics Help, "Adjust session timeout".

Performance marketing

How many new users depends on how you recognise a person

The situation
Since 2019 (ITP 2.1) Safari limits cookies set by JavaScript on the page to 7 days, and that is how the standard Google Analytics tag works. Someone who comes back through Safari every 10 days looks like a new user every time.
The trap
A "user" depends on the ruler: a cookie, a device or an account. The same person on a phone and a laptop is two users by cookie and one by account. "New users", the cost per new user and channel comparisons all depend on this choice, since channels differ in their share of Safari.
How to plan for it
Count key metrics by account (the ID after sign-in) where you can. The cookie-based count of "new users" is usually inflated, so compare channels and periods only with the same way of recognising a person.

Source: WebKit, "Intelligent Tracking Prevention 2.1", February 2019.

Product and entrepreneurship

An estimate grows when you break the task down

The situation
Justin Kruger and Matt Evans asked people how long a multi-step task would take, such as formatting a document or doing holiday shopping. Those who listed the steps first gave longer and more accurate estimates than those who estimated the whole task at once.
The trap
A coarse plan misses the small bays: integrations, reviews, fixes, tests. So a project estimated "in big blocks" and one estimated "task by task" can't be compared, like coast lengths at different steps. And each new level of detail finds a bit more work.
How to plan for it
Compare estimates made at the same level of detail. For deadlines that matter, break the work into steps, and keep a buffer for whatever is finer than your step.

Source: Justin Kruger, Matt Evans, "If you don't want to be late, enumerate: Unpacking reduces the planning fallacy", Journal of Experimental Social Psychology, 2004.

Bonus · Fun facts

Things to tell your friends

987 and 1,214

One border, two numbers

Spain gave the length of its border with Portugal as 987 km, and Portugal as 1,214 km. This discrepancy led Richardson to the idea that a length depends on the measuring step.

1961

A discovery published after death

Richardson, a pacifist who served as an ambulance driver in the First World War, wanted to understand the causes of wars through mathematics. His law for coasts was printed in 1961, eight years after his death, in an appendix to his work on the statistics of wars.

1967

Three pages in Science

Mandelbrot's paper "How Long Is the Coast of Britain?" came out on 5 May 1967 and ran to pages 636–638. The word "fractal" is not in it yet: Mandelbrot coined it in 1975, from the Latin fractus, "broken".

1904

A snowflake without tangents

The Swedish mathematician Helge von Koch devised his curve as an example of a continuous line that has a tangent at no point. Its perimeter is infinite, yet its area is only 8/5 of the starting triangle's.

100,915 km

Norway two and a half times around the Earth

That is Kartverket's figure for Norway's coasts with fjords and islands, 71,963 km of it on islands. It is 2.5 times the Earth's equator, 40,075 km.

1954

The Vistula a thousand times longer

Before Richardson's paper, the Polish mathematician Hugo Steinhaus wrote that the left bank of the Vistula, measured ever more precisely, would give lengths ten, a hundred and even a thousand times those read off a school map.

Discussion

What do you think?

Share your own explanation, an objection or a variant of the puzzle. You need a GitHub account to comment.

Is “Advanced” the right level for this puzzle?

Thank you! This helps set the levels right.

Newsletter

New puzzles, explanations and discussions

I keep adding new puzzles, new ways to explain them and write-ups of the discussions they start. Leave your email and I'll write when something new is out. No spam, one-click unsubscribe.

The sign-up form will appear here soon.