Books · The Fiddler: Solutions
Chapter 45
Can You Meet Me at the Mall?
You and two friends each arrive at the mall at a uniformly random time between 3 and 4 p.m., and each of you stays for exactly minutes. Over the afternoon, record the largest number of you present at the same moment. On average, what is that maximum?
The Fiddler, Zach Wissner-Gross, July 18, 2025(original post)
Solution
Measure time in hours, so each visit is an interval of length with a uniform start in . Equal-length intervals all share a moment exactly when their starts fit in a window of length , so the maximum overlap is , , or and A pair overlaps unless every gap exceeds : . All three overlap when the range of the three starts is at most : . Hence
The computation
Simulate the afternoon: draw three random arrival times, and since the largest crowd forms at someone’s arrival, count for each start how many visits cover it, and take the maximum. Average over millions of afternoons.
import numpy as np
rng = np.random.default_rng(0); t = np.sort(rng.random((4_000_000, 3)), axis=1)
best = np.ones(len(t), int)
for i in range(3):
best = np.maximum(best, ((t >= t[:, i:i+1]) & (t <= t[:, i:i+1] + 0.25)).sum(1))
print(round(best.mean(), 4), 65/32) # ~2.031 2.03125
Extra Credit
Now there are four friends, each arriving at random and staying minutes. On average, what is the maximum number together?
Solution
With four starts the overlap can reach . Using the spacings of four uniform points (joint density on the internal gaps), (The source’s value is paywalled; this exact figure is my own.)
The computation
The same crowd count, now over four arrivals per afternoon.
rng = np.random.default_rng(1); t = np.sort(rng.random((20_000_000, 4)), axis=1)
best = np.ones(len(t), int)
for i in range(4):
best = np.maximum(best, ((t >= t[:, i:i+1]) & (t <= t[:, i:i+1] + 0.25)).sum(1))
print(round(best.mean(), 4), 317/128) # ~2.4766 2.4765625