Books · The Fiddler: Solutions
Chapter 2
Can You Catch the Longest Wave?
Semicircle Island is shaped like a perfect semicircle, a semidisk of radius mile, with its straight shoreline facing the open sea. A single wave, a thin straight wall of water that never changes speed or direction, makes first contact with the island at exactly 10 a.m. and last contact at 10:10 a.m. A surfer rides the wave where it meets the land. At 10:05 a.m., the midpoint of the wave’s ten-minute crossing, what is the longest possible stretch of island directly under the wave?
For extra credit: if the wave’s direction is now uniformly random, with every heading equally likely, what is the average length of land under the wave at the midpoint of its crossing?
The Fiddler, Zach Wissner-Gross, June 12, 2026(original post)
Solution
Put the island as the top half of a unit circle, with its centre in the middle of the straight shore, and let the wave roll in off the sea at angle to the shore.
Because the wave moves at a steady speed, equal times are equal distances travelled. It first touches the island at 10:00 and clears it at 10:10, so at 10:05, halfway through in time, it has gone exactly halfway in distance. The 10:05 wall therefore sits midway between the line of first contact and the line of last contact, and those two lines are easy to pin down. Both rest against the island and are square-on to the wave’s travel, so the three lines are parallel. Measuring distance from along the direction of travel, last contact grazes the round arc, a distance from , while first contact rests on the near corner , a distance from on the opposite side. The 10:05 wall is halfway between, so its distance from is the average of the two,
The wet sand is the stretch of the 10:05 wall lying on the island. Were the wall a proper chord, with both ends on the circle, it would span , which grows as shrinks; so we want the wall as close to as we can bring it. The wet sand reaches that full length only while both ends stay on land, though: flatten the wave too much and the wall’s lower end slides off the island into the sea, leaving a wet stretch shorter than . The wall can come no closer than the moment its lower end reaches a shore corner.
At that moment the wet wall runs from the corner to the arc, both ends on the circle: a full chord. Since the corner lies on the wall, its distance from along the travel direction, which is , must equal . With , and the longest catchable wall is
Extra credit
With a random heading we average the wet length over all directions. The island is left-right symmetric, and reversing a wave’s direction leaves its 10:05 wall unmoved, so it is enough to average over from (skimming the shore) to (head-on), The wall lies a distance from , and its wet length takes one of two forms, shown below. For a steep wave the whole chord is on the island; the perpendicular from bisects it, so each half is and . For a flat wave the lower end is in the sea, and the wet part runs from the arc down to the shore: its upper piece is again , and its lower piece is the side of the right triangle , so . The two regimes meet at , where the lower end sits on the corner.
To integrate, write . The half-angle identity turns into a square, which is what makes everything elementary: The square-root term then collapses, because and the cancels: The tangent term is simpler still, since : Split the average at the changeover and read off the two parts: At the limits, with for , The flat part is and the steep part is . The cancels and , so and
The computation
The code follows the puzzle directly: for each heading it builds the 10:05 wall and measures the part lying on the island. The longest over all headings is the main answer; the average over all headings is the extra credit, and it matches the closed form.
import numpy as np
from math import sqrt, log, pi
def wet_length(alpha, n=400001):
u = np.array([np.cos(alpha), np.sin(alpha)]) # travel direction
t = np.array([-np.sin(alpha), np.cos(alpha)]) # along the wavefront
reach = lambda v: 1.0 if v[1] >= 0 else abs(v[0]) # support of the half-disk
c = 0.5 * (reach(u) - reach(-u)) # 10:05 wall: distance c from O
s = np.linspace(-2, 2, n) # march along the wall
p = c * u + np.outer(s, t)
land = (p[:, 0]**2 + p[:, 1]**2 <= 1) & (p[:, 1] >= 0) # on the island?
return 0.0 if not land.any() else s[land].max() - s[land].min()
grid = np.linspace(0, 2 * pi, 7201)
lengths = np.array([wet_length(a) for a in grid])
closed = (2 / pi) * (sqrt(3) - 1 + log(2 + sqrt(3)))
print(f"longest: {lengths.max():.4f} (4*sqrt(2)/3 = {4 * sqrt(2) / 3:.4f})")
print(f"average: {lengths.mean():.4f} (closed form = {closed:.4f})")
# longest: 1.8855 (4*sqrt(2)/3 = 1.8856)
# average: 1.3044 (closed form = 1.3044)
# the scan grazes, not lands on, the optimal heading, so the max reads
# a hair under the exact 4*sqrt(2)/3.