Library · Geometric Probability · Chapter 35
Disc line picking
Problem 35.1
Two points are chosen independently and uniformly in the closed unit disc. What is the expected distance ?
Solution. This is the classical “disc line picking” constant, due to Czuber (1884). The answer is
Derivation sketch. By rotational symmetry, take with at density , and in polar coordinates with at density and uniform on . The law of cosines gives , and the conditional expectation features a complete elliptic integral of the second kind. Substituting and integrating over on , the elliptic integrals collapse after two integrations by parts, giving The full computation is several pages. It is the geometric-probability analogue of Robbins’s constant for the cube (Chapter 60), but in dimension . The unusual rational-over- closed form is what makes this problem famous. ■
As corollaries we obtain the disc perimeter constant (Chapter 47): three random points form a triangle of expected perimeter . Analogously in , the ball line-picking constant is (Chapter 59), rational because the angular integral in three dimensions is elementary rather than elliptic.
import numpy as np
r = np.sqrt(np.random.rand(2, 10**7))
t = np.random.rand(2, 10**7) * 2*np.pi
x, y = r*np.cos(t), r*np.sin(t)
d = np.sqrt((x[0]-x[1])**2 + (y[0]-y[1])**2)
print(f"sim: {d.mean():.5f} exact: {128/(45*np.pi):.5f}")
# sim: 0.90499 exact: 0.90541