JB Math Club 26-27 · Lecture 6

Directed Graphs and Tournaments

Directed Graphs and Tournaments · Problem set

Problems 1–7 use automatic grading: submit a number for Problems 1–4 and a formula for Problems 5–7. Submit full written solutions to Problems 8–10. Present Problems 11–12 orally and be ready to explain your reasoning and answer follow-up questions.

Problem 1. Mutual criticism

Automatic submission

Each of $35$ philosophers criticizes exactly $k$ of the other $34$ philosophers. What is the smallest integer $k$ that guarantees that two philosophers criticize each other?

Solution

Idea. In the absence of mutual criticism, each unordered pair accounts for at most one criticism.

There are $35k$ criticisms and $\binom{35}{2}=595$ unordered pairs. If no pair is mutual,

$$35k\le595,\qquad k\le17.$$

Therefore $k=18$ forces mutual criticism.

Sharpness. Label the philosophers $0,1,\ldots,34$ around a circle. Philosopher $i$ criticizes the next $17$, with labels modulo $35$. Every philosopher criticizes exactly $17$ others, and exactly one criticism occurs in each pair. Thus $k=17$ does not suffice. Taking fewer successive neighbours similarly gives counterexamples for all smaller $k$.

$$18$$

Problem 2. The capital city

Automatic submission

A country has a capital city and $100$ other cities. Some pairs of distinct cities are joined by one one-way road, with at most one road per pair. Every non-capital city has exactly $n$ outgoing roads and exactly $21$ incoming roads. What is the largest possible value of $n$?

Solution

Let $a$ and $b$ be the numbers of roads entering and leaving the capital. Summing all out-degrees and all in-degrees gives

$$100n+b=100\cdot21+a.$$

At most $100$ roads enter the capital and $b\ge0$. Thus $100(n-21)=a-b\le100$, so $n\le22$.

Construction. Label the other cities $0,1,\ldots,99$ around a circle. From city $i$, draw roads to $i+1,i+2,\ldots,i+21$, with labels taken modulo $100$. Each ordinary city now has $21$ outgoing and $21$ incoming roads. No pair receives opposite roads, because a forward difference at most $21$ has reverse difference at least $79$.

Finally add a road from every ordinary city to the capital. Their out-degrees become $22$ and their in-degrees remain $21$.

$$22$$

Problem 3. Cyclic triples

Automatic submission

Eight teams play a round-robin tournament with no draws. Their numbers of wins are $2,2,3,3,4,4,5,5$. How many groups of three teams have cyclic results, meaning that each team beats one of the other two? Count unordered groups of three teams.

Solution

Idea. Count the triples that are not cyclic, using the player who beats both others.

On three vertices, a tournament is either a directed triangle or has exactly one vertex with two wins. A team with $d$ wins is this top team in exactly $\binom d2$ triples: choose any two teams it defeated.

Each noncyclic triple is counted exactly once, and no cyclic triple is counted. Hence

$$\begin{aligned}\#\text{cyclic triples}&=\binom83-2\left(\binom22+\binom32+\binom42+\binom52\right)\\&=56-2(1+3+6+10)=16.\end{aligned}$$

The same argument gives $\binom N3-\sum_{i=1}^{N}\binom{d_i}{2}$ cyclic triples in any tournament with $N$ teams and win totals $d_1,\ldots,d_N$.

$$16$$

Problem 4. Four prescribed components

Automatic submission

A tournament has twelve labelled vertices $1,2,\ldots,12$, with exactly one directed edge between every pair. Its strongly connected components are exactly $\{1,2,3\}$, $\{4,5,6\}$, $\{7,8,9\}$ and $\{10,11,12\}$. Their order is not specified. How many such tournaments exist? Different orientations of any labelled pair count as different tournaments.

Solution

Idea. First choose the orientation inside each component. Then order the components.

A strongly connected tournament on three vertices must be a directed triangle. On a fixed labelled triple there are exactly two such orientations. The four internal choices give $2^4$ possibilities.

All edges between two distinct components point the same way. Otherwise an edge in each direction, together with paths inside the components, would make the two components mutually reachable and hence merge them.

The condensation is therefore a tournament. It has no directed cycle, so it has a unique linear order in which all arrows point forward. We may choose any of the $4!$ orders of the four fixed groups. Once the order is chosen, every edge between groups is forced.

$$2^4\cdot4!=16\cdot24=384.$$

Conversely, every construction just described has exactly the four prescribed components. The internal triangles are strongly connected and an earlier component cannot be reached from a later one.

$$384$$

Problem 5. Many teams with the same score

Automatic submission

A round-robin volleyball tournament has $3n+1$ teams, where $n\ge1$. Every pair plays exactly one match, with one winner and one loser. What is the largest possible number of teams with exactly $2n$ wins? Give a formula in $n$.

