A naturalist's puzzle
Buffon is better known as a naturalist, the author of the many-volume Histoire naturelle. He posed the needle problem in 1733 and published the solution only in 1777, 44 years later.
A floor of equal boards, and a match as long as one board is wide. Drop it at random and count how often it crosses a seam. There are no circles anywhere, yet the share of crossings is 2/π. So thousands of drops give you the number π. Check it with a game, a million throws and five explanations.
The French naturalist Georges-Louis Leclerc, Comte de Buffon, posed the problem in 1733 and published the solution in 1777. It is one of the first problems in geometric probability. There is no paradox here. There is a surprise: a random experiment with no circle in sight produces the number π.
The floor is made of identical boards of width d. The seams between them form parallel lines spaced d apart.
The match, or needle, has length l no longer than d. We start with the simplest case: l = d, a match exactly as long as a board is wide.
The match lands at random. Its centre can end up anywhere and it can point in any direction. All positions and angles are equally likely.
What share of drops will cross a seam between boards? And how do you get π from that share?
"About half. And where would π come from, with no circles around?"
In fact 63.7% of drops cross a seam, exactly 2/π. The circle hides in the angle: the direction of the match is a point on a circle, and that is where π comes from.
Short matches (l < d) come up in round 3, long ones (l > d) in round 5.
A match as long as a board is wide. Lock in your answer before you start dropping.
Your answer will be compared with the right one here.
Each match lands in a random spot at a random angle. The ones that cross a seam light up. After every drop the estimate π = 2 · drops / crossings is updated.
The chance of a crossing is P = 2/π, so π = 2/P. For P we use the share of crossings you see on the floor.
Recent π estimates after each hundred drops:
The computer drops matches and recomputes the π estimate after every throw. The chart shows the estimate closing in on the true π. The band shows where the estimate lands in 95% of runs. It narrows slowly: 10 times narrower for every 100 times more throws.
Typical error of the π estimate after N throws:
An honest detail: the program doesn't use π to pick a random angle. It takes a random point in a square, throws away points outside a half-disc, and uses the direction to the rest.
Every drop can be described by two random numbers. The chance of a crossing then becomes the area of a shape under a sine curve, and that area is where π enters.
x: the distance from the centre of the match to the nearest seam, from 0 to d/2. θ: the angle between the match and the seams, from 0° to 90°. Both are uniform and independent. Half the match reaches sideways by (l/2)·sin θ. The match crosses a seam when that reach gets to it: x ≤ (l/2)·sin θ.
Bend a match or a wire any way you like. The average number of crossings depends only on its length: each tiny piece of wire acts like a tiny match, and averages add up. So the average equals c·L for some constant c. A ring of diameter d has length πd and always crosses the seams at exactly two points. Hence c·πd = 2, so c = 2/(πd). For a straight match of length d that gives 2/π.
| Throws | Typical error | Reliable decimals |
|---|
The share of crossings wobbles around 2/π, and its typical deviation shrinks like 1/√N. To get one more correct digit you need a 10 times smaller error, which takes 100 times more throws. That's why nobody computes π with matches: it's a way to see π, not to calculate it.
The integral of sine from 0 to π/2 equals 1, so the area under the curve is just l/2. The area of the whole rectangle contains π/2, because the angle runs from 0 to π/2. That denominator is where π appears.
What if the match is longer than a board? What if the floor is square tiles? And is it faster to find π by throwing points into a square? Every formula here is checked by simulation.
A long needle can cross several seams, so the chance of "at least one crossing" grows more slowly and heads towards 100%. The average number of crossings stays 2l/(πd). So you can estimate π with a needle of any length, as long as you count every crossing.
Each row has already been checked on 100,000 throws. "Again" runs a new batch. The "error" column is the typical error of the π estimate after 10,000 throws: the smaller it is, the faster the method converges.
| What we throw | Theory | π formula | Error | Simulation |
|---|
The most accurate is the square grid that Pierre-Simon Laplace studied: almost every throw crosses a line, and π is set by the small share of misses. The classic Monte Carlo method with points in a square converges faster than the needle on lines, but more slowly than the grid.
Buffon is better known as a naturalist, the author of the many-volume Histoire naturelle. He posed the needle problem in 1733 and published the solution only in 1777, 44 years later.
In 1901 the Italian Mario Lazzarini reported 3,408 drops of a needle (l/d = 5/6) with 1,808 crossings. That gives π ≈ 355/113 = 3.1415929, six correct decimals. Such accuracy from 3,408 drops is widely seen as rigged: the number of drops looks chosen to stop exactly at 355/113.
The fraction 355/113 was found by the Chinese mathematician Zu Chongzhi back in the 5th century. It gives π to six correct decimals. To reach that accuracy honestly with a needle you would need tens of trillions of drops.
In 1860 Joseph-Émile Barbier developed the "noodle" idea and proved that every curve of constant width w has perimeter πw. The argument is the one from round 4: such a curve dropped on parallel lines always gives two crossings, just like a circle.
Buffon's needle is often called one of the first examples of the Monte Carlo method: computing with random experiments. The name itself appeared in the 1940s at Los Alamos, where Stanislaw Ulam, John von Neumann and Nicholas Metropolis developed the method.
Pierre-Simon Laplace moved the problem to a grid of rectangles. For square tiles of side d and a needle of length d, the chance of crossing at least one line is 3/π ≈ 95.5%. You can check it in round 5.
Share your own explanation, an objection or a variant of the puzzle. Commenting needs a GitHub account.
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.