Library · Geometric Probability · Chapter 5
The meeting problem
Problem 5.1
Alice and Bob each arrive at a café at an independent uniform random time between noon and 1:00 PM. Each waits minutes before leaving. What is the probability that they meet?
Solution. Let be the arrival times of Alice and Bob (in units of an hour, with = noon). The parameter space is the unit square with total area . Alice and Bob meet iff their arrival times are within a quarter hour of each other:
The region is the union of two corner triangles: one above the line , and one below the line . Each is a right triangle with legs of length , so each has area . Their combined area is .
Hence the meeting region has area , and
The meeting problem generalises: if Alice waits hours and Bob waits hours (both in a 1-hour window), the meeting region is the unit square with two opposite corner triangles removed, and the probability is for . For , this gives .
import numpy as np
x, y = np.random.rand(2, 10**7)
p = (np.abs(x - y) <= 0.25).mean()
print(f"sim: {p:.5f} exact: {7/16:.5f}")
# sim: 0.43746 exact: 0.43750