Books · The Fiddler: Solutions
Chapter 103
Can You Survive March Madness?
In a -team region seeded to in the usual single-elimination bracket, measure a team’s strength of schedule by the geometric mean of the strongest opponents it could face in each of the four rounds, where “strongest” means the lowest-numbered seed that the bracket could send its way (assuming better seeds win). Which two seeds have the toughest strength of schedule?
The Fiddler, Zach Wissner-Gross, March 22, 2024(original post)
Solution
A tough schedule means meeting low-numbered seeds, so we want the seed whose four strongest possible opponents are as small as possible all at once. Two facts about the standard bracket pin those opponents down. First, assuming the better seed always wins, the strongest team a given seed can meet in round is the lowest seed sitting in the sibling block of size that feeds the same game. Second, as the rounds advance each block sends its best team forward, so the round- opponents available across the whole region are exactly the seeds , one drawn from each surviving block.
For the -team region the four rounds have block sizes , so every seed’s strongest opponents are its first-round partner, then the best of the adjacent pair, the adjacent four, and the adjacent eight. The last of these is always seed or (the two halves of the draw), and the best-of-four is one of ; the room to choose lies in the early rounds. A top seed wastes its early games on weak opponents (seed opens against seed ), so its geometric mean is dragged up. The middle of the list is treated worst: seed is routed into the best-of-each-block at every stage, meeting seeds , and its mirror image seed meets . Both give and sweeping all sixteen seeds shows no seed does worse. So the toughest two are the each with strength of schedule .
The computation
To confirm that no seed beats or , build the actual bracket and, for each seed, read off the lowest seed reachable in each round directly from the seeding order, then take the geometric mean. The minimum over all sixteen seeds is , at seeds and .
import math
def bracket(n): # standard seeding order
s = [1]
while len(s) < n:
m = len(s) * 2; s = [x for p in s for x in (p, m + 1 - p)]
return s
def schedule(n):
order = bracket(n); pos = {s: i for i, s in enumerate(order)}
out = {}
for s in range(1, n + 1):
i = pos[s]; opps = []
for r in range(int(math.log2(n))):
blk = 1 << r; start = ((i // blk) ^ 1) * blk
opps.append(min(order[start:start + blk])) # strongest reachable in round r+1
out[s] = math.prod(opps) ** (1 / len(opps))
return out
sc = schedule(16)
print(sorted(sc, key=sc.get)[:2], round(min(sc.values()), 3)) # [11, 14] 2.449
Extra Credit
With seeds and very large, the two toughest seeds approach fixed fractions of . What are they?
Solution
The same principle scales: the toughest seed is the one steered into the strongest available opponent in every round. Label a seed by the binary digits of its position in the draw. Reading the bracket from the coarsest split inward, each binary digit decides whether that round’s game pairs the seed against the stronger or the weaker side of the relevant block. To meet a low seed in every round, the digits must keep choosing the stronger side, which means they must alternate: a run of equal digits would hand the seed an easy round. Exactly two positions down the list have an alternating binary expansion, so the two toughest seeds approach two-thirds and five-sixths of the way down the seed list. A full proof of the limit is more than the puzzle needs; the alternating-digit structure is the reason, and the computation below confirms the two fractions.
The computation
Running the bracket of the previous section for growing and reading off the two toughest seeds, their positions in the list converge to and , that is and .
for n in (1024, 16384, 65536):
sc = schedule(n); a, b = sorted(sc, key=sc.get)[:2]
print(n, round(a / n, 4), round(b / n, 4)) # -> 0.6667, 0.8333