Solution

Idea. Teams with $2n$ wins have exactly $n$ losses. Count the matches played within this group using their losses.

Suppose there are $t>0$ such teams. Their total number of losses is $tn$. Every match between two of them contributes one loss within the group, so

$$\binom t2\le tn,\qquad t-1\le2n,\qquad t\le2n+1.$$

The case $t=0$ already satisfies this bound.

Construction. Take a group of $2n+1$ teams and arrange them around a circle. Each team beats the next $n$ members of this group and loses to the previous $n$. Let all members of the group beat all of the remaining $n$ teams.

Each team in the group has $n$ wins inside it and $n$ wins outside it, for exactly $2n$. Each remaining team has at most $n-1$ wins. Thus precisely $2n+1$ teams achieve the required score.

This includes $n=1$, when three teams form a directed triangle and all beat the fourth team.

$$2n+1$$

Problem 6. Keys in locked boxes

Automatic submission

There are $n$ locked boxes, numbered $1,\ldots,n$, and $n$ keys. Key $i$ opens only box $i$. The keys are distributed uniformly at random among the boxes, one key per box; a key may be inside the box it opens. You may force open boxes $1,\ldots,k$, where $1\le k\le n$, without damaging their contents. Every other box must be opened with its key. Keys recovered from opened boxes may be used to open further boxes and recover more keys. What is the probability that you can eventually open all $n$ boxes? Give a formula in $n$ and $k$.

Solution

When can we open every box? Draw $i\to j$ if box $i$ holds the key to box $j$. For example, if $1\to4\to6\to1$, forcing box $1$ gives us the key to box $4$. Inside box $4$ we find the key to box $6$, and inside box $6$ we find the key to the box where we started.

Each box holds one key, and each key occurs once. Thus exactly one arrow leaves each box and exactly one enters it. The boxes form disjoint cycles. Opening one box lets us open its entire cycle. If a cycle contains no box we may force open, every key we would need to enter it is locked inside it. So a placement works exactly when each cycle contains at least one of boxes $1,\ldots,k$.

How can we add one box? Start with boxes $1,\ldots,k$ and their keys. All $k!$ placements work because we may force open every one of these boxes. Suppose we now have a placement that works for $m$ boxes. We want to add box $m+1$ and its key.

Choose any old box $a$. Take the key it holds, say the key to $b$, and move it into the new box. Put the key to the new box in $a$. Now opening $a$ leads us through the new box on the way to $b$.

$$a\to b\qquad\text{becomes}\qquad a\to(m+1)\to b.$$

This lengthens one cycle by one box. We can still open every box on that cycle, including the new one. There are $m$ choices for $a$.

Have we counted every placement exactly once? Take any placement that works on $m+1$ boxes. Find the key to box $m+1$. It must be in an old box $a$, since a key locked inside its own box would leave box $m+1$ impossible to open. Take the key out of box $m+1$, put it back in $a$ in place of the key to $m+1$, and remove the new box and its key.

The shortened cycle still contains the same box we could force open. This recovers a working placement on $m$ boxes. The location of the key to $m+1$ tells us exactly which box $a$ was chosen, so the reverse step is unique.

We start with $k!$ placements. Adding box $k+1$ gives $k$ choices, adding the next gives $k+1$ choices, and adding box $n$ gives $n-1$ choices. The number of working placements is therefore

$$k!\,\prod_{m=k}^{n-1}m=k!\,\frac{(n-1)!}{(k-1)!}=k(n-1)!.$$

All $n!$ placements are equally likely. Dividing $k(n-1)!$ by $n!$ gives the probability below. When $k=n$, we can force open every box, and the formula gives $1$.

$$\frac{k}{n}$$

Problem 7. A very long shortest route

Automatic submission

A country has $n\ge3$ cities, with one road joining each pair. The Minister of Transport closes some roads and gives each retained road one direction. Afterwards, for every city $A$ there is a city $B$ such that the shortest directed route from $A$ to $B$ uses exactly $n-1$ roads. How many roads were closed? Give a formula in $n$.

Solution

Idea. Look at the first step of a longest possible shortest route. An extra outgoing road would shorten that route.

Fix any city $A$. A shortest route of length $n-1$ from $A$ cannot repeat a vertex, since deleting the part between repetitions would shorten it. Write the route as

$$A=v_0\to v_1\to\cdots\to v_{n-1}=B.$$

The route visits all $n$ cities. If $A$ had an outgoing road to $v_j$ for some $j\ge2$, we could use it and then follow the remaining part of the route. This would reach $B$ in $1+(n-1-j)=n-j<n-1$ steps.

