# Prove that every tournament contains at least one Hamiltonian path.

A tournament is a directed graph with exactly one edge between every pair of vertices. (So for each pair (u,v) of vertices, either the edge from u to v or from v to u exists, but not both.) You can think of the nodes as players in a tournament, where each player has to play against every other player. The edge points from the winner to the loser of a game. A Hamiltonian path (not cycle) is a sequence of consecutive directed edges that visits every vertex exactly once.

How can i prove that every tournament contains at least one Hamiltonian path? thanks your help!

• Perhaps you can start at an arbitrary node and traverse a path until you cannot go anymore. If your path exhausted all nodes, you have found a Hamiltonian path. Else, there must be a node you have not used yet that points in to the current node you stopped at. Then show you can always augment your path by adding one new node. Keep augmenting until you are done. Mar 4, 2016 at 4:54

This can be proven using strong induction. Let $n$ be the number of vertices. When $n \le 2$, a hamiltonian path clearly exists. Now, for any given $n > 2$, pick any arbitrary vertex $v$. Partition all other vertices other than $v$ into the sets $V_{out}$ and $V_{in}$ -- $V_{out}$ contains all other vertices $u$ such that the edge $(v, u)$ exists, while $V_{in}$ contains all other vertices $u$ such that the edge $(u, v)$ exists.

Clearly $|V_{out}| < n$ and $|V_{in}| < n$, so by the inductive hypothesis, there is a hamiltonian path in both sets. Let $H_{out}$ be any hamiltonian path in $V_{out}$ and $H_{in}$ be any hamiltonian path in $V_{in}$. You can then form a hamiltonian path for all vertices by concatenating $H_{in}$, $v$, and $H_{out}$.

• This (nice) argument works perfectly fine with $n = 0$ (not $n \leq 2$) as the induction base. Of course, one of the sets $V_{out}$ and $V_{in}$ can be empty for small $n$, but this can just as well happen for large $n$, so extending the induction base to $n \leq 2$ doesn't help. (Fortunately, the case when one of $V_{out}$ and $V_{in}$ is empty is easy to handle: just let $H_{in}$, resp. $H_{out}$, be an empty list of vertices.) Feb 6, 2017 at 5:18
• It's been some time now, but can you clarify the concatenations, I can understand it intuitively, Laszlo Redei's proof is stronger form of the concatenation part. But is there an easier way to put it, in this context?
– 0x13
Feb 19 at 5:27

A bit complicated for this problem, but the idea is often useful for other problems.

