Chapter 122
The Carpenter’s Circular Table
The Riddler for September 23, 2016. The Express is a one-line counting argument; the Classic is a packing problem with a tidy pair of trigonometric conditions.
Riddler Express
Suppose the NCAA College Football Playoff, a single-elimination tournament, expanded to include not just four but all 128 Division I teams. How many individual games would be played in that playoff?
The Riddler, FiveThirtyEight, September 23, 2016(original post)
Solution
You can add up the rounds, , but there is a cleaner way to see it that needs no arithmetic at all. Single elimination means every game knocks exactly one team out, and the tournament ends with exactly one team never knocked out. So the number of games equals the number of teams eliminated, which is everyone but the champion: The same argument gives games for any -team single-elimination bracket, no matter how the byes fall.
The computation
Simulate the bracket and count the games, for and for a few other sizes, to confirm the rule.
import random
def games_played(n):
teams = list(range(n)); count = 0
while len(teams) > 1:
random.shuffle(teams)
winners = []
# pair them up; an odd one out gets a bye to the next round
for i in range(0, len(teams) - 1, 2):
winners.append(teams[i] if random.random() < .5 else teams[i+1])
count += 1
if len(teams) % 2: winners.append(teams[-1])
teams = winners
return count
for n in (128, 4, 100, 17):
print(f"n={n:4d}: games={games_played(n)} (n-1={n-1})")
# n= 128: games=127 (n-1=127)
# n= 4: games=3 (n-1=3)
# n= 100: games=99 (n-1=99)
# n= 17: games=16 (n-1=16)
Riddler Classic
You want to build a circular dining table that can be split in half so leaves can be added. Trouble is, your one pristine piece of exotic wood is a -by--foot rectangle. The plan: cut two congruent semicircles from it and reassemble them into the circular top. What is the radius of the largest possible circular table you can make?
Extra credit: what is the largest circular table you can make from congruent pieces?
The Riddler, FiveThirtyEight, September 23, 2016(original post)
Solution
Two semicircles of radius reassemble into a full circle of radius , so the table is as big as the largest semicircle, a half-disk, that we can cut twice from the board without the two pieces overlapping. The naive ways are poor: lay each half-disk flat with its straight edge along an edge of the board and the radius is capped at feet, because the diameter must fit the -foot width. The trick is to tilt the two half-disks and let them interlock.
Set the board as , . Tilt each half-disk’s straight edge (its diameter) by an angle from the long side, and place the two as rotations of each other about the board’s centre : the lower one pushed into the bottom-left, the upper one into the top-right. Two conditions pin down and .
The height fixes in terms of . Take the lower half-disk with centre , diameter along the unit vector , and the arc bulging to the side of the inward normal . A point of the half-disk is with and . Its height above ranges from a lowest point at (slide to the far end of the diameter, , ) up to a highest point at (push out along the normal to the arc). So the half-disk spans a vertical distance . To use the full board height it touches top and bottom, giving
Tangency fixes . Slide the lower half-disk left until its diameter’s far end meets the left wall, and by symmetry the upper one meets the right wall; this puts the lower centre at . The two pieces are largest when they just touch, and by the point symmetry they touch exactly at the board’s centre , which must therefore lie on the lower half-disk’s straight edge, the line through along . Collinearity of with that direction reads and substituting and simplifying collapses it to the clean relation This has a single root in , and then The tilt buys a table more than a third again as wide as the flat-cut , a little under feet across, out of a board only feet wide.
Extra Credit
What is the largest circular table from congruent pieces?
Solution
There is no known general answer; the puzzle’s own author called it “ridiculously hard, if not impossible,” and neither he nor his readers produced a formula. What we can pin down is the ceiling. The pieces are cut from the board, so the finished disk’s area cannot exceed the board’s: The two-piece table already reaches square feet, about of the wood, so finer cuts have room to climb toward that -foot bound. More pieces never hurt, since any -piece cut is also achievable with by leaving one cut unused, so the best radius rises with toward the area limit. Pinning the exact optimum for each is the open part.
The computation
Encode the actual geometric constraint rather than the boxed formula: place the two tilted half-disks as derived, with fixed by the height relation , and measure by Monte Carlo whether they overlap inside the board. The largest with zero overlap is the table radius; beyond it the pieces collide.
import numpy as np, math
def overlap_area(r, n=4_000_000, seed=0):
a = math.asin(4.0/r - 1.0) # height relation fixes alpha
sa, ca = math.sin(a), math.cos(a)
C = np.array([r, r*sa]); nrm = np.array([-sa, ca]) # lower half-disk
Cp = np.array([8-r, 4-r*sa]); nrmp = np.array([ sa, -ca]) # upper half-disk
P = np.random.default_rng(seed).uniform([0,0],[8,4], size=(n,2))
inL = (((P-C )**2).sum(1) <= r*r) & (((P-C )*nrm ).sum(1) >= 0)
inU = (((P-Cp)**2).sum(1) <= r*r) & (((P-Cp)*nrmp).sum(1) >= 0)
return (inL & inU).mean() * 32.0 # overlapping area in sq ft
for r in (2.66, 2.70545, 2.71, 2.74):
print(f"r={r:.5f}: overlap = {overlap_area(r):.4f} sq ft")
lo, hi = 2.60, 2.80 # bisect the zero-overlap boundary
for _ in range(34):
mid = (lo+hi)/2
if overlap_area(mid, n=2_000_000) > 2e-3: hi = mid
else: lo = mid
print("largest non-overlapping r:", round((lo+hi)/2, 4))
print("area ceiling sqrt(32/pi) :", round(math.sqrt(32/math.pi), 3))
# r=2.66000: overlap = 0.0000 sq ft
# r=2.70545: overlap = 0.0000 sq ft
# r=2.71000: overlap = 0.0505 sq ft
# r=2.74000: overlap = 0.3975 sq ft
# largest non-overlapping r: 2.7056
# area ceiling sqrt(32/pi) : 3.192