Daniel Vitek - Reverse-engineering FIFA's giant World Cup lookup table
Daniel Vitek
Home<br>Archive<br>About
Contents ↑
The laws of the game
Matching up
How FIFA didn’t do it
It’s not random
It’s not lexicographic
It’s not greedy
It’s not rest days
How FIFA did it
This is not a coincidence
The key idea
A two-dimensional illustration
Numerics
Where’d they come from?
Was the fix in?
Why weren’t they public?
Appendix: better bounds
Improving d
Improving m
Reverse-engineering FIFA's giant World Cup lookup table
Posted on July 6, 2026
by Daniel Vitek.
Tagged: combinatorics, high-dimensional geometry.
INT. FIFA HEADQUARTERS - ZURICH, SWITZERLAND - NIGHT
An INTERN enters, clutching a printout.
INTERN
“Sir, we have the score from Algeria vs. Austria. Somehow, it’s a tie: 3-3.”
GIANNI INFANTINO’s chair turns slowly, revealing him first in side profile and then head-on.
GIANNI INFANTINO
“The time has come. Execute option six-seven.”
I’m not quite sure that’s how it actually played out, but at some point on June 27Perhaps early in the morning of June 28 Zurich time.<br>, 2026, somebody at FIFA finalized the standings of the twelve third-place teams at the 2026 World Cup. The top eight third-place teams, which came from groups B, D, E, F, I, J, K, and L, would continue into the knockout stage. But who would their opponents be?
To answer that, we had to turn to Annexe C of the 2026 FIFA World Cup regulations. In that eighteen-pageFor comparison, FIFA’s regulations regarding the World Cup stadiums take up just one page.<br>appendix, FIFA laid out which third-place team would fill each of the eight slots in the 32-team knockout bracket depending on which set of eight groups produced qualifying third-place teams. (FIFA calls these sets options; we’ll use the term scenarios.) Since there were twelve groups, but only eight slots, FIFA had to specify slot assignments in (128)=495\binom{12}{8} = 495(812)=495 different scenarios, explaining the absurd length of Annexe C.
Once we knew which eight groups produced a qualifying third-place team (i.e., which scenario we were in), we could lookThe scenarios (“Options”) in Annexe C are in reverse lexicographic order on the sorted string of qualifying groups—e.g., BDEFIJKL in the scenario that actually happened (Option 67).<br>through Annexe C to figure out which matchups we were going to get. Despite the ten thousand articles and videos apparently required to explain it to sports fans, this procedure is pretty straightforward: it’s just a lookup table. But nobody seemed to be able to figure out how the lookup table was generated.
“Two-thirds of the 12 first-place finishers are scheduled to face a grab bag of third-place teams based on what’s literally an indecipherable algorithm.” (Nate Silver)To be fair, Silver’s use of “indecipherable” may refer not just to the lookup table but also to the placement of the third-place slots in the 32-team knockout bracket. We don’t tackle the latter problem here at all. That said, @me, Nate.
“It’s unclear exactly how the permutations were decided.” (Sportico)
“I’m guessing from the distinct lack of success at that exact task from the online tools, there is no such algorithm. […] if there was a set of rules that would produce that table and only that table, they wouldn’t need the table.” (Sports StackExchange)
“No-one seems to have been able to reverse-engineer the table to work out exactly why the combinations are determined this way. There is no simple explanatory rule.” (Reddit, r/Aleague subreddit)
Today, we’ll do just that.
The laws of the game
Let’s get started by making sure we understand what Annexe C actually tells us. For each group winner (1E, 1A, 1I, 1D, 1G, 1L, 1B, 1K)FIFA uses the notation E1 for the team from Pot 1 in group E, and the notation 1E for the first-place team in Group E. These are often, but not always, the same.<br>that was to face a third-place team, FIFA prescribed five possible groups that the third-place team might come from: the shaded cells in the table below.
The potential group-winner versus third-place-team matchups.
It’s not completely clear how FIFA chose the allowable groups for each slot. Some matchups seem to be forbidden for easily-explainable reasons:
No round-of-32 rematches of group stage games (red ● circles).
No potential round-of-16 rematches (orange ● circles).
No games where one team has fewer than four days of rest (purple ● circles).
Other exclusions have murkier explanations:
Games where the rest disparity would be three days or more (blue ● circles) seem to be mostly excluded. The only exception to this rule is the potential 1B-3J matchup.
Potential quarterfinals rematches (yellow ● circles). These clearly aren’t completely excluded, but around half of the otherwise-inexplicably-excluded matchups could give rise to potential quarterfinals matchups.
Whatever FIFA’s logic, the table above tells us which matchups could happen. Annexe C tells us which matchups...