I simulated 200,000 double-elimination brackets to find where the losers should drop
The first version of my bracket engine passed every test I had written. The game counts were right for every field from 2 to 64 teams, nobody was knocked out before a second loss, and no game was scheduled before the two
The first version of my bracket engine passed every test I had written. The game counts were right for every field from 2 to 64 teams, nobody was knocked out before a second loss, and no game was scheduled before the two games that fed it. It was still wrong in a way none of those tests could see. At 32 and 64 teams it kept sending a team into the losers bracket to meet the team it had just lost to.
Most explanations of double elimination stop at the rule: lose once and you drop to the losers bracket, lose twice and you're out. The part that decides whether the bracket feels fair on the day is the next question. Where, exactly, does the loser drop?
Eight teams, fourteen games

An 8-team double elimination bracket after seven games. Winners are marked in yellow.
With 8 teams the winners bracket is an ordinary knockout: 3 rounds, 7 games. The losers bracket has 4 rounds and 6 games. Add the grand final and you have 14 games, or 15 if the team from the losers bracket wins the grand final and forces a second one. The general count is twice the teams minus two.
The losers bracket alternates. In one round the teams already down there play each other. In the next, the survivors meet the teams that have just dropped from the winners bracket. The whole problem lives in that second kind of round.
Straight across is a coin flip for a rematch
Follow the game numbers in the picture. Game 1 is Hawks v Owls and game 2 is Bears v Sharks. Their winners meet in game 7. Their losers meet in game 5, the first losers game.
Now draw the obvious line: the loser of game 7 drops straight across to play the winner of game 5. The loser of game 7 is a team that won game 1 or game 2. The winner of game 5 is a team that lost game 1 or game 2. Half the time, those two have already played each other, about an hour ago.
That is the mistake, and it's the natural way to draw the sheet. The fix at 8 teams is to cross the lines: the loser of game 7 goes to the other losers game, and the loser of game 8 comes over to this one. Now a rematch needs both teams to survive another round first.
What I measured
I ran 200,000 tournaments for each way of drawing the drops, at 8, 16, 32 and 64 teams. Every game was a coin flip, so the result says something about the bracket and nothing about who is good. I counted every pairing that happened a second time.
Two games are left out of the count: the last game of the losers bracket and the grand final. A repeat there can't be designed away. If the team that lost the winners final fights back through, the grand final is a rematch by definition. Those two games produced about one repeat per tournament whatever I did (1.06 at 8 teams, 1.00 at 64).

Avoidable rematches per tournament. Lower is better.
| Teams | Straight across | Reversed every other round | Picked per size |
|---|---|---|---|
| 8 | 1.00 | 0.25 | 0.25 |
| 16 | 2.75 | 0.41 | 0.41 |
| 32 | 6.19 | 0.79 | 0.40 |
| 64 | 13.04 | 1.54 | 0.37 |
With drops straight across, a 64-team event produces 13 rematches that didn't need to happen. Eight of them are in losers round 2, which for the teams in it is only their third game. A team can win one game, lose two, and go home having met only two opponents.
The rule that works until it doesn't
"Reverse the order every other round" is the rule you'll find if you search for this, and it's what my first version did. At 8 and 16 teams it is as good as anything I could find.
At 32 teams it gives 0.79 avoidable rematches, and 0.50 of that sits in a single round, losers round 4. At 64 teams the same round averages one rematch per tournament. The alternating pattern happens to line up two groups of teams that met in the winners bracket two rounds earlier.
I only caught it because I was checking my numbers against someone else's. A 2017 post on tourneygeek.com simulates a 16-team bracket a million times and reports 0.4 avoidable repeats with the right drops and 2.64 with the drops listed in order. My 16-team figures agreed (my straight-across number is a little higher because I get every round wrong, and that post gets one round wrong). So I ran 32 and 64 expecting the same agreement, and the alternating rule fell apart.
No formula, so a lookup table
I wanted a formula. What I have is a table.
For each winners round, the engine can line up the dropping teams four ways: in order, reversed, shifted by half, or with each half reversed. I tried every combination of those per bracket size and kept the one with the fewest avoidable rematches.
const ORDER = {
natural: (n) => Array.from({ length: n }, (_, i) => i),
reverse: (n) => ORDER.natural(n).reverse(),
halfShift: (n) => [...ORDER.natural(n).slice(n / 2), ...ORDER.natural(n).slice(0, n / 2)],
reverseHalves: (n) => [...ORDER.natural(n).slice(0, n / 2).reverse(), ...ORDER.natural(n).slice(n / 2).reverse()],
};
// One entry per winners round, from the second round on.
const DROPS = {
8: ["reverse", "natural"],
16: ["reverse", "natural", "natural"],
32: ["reverseHalves", "reverse", "natural", "natural"],
64: ["halfShift", "reverse", "reverseHalves", "halfShift", "natural"],
};
With these orders the first possible rematch moves from losers round 4 to round 5 at 32 teams, and to round 7 at 64. There may be a closed form that produces the same table. I didn't find one, and a table with a test guarding it is at least honest about that. The test replays a small version of the simulation and fails if any size gets worse, or if a rematch shows up a round earlier than it should.
Fields that aren't a power of two use the table for the next size up. The top seeds get byes, the empty games are removed, and the drops that remain keep their order. I swept every count from 4 to 64 and the avoidable rematches stayed between 0.24 and 0.42.
Checking a bracket you didn't make
You don't need a simulator to spot the bad version on paper. Find a game in losers round 2 and read the two lines feeding it, something like "Loser of game 7" and "Winner of game 5". Then look at who played in game 5. If they are the losers of the same two games whose winners met in game 7, the sheet is drawn straight across.
For 8 teams, one cross is all it takes and most printed brackets get it right. Past 16 teams I wouldn't use a bracket I couldn't trace this way, and I include my own first version in that.
The engine is on GitHub: fancydirty/bracket-engine. The brackets it draws are at bracketmaker.co/double-elimination-bracket, and the 32-team double elimination sheet is the one this bug lived in. If you want the rules without the simulation, there's a shorter guide: how a double elimination bracket works.
Written with AI assistance. The numbers were computed with the open-source engine linked above.
Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.