Let $$V=\{v_1,v_2,\ldots,v_n\}$$ be the set of vertices and $$E$$ be the set of edges of the graph $$G$$. Consider all permutations $$v_{\pi(1)},v_{\pi(2)},\ldots,v_{\pi(n)}$$ (here $$\pi\in S_n$$) and for each one count the number of "left-right" arrows, i. e. denote $$f(\pi):=|\{(i,j)\mid 1\leq i Now choose permutation $$\pi\in S_n$$ which maximizes the value of $$f(\pi)$$. We claim that $$v_{\pi(1)},v_{\pi(2)},\ldots,v_{\pi(n)}$$ is a desired Hamiltonian path. Indeed, if for some index $$i\in\{1,2,\ldots,n-1\}$$ we have $$\overrightarrow{v_{\pi(i)}v_{\pi(i+1)}}\notin E$$, then $$\overrightarrow{v_{\pi(i+1)}v_{\pi(i)}}\in E$$. Hence, if we "swap" $$\pi(i)$$ and $$\pi(i+1)$$ the value $$f(\pi)$$ will increase, which is impossible.

Or more formally, consider another permutation $$\pi'\in S_n$$ defined as follows: $$\pi(j)=\pi'(j)$$ for $$j\neq i, i+1$$ and $$\pi'(i)=\pi(i+1)$$, $$\pi'(i+1)=\pi(i)$$. Now, note that $$f(\pi')=f(\pi)+1>f(\pi)$$.

Therefore, our tournament contains Hamiltonian path $$v_{\pi(1)},v_{\pi(2)},\ldots,v_{\pi(n)}$$, as desired.

• A permutation that maximises forward edges is called a "median order" Jun 7, 2020 at 18:48

Let T = (V,E) be a tournment.

Let P = $$w_{1} w_2 \cdots w_{m}$$ be a maximum lenght path starting with vertex $$w_1$$.

Let W = $$\{ w_{1}, w_2, \cdots, w_{m} \}$$ be the set of vertices of path P.

Suppose that $$W \subset V$$ (proper subset).

Then there exists $$v \in V$$ such that $$v \notin W$$.

Clearly any one of these pairs $$(v,w_{1})$$ and $$(w_{m},v)$$ cannot be edge of T, otherwise contradicts the maximum lenght.

Consider pair $$(w_{m-1},v)$$, if this pair is an edge of T, then $$P_{m-1} = w_{1} w_2 \cdots, w_{m-1} v w_{m}$$ is a path of greater length. A contradiction.

So the pair $$(v,w_{m-1})$$ is an edge of T.

Similarly the pair $$(v,w_{m-2})$$ is an edge of T. Otherwise $$P_{m-2} = w_{1} w_2 \cdots, w_{m-2} v w_{m-1} w_{m}$$ is a path of greater length. A contradiction.

Suppose $$(v, w_{i})$$ is an edge of T.

This implies that $$(v,w_{i-1})$$ is an edge of T. Otherwise $$P_{i-1} = w_{1} w_2 \cdots w_{i-1} v w_{i} \cdots w_{m}$$ is a path of greater length. A contradiction.

So by induction, $$(v,w_{2})$$ is an edge of T.

Then $$P_{1} = w_{1} v w_{2} w_{3} \cdots w_{m-1} w_{m}$$ is a path of greater length. A contradiction.

So every case is a contradiction.

Hence W = V.

This implies existence of Hamiltonian path in a Tournment T.

We prove this by induction on the number of vertices. If a tournament has just one vertex, the claim is true – the path containing just the single vertex is Hamiltonian. Now assume we know the claim is true for all tournaments on n vertices, and consider a tournament $$G$$ on $$n + 1$$ vertices. Let $$v$$ be any vertex in $$G$$. If we delete $$v$$ (and all edges with $$v$$ as an endpoint), the remaining tournament on n edges must have a Hamiltonian path by the inductive hypothesis. Label the vertices in this path $$v_1, v_2, . . . v_n$$. In the original tournament $$G$$, consider the possible orientations of the edges incident to $$v$$: There are three cases:

Case 1: If $$vv_1$$ is an edge (i.e. the edge containing $$v$$ and $$v_1$$ is oriented towards $$v_1$$), then there is a Hamiltonian path with vertex order $$v, v_1, . . . , v_n.$$

Illustration of Case 1

Case 2: If $$v_nv$$ is an edge, there is a Hamiltonian path with vertex order $$v_1, . . . , v_n, v.$$

enter image description here

Case 3: If Case 1 and Case 2 do not hold, as you look through the edges incident to v in order (starting with the edge containing v1, then the edge containing $$v_2$$, etc...) there must come a point where the edges switch from pointing towards v to pointing away from v. That is, there is at least one number $$1 ≤ i ≤ n − 1$$ for which $$v_iv$$ is an edge and $$vv_{i+1}$$ is an edge. Then there is a Hamiltonian path with vertex order $$v_1, v_2, . . . , v_i, v, v_{i+1}, . . . , v_n$$.

Illustration Case 3

• I can't understand the case where all edges incident on v are directed towards v.. in that case could we get a directed v to vi path ? Sep 14, 2022 at 18:52

Here is another proof for the problem.

For 2 vertices, we will always have a hamiltonian path.

Proof Idea:
In a graph with 2 vertices, we have a hamiltonian path.

1. We will take that path of 2 vertices.
2. Add another vertex to the graph(let's suppose it is 3). Now, as the tournament is complete, This newly added vertex will have an edge with each other vertex.
3. Take the last vertex from the hamiltonian path with 2 vertices. Suppose, this vertex is 2. If we add the direction from 2->3, we will immediately have a hamiltonian path. So, we will add the direction as 3->2.
4. Similarly, if the first vertex in 2 length of hamiltonian path is 1, Adding an edge 3->1 immediately creates a hamiltonian path of length 3. So, we will add 1->3.

But this creates another hamiltonian path 1->3->2!

Now, We will take the 3 sized hamiltonian path from the tournament of 3 size which we just proved. Add a 4th vertex. We will do similar tasks as we just did for tournament size 2.
This time, the only difference is we have one mid vertex whose direction is not specified yet. We can see that whatever the direction is, it will always create a hamiltonian path. Because the direction of 'the newly added vertex and the first vertex' and the direction of 'the newly added vertex and the last vertex' will always be opposite.
So, we have a hamiltonian path for 4 vertices.

Construction for a general case:
Following this way, let's suppose we have a hamiltonian path for n vertices. What we will do is,

1. Take the n sized hamiltonian path, 1 to n.
2. Add a new vertex, n+1.
3. Add an edge between n+1 -> n.
4. Add an edge between 1 -> n+1. No path is detected yet.
5. Connect each of 2,3,...n-1 with n+1(We must because it is a tournament). But don't add direction.
6. As direction between 1->n+1 and n+1->n is opposite, when all the directions for 2,3,...n-1 to n+1 are added, three cases might appear.
-All might be in upward direction. then, we have a hamiltonian path 1->2->3->...->n-1->n+1->n
-All might be in downward direction. We have a hamiltonian path of 1->n+1->2->3->...->n
-Arbitrary direction including atleast one upward and one downward direction. That will lead to an hamiltonian path.
So, for any n, there will be atleast one hamiltonian path in a tournament.
• Correct, but I'd point out a minor but crucial detail: we get a Hamiltonian path not just from "one upward and one downward direction" but when we find them consecutively: some $i$ for which we have edges $i \to n+1$ and $n+1 \to i+1$. Assuming we have edges $1 \to n+1$ and $n+1 \to n$, we can find such an $i$ by choosing $i$ to be the largest value with an edge $i \to n+1$, in which case the edge between $i+1$ and $n+1$ must point $n+1 \to i+1$. Aug 25, 2019 at 21:11
• Thank you @MishaLavrov . This makes the proof more concrete. Aug 26, 2019 at 20:20