Library · Geometric Probability · Chapter 54

Laplace’s extension of Buffon

Revised Report an error

Problem 54.1

A plane is ruled with both horizontal and vertical parallel lines, forming a square grid of side dd. A needle of length ℓ≤d\ell \leq d is dropped at random. What is the probability that the needle crosses at least one line?

Solution. Let pp be the probability that the needle crosses a horizontal line, and qq the probability it crosses a vertical line. Buffon’s calculation (Chapter 53) gives p=q=2ℓπdp = q = \tfrac{2 \ell}{\pi d}.

We want the probability of any crossing. By inclusion–exclusion, P(any crossing)=p+q−P(both).\mathbb{P}(\text{any crossing}) = p + q - \mathbb{P}(\text{both}).

To compute P(both)\mathbb{P}(\text{both}), parametrise as in Chapter 53: let θ∈[0,π/2]\theta \in [0, \pi/2] be the angle with the horizontal, uniform, and let (u,v)(u, v) be the location of the needle’s centre inside a single tile, uniform in [0,d]2[0, d]^2. The needle crosses a horizontal line iff min⁡(v,d−v)≤ℓ2sin⁡θ\min(v, d - v) \leq \tfrac{\ell}{2} \sin\theta, an event of vv-probability ℓsin⁡θd\tfrac{\ell \sin\theta}{d} (since this uses both sides of the tile). Similarly it crosses a vertical line with uu-probability ℓcos⁡θd\tfrac{\ell \cos\theta}{d}. Conditioned on θ\theta, these are independent events, so P(both∣θ)=ℓ2sin⁡θcos⁡θd2=ℓ2sin⁡(2θ)2d2.\mathbb{P}(\text{both} \mid \theta) = \frac{\ell^2 \sin\theta \cos\theta}{d^2} = \frac{\ell^2 \sin(2\theta)}{2 d^2}. Averaging over θ\theta uniform on [0,π/2][0, \pi/2]: P(both)=2π∫0π/2ℓ2sin⁡(2θ)2d2 dθ=ℓ2πd2∫0π/2sin⁡(2θ) dθ=ℓ2πd2.\begin{align*} \mathbb{P}(\text{both}) &= \frac{2}{\pi} \int_0^{\pi/2} \frac{\ell^2 \sin(2\theta)}{2 d^2} \, d\theta \\ &= \frac{\ell^2}{\pi d^2} \int_0^{\pi/2} \sin(2 \theta) \, d\theta = \frac{\ell^2}{\pi d^2}. \end{align*}

Therefore P(any crossing)=2ℓπd+2ℓπd−ℓ2πd2=4ℓπd−ℓ2πd2,\mathbb{P}(\text{any crossing}) = \frac{2 \ell}{\pi d} + \frac{2 \ell}{\pi d} - \frac{\ell^2}{\pi d^2} = \frac{4 \ell}{\pi d} - \frac{\ell^2}{\pi d^2}, which simplifies to P(any crossing)=ℓ(4d−ℓ)πd2.■\boxed{\mathbb{P}(\text{any crossing}) = \frac{\ell (4 d - \ell)}{\pi d^2}.} \qedhere

Laplace’s grid: horizontal and vertical lines at spacing d , and 15 needles of length 0.9 placed uniformly at random. Copper needles cross at least one grid line; sage needles stay entirely within a tile. For \ell = 0.9 , the formula \ell(4d-\ell)/(\pi d^2) \approx 0.888 — most random tosses cross.
Laplace’s grid: horizontal and vertical lines at spacing dd, and 1515 needles of length 0.90.9 placed uniformly at random. Copper needles cross at least one grid line; sage needles stay entirely within a tile. For ℓ=0.9\ell = 0.9, the formula ℓ(4d−ℓ)/(πd2)≈0.888\ell(4d-\ell)/(\pi d^2) \approx 0.888 — most random tosses cross.

Laplace recorded this generalisation of Buffon’s result in his Théorie analytique des probabilités (1812). The intuition is that a grid offers twice as many opportunities to cross a line, tempered by a quadratic correction for simultaneous crossings. Setting ℓ=d\ell = d gives P=3/π≈0.955\mathbb{P} = 3/\pi \approx 0.955, so most tosses of a needle as long as the tile side cross at least one line.

import numpy as np
L, d, N = 0.8, 1.0, 10**7
theta = np.random.rand(N) * np.pi/2
u, v = np.random.rand(2, N) * d
cross_h = np.minimum(v, d-v) <= L/2 * np.sin(theta)
cross_v = np.minimum(u, d-u) <= L/2 * np.cos(theta)
p = (cross_h | cross_v).mean()
print(f"sim: {p:.5f}   exact: {L*(4*d - L)/(np.pi*d*d):.5f}")
# sim: 0.81510   exact: 0.81487
Report an error on this page

Reports are stored by Netlify. See the privacy note.