Therefore the only outgoing road from $A$ is $A\to v_1$. Since the argument works for every city, each city has out-degree one. The total number of retained roads is consequently $n$.

Attainment. Retain a directed cycle through all cities and close every other road. From any city, its predecessor on the cycle is exactly $n-1$ steps away. Hence the condition is achievable for every $n\ge3$.

$$\#\text{closed roads}=\binom n2-n=\frac{n(n-3)}2.$$

In fact the condition forces the retained network to be a single directed cycle. Each city can reach all cities along its displayed shortest route, and every city has just one possible next step.

$$\binom n2-n=\frac{n(n-3)}2$$

Problem 8. A fair ranking

Written submission

In a round-robin tournament, every pair of players plays once, and there are no draws. Prove that the players can be arranged in a ranking so that every player defeated at least half of the players below them and lost to at least half of the players above them.

Solution

Idea. Repair one dissatisfied player at a time. We need one integer that improves after every permitted repair, even if another player becomes dissatisfied.

The process. Start with any ranking. If a player lost to more than half of the players below them, move that player to the bottom, preserving the relative order of everyone else. If a player defeated more than half of the players above them, move that player to the top, again preserving all other relative orders. Whenever a move is possible, perform one; either type of move may be chosen.

Let $N$ be the number of players. Use the following semi-invariant:

$$F=\#\{\text{matches whose winner is ranked above their loser}\}.$$

Moving to the bottom. Suppose the moved player defeated $w$ of the players below them and lost to $\ell$ of them. The move is allowed when $\ell>w$. Only comparisons with these crossed players change. The $\ell$ losses now agree with the ranking, while the $w$ wins no longer agree. Therefore

$$\Delta F=\ell-w>0.$$

Moving to the top. If the player defeated $w$ of the players above them and lost to $\ell$ of them, this move is allowed when $w>\ell$. It makes $w$ matches agree with the ranking and makes $\ell$ cease to agree. Thus

$$\Delta F=w-\ell>0.$$

Termination. Every move strictly increases the integer $F$, while

$$0\le F\le\binom N2.$$

The process therefore stops after at most $\binom N2-F_0$ moves, where $F_0$ is its initial value. At termination, no player lost to more than half of those below them, so each defeated at least half of them. Likewise, no player defeated more than half of those above them, so each lost to at least half of them. These are exactly the two required conditions.

The number of satisfied players need not increase after a move. The argument uses the total number of agreeing match results, which does increase after every move.

$$\text{The process terminates at a fair ranking.}$$

Problem 9. Six tourists and their photographs

Written submission

Six tourists visit several landmarks. At each landmark, a nonempty proper subset of the tourists poses together, and each of the remaining tourists takes a photograph of that group. Each tourist keeps the photographs they take. What is the minimum number of landmarks needed so that every tourist has a photograph containing each of the other five tourists? Prove your answer.

Solution

Idea. Record the landmarks where each tourist appears in a photograph. To photograph another tourist, a person must be behind the camera while the other is in front of it.

For tourist $X$, let $S_X$ be the set of landmarks where $X$ poses. Tourist $X$ photographs tourist $Y$ exactly when some landmark belongs to $S_Y$ but not to $S_X$. Thus for each pair $X\ne Y$ we need both $S_Y\setminus S_X\ne\varnothing$ and $S_X\setminus S_Y\ne\varnothing$. In particular, their sets are distinct and neither contains the other.

Why three landmarks do not suffice. A tourist must pose at least once and take photographs at least once, so neither the empty set nor the full set is allowed. With three landmarks, the only six remaining sets are the three one-element sets and the three two-element sets. Six tourists would have to use all six. But then one tourist has $S_X=\{1\}$ and another has $S_Y=\{1,2\}$. Whenever $X$ poses, so does $Y$, so $Y$ never photographs $X$. This is a contradiction. With fewer landmarks there are even fewer available distinct sets.

Four-landmark construction. Assign the tourists the six two-element subsets of $\{1,2,3,4\}$. A $1$ means posing and a $0$ means taking a photograph.

TouristLandmark 1Landmark 2Landmark 3Landmark 4
A1100
B1010
C1001
D0110
E0101
F0011

Any two distinct two-element sets each contain an element missing from the other. Consequently, each tourist photographs every other tourist somewhere. At every landmark exactly three tourists pose and the other three take photographs.

The minimum is therefore four. The family of posing sets is an example of an antichain, a collection in which no distinct set contains another. The elementary argument above establishes the required bound without a general theorem about antichains.

$$4$$

Problem 10. Two rounds of wrestling

Written submission

There are $2n$ wrestlers, where $n\ge2$, and all have different strengths. The stronger wrestler always wins. In each of two rounds the wrestlers are divided into pairs and every pair wrestles once. No pair wrestles together in both rounds. Wrestlers who win both matches receive prizes. What is the smallest possible number of prize winners? Prove your answer.

