Library · Geometric Probability · Chapter 53
Buffon’s needle
Problem 53.1
A plane is ruled with parallel lines at equal spacing . A needle of length is dropped “at random” on the plane. What is the probability that the needle crosses one of the lines?
Solution. By translation symmetry, the needle’s position is determined by two parameters:
, the distance from the needle’s centre to the nearest line, uniform on ;
, the angle the needle makes with the lines, uniform on (by symmetry).
The needle crosses the nearest line iff the needle’s centre is within of that line, i.e., iff . Hence The integral equals , so
Buffon raised the franc-carreau coin-on-tiles problem in 1733, which marks the birth of geometric probability; the needle problem itself came later, in the work usually cited from his 1777 Essai d’arithmétique morale. A Monte Carlo consequence: if one tosses a needle many times and computes the empirical crossing frequency , then . Mario Lazzarini reported in 1901 an experiment yielding , an absurdly good result that is today suspected to have been selected from a larger run of trials.
import numpy as np
L, d, N = 0.8, 1.0, 10**7
theta = np.random.rand(N) * np.pi/2
y = np.random.rand(N) * d/2 # centre to nearest line
p = (y <= L/2 * np.sin(theta)).mean()
print(f"sim: {p:.5f} exact: {2*L/(np.pi*d):.5f}")
# sim: 0.50946 exact: 0.50930