Chapter 91
Can You Win The Riddler Football Playoff?
Riddler Express
Four teams in a group each play the other three once ( matches), scoring for a win, for a draw, for a loss. After the group, all four teams have different point totals: . Find every possible quadruple .
Solution
Each of the matches independently ends in a home win, away win, or draw, so there are outcome patterns. Tallying each team’s points, sorting, and keeping only the patterns with four distinct totals leaves exactly thirteen quadruples: The total points across the group range from (all matches decisive) to minus the draws, which is why the four-way splits cluster the way they do.
The computation
For each of the six matches, enumerate its three outcomes, take the product over all matches, and collect the sorted totals that are strictly decreasing.
import numpy as np
from itertools import combinations, product
def outcomes(i, j): # three results of match i vs j
res = []
for si, sj in [(3, 0), (0, 3), (1, 1)]:
v = np.zeros(4); v[i], v[j] = si, sj; res.append(v)
return res
quads = set()
for combo in product(*[outcomes(i, j) for i, j in combinations(range(4), 2)]):
a, b, c, d = sorted(sum(combo), reverse=True)
if a > b > c > d: quads.add((a, b, c, d))
print(len(quads)) # 13
Riddler Classic
Four playoff teams get independent uniform qualities in . Team beats team with probability . The top seed plays the bottom seed, the middle two play each other, and the winners meet in the final. On average, what is the champion’s quality?
Solution
The bracket is fixed by the seeding: the highest quality plays the lowest, the middle two play each other, and the two winners meet. Quality helps but never guarantees a win, since even the best team loses with positive probability at each round. Averaging the champion’s quality over random draws and random match outcomes gives That sits well above the average quality of a random team and above the expected of the strongest of four, because the playoff structure filters toward the better teams while still letting upsets through.
The computation
Draw four qualities, seed them, play the two semifinals and the final with the rule, and average the winner’s quality.
import numpy as np
rng = np.random.default_rng(0)
N = 5_000_000
q = np.sort(rng.random((N, 4)), axis=1) # a < b < c < d
def beat(p, r): # p wins vs r w.p. p/(p+r)
return np.where(rng.random(N) < p / (p + r), p, r)
champ = beat(beat(q[:, 3], q[:, 0]), beat(q[:, 2], q[:, 1]))
print(champ.mean()) # ~0.674