Solution

Idea. The strongest wrestler gives an unavoidable winner. Pair the others so that their wins alternate between the two rounds.

At least one prize is necessary, because the strongest wrestler wins against either opponent.

Construction. Number the wrestlers $1,2,\ldots,2n$ in increasing order of strength. Use the following pairings.

$$\begin{aligned}\text{Round 1}&:\ (1,2),(3,4),\ldots,(2n-1,2n),\\\text{Round 2}&:\ (2,3),(4,5),\ldots,(2n-2,2n-1),(2n,1).\end{aligned}$$

Round 1 is won by $2,4,\ldots,2n$. Round 2 is won by $3,5,\ldots,2n-1$ and $2n$. Their only common winner is wrestler $2n$. Each row pairs all wrestlers once and, because $n\ge2$, the two rounds share no pair.

For eight wrestlers, consecutive edges of the cycle alternate between the two rounds. Larger labels are stronger.
For eight wrestlers, consecutive edges of the cycle alternate between the two rounds. Larger labels are stronger.

The construction achieves the lower bound, so exactly one prize can be forced. If repeated pairings were allowed and $n=1$, the answer would also be one, but two different pairings are impossible in that case.

$$1$$

Problem 11. A fair game

Oral submission

Emily wants to generalize rock-paper-scissors to a game with $n\ge3$ gestures. For every pair of different gestures, exactly one defeats the other. Identical gestures produce a draw. Against an opponent who chooses uniformly at random among all $n$ gestures, every gesture should have the same probability of winning. For which values of $n$ is this possible? Describe suitable rules for every possible value and prove that the other values are impossible.

Solution

Idea. Against a uniformly chosen opposing gesture, a gesture with $d$ wins has winning probability $d/n$. Equal probabilities therefore mean equal out-degrees in a tournament.

If every gesture defeats exactly $d$ others, counting all wins gives

$$nd=\binom n2,\qquad d=\frac{n-1}{2}.$$

Thus $n$ must be odd.

Construction for every odd value. Write $n=2m+1$. Label the gestures $0,1,\ldots,2m$ around a circle. Gesture $i$ defeats $i+1,i+2,\ldots,i+m$, with indices modulo $2m+1$. The reverse difference lies between $m+1$ and $2m$, so exactly one gesture wins in every distinct pair. Every gesture has $m$ wins and $m$ losses.

The common winning probability is $(n-1)/(2n)$, the losing probability is the same, and the drawing probability is $1/n$.

$$n\ge3\text{ and }n\text{ is odd}$$

Problem 12. Two conflicting tournament reports

Oral submission

Two newspapers publish reports of the same round-robin tournament, in which every pair of players plays once and there are no draws. They agree on every player's total number of wins but may disagree about individual matches. A newspaper may make the following correction: choose distinct players $A_1,\ldots,A_k$, where $k\ge3$, whose current reported results say that $A_1$ beat $A_2$, $A_2$ beat $A_3$, and so on, with $A_k$ beating $A_1$; then reverse the results of exactly those $k$ matches. Prove that the first report can be transformed into the second by a sequence of such corrections.

Solution

Idea. Draw only the matches on which the two newspapers disagree. The equal win totals become a local balance condition in this smaller graph.

Fix the second report as the target. For each disputed match, draw an arrow from its winner to its loser according to the current first report. Do not draw any match on which the reports already agree.

Balance at every vertex. For a player $v$, let $c(v)$ be the number of wins on which the reports agree. If $d^+(v)$ and $d^-(v)$ are the outgoing and incoming disputed arrows, the two reported win totals are $c(v)+d^+(v)$ and $c(v)+d^-(v)$. Since these totals coincide,

$$d^+(v)=d^-(v).$$

Find a directed cycle. If any disputed arrow remains, start with it and continue following outgoing disputed arrows. After arriving at a vertex, its positive in-degree and the balance identity guarantee positive out-degree, so the walk cannot get stuck. There are finitely many players, so a vertex eventually repeats. Stop at the first repetition; the intervening part is a directed cycle with distinct vertices. It has at least three vertices because there are no loops and no pair has arrows in both directions.

Correct that cycle. Reverse its match results in the first report. Each match on the cycle now agrees with the target, and no other match changes. Each player on the cycle exchanges one win and one loss, so every win total is preserved.

Repeat. The number of disputed matches strictly decreases at every correction and cannot fall below zero. If any disputes remained when the procedure stopped, the balanced disagreement graph would contain another cycle, so another correction would be possible. Hence the process ends with no disputes: the two reports coincide.

$$\text{A sequence of cycle corrections always exists.}$$