[Math] finding number of unique outcomes of round-robin tournament with cycle

combinatorics

A round robin tournament is a tournament where each player plays other player once and there is no draw. If a team wins against all other then it is called Total Winner. Similarly we define Total Looser as a team which looses all matches.

EDITED::

Let us define order by win/loss. If $A$ wins $B$ and $B$ wins $C$ then it is ordered as $\dots >A>B>C>\dots$
Consider $n\ge 3 $ teams, $\frac{n(n-1)}{2}$ games are played and $2^{\frac{n(n-1)}{2}}$ unique results might be possible. Out of those $2^{\frac{n(n-1)}{2}}$ possible results, how many unique outcomes are there such that we can order every player (only once) such that it forms a cycle. i.e.
$$P_1 > P_2 > P_2 > \dots > P_n > P_1$$

Some of my thoughts::
There cannot be cycle if there is Total Winner or Total Looser. I found (by using Principle of Inclusion Exclusion) out there exists $$2^{\frac{n(n-1)}{2}}-(2n)2^{\frac{(n-1)(n-2)}{2}}+n(n-1)2^{\frac{(n-3)(n-2)}{2}}$$ possible results of the tournament where there is no Total Winner or no Total looser.

ADDED:: I wrote a short script for total matches outcomes and outcomes with no total winner or looser. But couldn't write more to detect cycles. For $n=3$ & $n=4$, all matches where there is no total winner or total looser have some sort of cycles.

ADDED::

Here is updated code.
If three players played game, player $(1), (2)$, and $(3)$ the outcomes are

[(1, 2), (1, 3), (2, 3)] $ \leftarrow (1)$ is total winner so there can't be cycle.
[(1, 2), (1, 3), (3, 2)]
[(1, 2), (3, 1), (2, 3)]
[(1, 2), (3, 1), (3, 2)]
[(2, 1), (1, 3), (2, 3)]
[(2, 1), (1, 3), (3, 2)]
[(2, 1), (3, 1), (2, 3)]
[(2, 1), (3, 1), (3, 2)]

Here, $(1,2)$ means match was played by $(1)$ and $(2)$ and $(1)$ won the game.

The following forms a cycle (also it is the only outcome where there are no total winner and total looser)

[(1, 2), (3, 1), (2, 3)] $ \implies 1>2>3>1$
[(2, 1), (1, 3), (3, 2)] $\implies 1>3>2>1$

Thanks you in advance.

Best Answer

In graph theory, the default meaning of the word tournament is round-robin tournament. I.e., a tournament is an oriented complete graph; each pair of distinct vertices (nodes, players) is joined by a single directed edge in one direction; a directed edge $xy$ means that player x beats player y. In the context of tournaments (or more general directed graphs), the words path and cycle refer to directed paths and cycles. If $T$ is a tournament on $n$ vertices, a Hamiltonian cycle in $T$ is a cycle of length $n$, i.e., a cycle that contains all the vertices. Your question asks, of the $2^{\binom{n}{2}}=2^{n(n-1)/2}$ different tournaments on $n$ labeled vertices, how many have a Hamiltonian cycle?

Let's call two vertices $x$ and $y$ "equivalent" if there is a path from $x$ to $y$ and also a path from $y$ to $x$. It's easy to see that this is an equivalence relation; the equivalence classes are called the strong components of the tournament. The tournament is said to be strongly connected if all vertices are equivalent, i.e., if there is just one strong component. This notion is related to your question because of the following theorem. (The case $n=1$ is exceptional because, while a tournament on one node is strongly connected, it does not have a Hamiltonian cycle.)

Theorem 1. A tournament $T$ on $n$ vertices ($n\gt1$) has a Hamiltonian cycle if and only if it is strongly connected.

Proof. The "only if" is clear: if $T$ has a Hamiltonian cycle, then it is strongly connected. I will sketch a proof of the converse.

Suppose T is strongly connected; we have to show that $T$ has a Hamiltonian cycle. We start by showing that $T$ has a cycle, not necessarily of length $n$. Choose a directed edge $uv$. Since $T$ is strongly connected, there is a path from $v$ to $u$; this path, together with the edge $uv$, gives us a cycle in $T$.

Let $C$ be a cycle in $T$ of maximum length $m$; we have to show that $m=n$. Let $W$ (for "winners") be the set of all players that beat at least one player in $C$, i.e., $v\in W$ iff there is a directed edge from $v$ to some vertex in $C$. Similarly, let $L$ (for "losers") be the set of all players beaten by at least one player in $C$, i.e., $v\in L$ iff there is a directed edge to $v$ from some vertex in $C$. We consider several cases.

Case 1. $W=\emptyset=L$.

In this case, the cycle $C$ contains all vertices of $T$, and everything is fine. We shall see that each of the other cases leads to a contradiction.

Case 2. $W=\emptyset\ne L$.

Then $C$ has no "incoming" edges. If $u\in L$ and $v\in C$, then there is no path from $u$ to $v$, contradicting the assumption that $T$ is strongly connected.

Case 3. $W\ne\emptyset=L$.

If $u\in C$ and $v\in W$, then there is no path from $u$ to $v$, contradicting the assumption that $T$ is strongly connected.

Case 4. $W\cap L\ne\emptyset$.

If $v\in W\cap L$, then we can insert $v$ between two consecutive vertices of $C$ so as to obtain a cycle of length $m+1$, contradicting the assumed maximality of $m$.

Case 5. $W\ne\emptyset$, $L\ne\emptyset$, and $W\cap L=\emptyset$.

Since $T$ is strongly connected, there must be a directed edge $uv$ for some $u\in L$, $v\in W$. Then the vertices $u,v$ can be inserted in the cycle $C$ so as to obtain a cycle of length $m+2$, contradicting the assumed maximality of $m$. Q.E.D.

Thus, your question is equivalent to determining $a(n)$, the number of strongly connected labeled tournaments on $n$ vertices. This function is sequence number A054946 at the OEIS, the On-Line Encyclopedia of Integer Sequences. There you can find various information about this sequence, including references, tabulated values, and the following recurrence formula. Let $F(n)=2^{\binom{n}{2}}=2^{n(n-1)/2}$. Then (for $n\gt0$)$$F(n)=\sum_{s=1}^n\binom{n}{s}a(s)F(n-s).$$The recurrence is explained by the following structural property of tournaments:

Theorem 2. A nonempty tournament $T$ has a uniquely determined subtournament $S$ such that $S$ is nonempty and strongly connected, and each player in $S$ beats all players outside of $S$. Namely, $S$ consists of all players $u$ such that, for each $v\in T$, there is a path from $u$ to $v$.

Let's call the set $S$ in Theorem 2 the "top component" of $T$. (I don't know if it has an official name.) Now the meaning of the recurrence is clear: the term $\binom{n}{s}a(s)F(n-s)$ is just the number of tournaments on a set of $n$ labeled players whose top component has size $s$. Namely, there are $\binom{n}{s}$ ways to choose the elements of the top component $S$, then $a(s)$ ways to define a strongly connected tournament on the set $S$, and $F(n-s)$ ways to define a tournament on the set $T\setminus S$; of course, the edges between $S$ and $T\setminus S$ are all directed away from $S$.

Related Question