Chapter 255
Can You Solve This Rather Pedestrian Puzzle?
The Riddler for February 14, 2020. Both halves redesign the sidewalks of Riddler City, a vast grid of unit blocks with City Hall at the centre and employees’ homes scattered uniformly. The Express replaces the grid sidewalks with diagonal ones; the Classic replaces them with a Barcelona-style octagonal pattern. Each asks what fraction of employees then have a shorter walk home.
Riddler Express
Riddler City is a vast grid of unit-side square blocks with City Hall at the centre; employees’ homes are scattered uniformly across it. The traditional sidewalks run along the streets, so reaching the intersection blocks from City Hall takes blocks of walking. A proposal replaces them with sidewalks running diagonally, at to the streets. What fraction of employees would then have a shorter walk home?
The Riddler, FiveThirtyEight, February 14, 2020(original post)
Solution
The diagonal sidewalks run in the two directions and . To walk to you cover along the first diagonal and along the second, a total of using the identity . Compare this with the grid walk .
Work in the octant where (the other seven are mirror images). There the diagonal walk is and the grid walk is , so the diagonal route is shorter exactly when The boundary line makes angle with the street, precisely half of the octant. So in every octant the diagonal sidewalks win for half the directions, and because the homes are scattered uniformly (so their direction from City Hall is uniform), the city splits evenly: Homes near the diagonals prefer the new sidewalks; homes near the streets prefer the old. Exactly half fall on each side.
The computation
Encode the geometry: scatter homes uniformly over a disk, compute both the grid walk and the diagonal walk , and measure how often the diagonal is shorter.
import numpy as np, math
rng = np.random.default_rng(0); N = 2_000_000
a = rng.uniform(0, 2*math.pi, N); r = np.sqrt(rng.uniform(0, 1, N))
x, y = r*np.cos(a), r*np.sin(a)
grid = np.abs(x) + np.abs(y)
diag = (np.abs(x + y) + np.abs(x - y)) / math.sqrt(2)
print(np.mean(diag < grid)) # ~0.5
The simulated fraction is , matching the boxed .
Riddler Classic
The petitioners try again, now asking for sidewalks in an octagonal pattern like the chamfered blocks of Barcelona’s Eixample. Under this proposal, what fraction of employees would have a shorter walk home?
The Riddler, FiveThirtyEight, February 14, 2020(original post)
Deferred (figure-dependent geometry)
The answer is the same as the Express, and for the same reason: the octagonal pattern is shorter exactly for homes above the line (and its mirror images), the very boundary that split the Express in half. The official derivation shows that on a block where the diagonal chamfers save a distance while the straight runs add , where is the chamfer length; these balance precisely when , and the chamfer length cancels.
We defer the full write-up rather than reconstruct it from text alone. Faithfully encoding the octagonal walk requires the exact geometry of the chamfered-block sidewalk network from the puzzle’s diagram (the lengths and connections of the diagonal corner segments), which the prose does not pin down well enough to model independently without re-deriving the very boundary line we would be checking. The mathematical content is identical to the Express above, which we author in full; the result is .
Status
Deferred as figure-dependent. Recorded answer: of employees prefer the octagonal sidewalks, with the same boundary line as the diagonal Express.