There are $n$ teams in a sports tournament, and each team has to play every other team, and all teams have to play every weekend over $n-1$ weekends.
For example, rugby six nations $n=6$ pretty much follows this pattern.
Hoe many ways are there to uniquely order the matches?
Note: we are not counting home vs away matches as different. But a bonus question would be to calculate the number of unique ordering where home and away are treated differently.
My Attempt
I believe the answer is:
$\prod_{k=1}^{n-1} k! = \prod_{k=1}^{n-1} k^{n-k}$
Any team has $(n-1)!$ ways to sequence who they play each weekend. The next team has $(n-2)!$ ways for the remaining matches excluding the first team etc.
If you care about order within a weekend multiply the above by $(\frac{n}2)!$. This is always defined as $n$ is guaranteed to be even.
Problem: Overcounting occurs with the above assumption of a choice algorithm. We can see why by counterexamlple (thanks to commenter).
- A chooses: Ab, ac, ad, ae, af
- B chooses (a fixed): Ab, ac-bd, ad-bc, ae-bf, af-be
At this point, the above incorrect maths assumes that c has got $3!$ choices with ab out of the picture. But it doesn't: it has none. c MUST choose D on the fourth weekend AND the fifth weekend in the above example, an absurdity, meaning this entire choice tree counts for zero states in our state space that were trying to count.
Given how easy it seems for constraints like this to arise naturally I imagine the number of unique orderings is much smaller than I originally thought.
Here’s Java code that counts these schedules by enumueration. The result is OEIS sequence A036981, which gives the counts for up to $14$ teams. The entry’s title is “Number of $(2n+1)\times(2n+1)$ symmetric matrices each of whose rows is a permutation of $1\ldots(2n+1)$”, where $2n+1$ corresponds to your $n-1$.
As discussed in the comments, my original suggestion for converting such a matrix into a tournament schedule turned out to be wrong, whereas the OP’s suggestion works: The matrix entries specify the weekend on which the row and column teams play each other, except the diagonal (since a team doesn’t play itself), which specifies when the teams play the $n$-th team not represented by a row or column.
For this to work, the diagonal must also contain a permutation of the teams. This is indeed the case, since every team appears an odd number of times in the matrix (once in each row, whose number is odd) and an even number of times off the diagonal (by symmetry) and hence at least once, and hence exactly once, on the diagonal.
The OEIS entry contains a reference and a link to a related entry with further references, but no closed form or generating function.