Bracket Busting
Combinatorics, Logic; Difficulty: easy
How Many Brackets Can You Bust?
This week’s Riddler Classic is once again a counting/logic exercise just in time for March Madness with an interesting extra credit. The Classic reproduced:
From Lucas Fagan comes a buster of brains and brackets that’s just in time for March Madness:
Consider a single-elimination tournament with four teams that hold a definitive ranking — that is, one team is the best, another team is second-best and so on. In each game, the better team wins. When the tournament is complete, you know for certain which team is the best. However, you can’t make similar claims about the remaining teams.
Suppose the winning team is A, and it plays B in the first round. Meanwhile, the team that loses in the final is C, whose opponent in the first round is D. With this bracket, there are three possible rankings of teams from best to worst: A/B/C/D, A/C/B/D and A/C/D/B.
For this week’s puzzle, instead of four teams, consider a single-elimination tournament with eight teams. How many possible rankings of teams are possible for a given completed bracket?
Extra credit: Instead of eight teams, suppose there are 2N teams. In terms of N, how many possible rankings of teams are possible for a given completed bracket?
*spoiler alert* solution and answer follow below
Solution
Consider the 8 team single elimination bracket. This is the same as running two four team bracket eliminations and having the winners clash. For these two brackets, consider the teams and outcomes to be A,B,C,D as described in the question and in addition E,F,G,H following the same pattern of outcomes. Let’s assume A is victorious in the final against E.
We know for sure that A is the best among the 8. We also know B,C,D can be ranked in 3 ways. E,F,G,H can also be ranked in 3 ways. We cannot say anything about how each of B,C,D rank against each of E,F,G,H.
So, of the remaining 7 slots (remember A is the undisputed best), we can pick 4 slots for EFGH in \( 7 \choose 4 \) ways and then arrange them in 3 possible rankings. The remaining three slots will be taken up by B,C,D, again with 3 possible rankings. So the required total number of rankings with 8 teams is:
\[
{7 \choose 4} \cdot 3 \cdot 3 \ = \mathbf{{\color{Red} {315}}}
\]
Solution to Extra Credit
It’s straightforward to extend the logic above to the general case when we have \(2^N\) teams at the start.
Let \(f(2^N) \) be the function giving us the number of ways in which \( 2^N \) teams can be ranked.
Now we know that \(f(2^{1}) = 1 \) and \( f(2^{2}) = 3 \).
We can use the logic used in the section above to determine \( f(2^{N}) \) knowing \( f(2^{N-1}) \). This is because the \( 2^{N}\) case is just two separate \( 2^{N-1} \) team single eliminations with the winners meeting in the finals to definitely determine the top team.
\( f(2^{N-1}) \) is then determined as the number of ways to choose \( 2^{N-1} \) slots from \( 2^{N} – 1\) slots and multiplying it by the number of ways each of the \( 2^{N} – 1\) teams can be ranked.
\begin{align*}
f(2^{N}) &= {2^{N} – 1 \choose 2^{N-1}} \cdot f(2^{N-1}) \cdot f(2^{N-1}) \qquad &&(N \geq 1) \\
&= {2^{N} – 1 \choose 2^{N-1}} \ f(2^{N-1})^2 \qquad &&(N \geq 1) \\
f(2^{1}) &= 1
\end{align*}
This recursive relation is all we need to calculate the number of possible rankings for any \(2^N\) teams completing the single elimination bracket.
Determining a closed form formula for \(f(2^N) \) requires a bit of algebraic manipulation and series summation, the outline of which I provide below:
Using the recursive relationship above we can see/show:
\begin{align*}
&f(2^2) \ = \ {3 \choose 2} \ 1^2 \ = \ {3 \choose 2} \\
&f(2^3) \ = \ {7 \choose 4} \ {3 \choose 2}^2 \ = \ \frac{7!}{4\cdot 2^2} \\
&f(2^4) \ = \ {15 \choose 8} \ \left ( \frac{7!}{4\cdot 2^2} \right )^2 \ = \ \frac{15!}{8\cdot 4^2 \cdot 2^4} \\
. \\
. \\
. \\
& \textit{and in general } \\ \\
&f(2^N) \ = \ \frac{(2^N – 1)!}{(2^{N-1})^1 \cdot (2^{N-2})^2 \cdot (2^{N-3})^4 \ .\ . \ . \ 2^{N-2}} \\ \\
& \textit {or in product notation } \\ \\
&f(2^N) \ = \ \frac{(2^N – 1)!}{\prod_{i=1}^{N-1} (2^{N-i})^{2^{i-1}}}
\end{align*}
The denominator has \(N-1\) exponent terms of 2. The final exponent of 2 can be summed to \(S\) as follows:
\begin{align*}
S &= (N-1)1 \ + \ (N-2)2 \ + \ (N-3)4 \ + \ . \ . \ . \ \ + \ (2)2^{N-3} \ + \ (1))2^{N-2} \\
&= (N-1)2^0 \ + \ (N-2)2^1 \ + \ (N-3)2^2 \ + \ . \ . \ . \ \ + \ (N-(N-2))2^{N-3} \ + \ (N-(N-1))2^{N-2} \\
&=\left [ 2^0N + 2^1N +2^2N + \ … \ +2^{N-3}N + 2^{N-2}N\right ] – \left [ 1\cdot 2^0 + 2\cdot 2^1 + 3\cdot 2^2 + \ … \ + (N-1)2^{N-2} \right ] \\
&= \left [S_a \right ] \qquad – \qquad \left [S_b \right ]
\end{align*}
The first term \(S_a\) is a geometric series of \(N-1\) terms whose sum is:
\[
S_a = N(2^{N-1} – 1)
\]
The second term \(S_b\) is an arithmetico-geomteric sequence whose sum can be calculated as follows:
\begin{align*}
S_b &= 2S_b – S_b \\
&= (N-1)2^{N-1} – \left ( 2^0 + 2^1 +2^2 + \ … \ + 2^{N-2} \right ) \\
&= (N-1)2^{N-1} – (2^{N-1} – 1) \\
&= N2^{N-1} – 2^N + 1
\end{align*}
Our required S is then:
\begin{align*}
S &= S_a – S_b \\
&= N(2^{N-1} – 1) – N2^{N-1} – 2^N + 1 \\
&= 2^N – N – 1
\end{align*}
Our final required function \(f(2^N) \) can now be written as:
\begin{align*}
f(2^N) &= \frac{(2^N – 1)!}{2^{(2^N – N – 1)}} \\
&= \frac{2^N(2^N – 1)!}{2^{(2^N – 1)}} \\
&= \mathbf{{\color{Red} {\frac{(2^N)!}{2^{(2^N – 1)}}}}}
\end{align*}
which is the required expression.
Notice that this expression is equivalent to:
\[
\frac{(\textit{total no. of teams})!}{2^{\textit{total number of games}}}
\]
This is not a coincidence. If you start with the total number of ranking permutations i.e. \( (2^N)!\), and take any feasible match, say A vs B, before the game, there are an equal number of permutations with A ranked higher than B, as B higher than A. But the outcome of the game reduces the feasible ranking permutations by 2. This is true of every game, leading to the answer. This is a straightforward way to derive the final expression.
Applying this to the March Madness round of 64 with N = 6, the number of possible rankings is \( \approx 1.37 \ \times \ 10^{70} \) which is in the realm of the total number of atoms in the observable universe!
2 thoughts on “Bracket Busting”
Thanks for this beautiful post! We can also remember the formula for sum S_b by saying the sum of the i q ^ (i – 1) is the derivative in q of the sum of the q ^ i, and plugging in q = 2 at the end (which to me is easier to remember…). Thank you!
That’s interesting. Thanks. You’re too kind, Gabriel.