Maths Olympiad Prep

Track / Stage 9 / 24 of 52 #2544 of 2604

Problem 2544

IMO P2/P5; hard shortlist
Combinatorics Difficulty 9.3 Prove it IMO Shortlist · IMO · 2021

The kingdom of Anisotropy consists of nn cities. For every two cities there exists exactly one direct one-way road between them. We say that a path from XX to YY is a sequence of roads such that one can move from XX to YY along this sequence without returning to an already visited city. A collection of paths is called diverse if no road belongs to two or more paths in the collection.
Let AA and BB be two distinct cities in Anisotropy. Let NABN_{A B} denote the maximal number of paths in a diverse collection of paths from AA to BB. Similarly, let NBAN_{B A} denote the maximal number of paths in a diverse collection of paths from BB to AA. Prove that the equality NAB=NBAN_{A B}=N_{B A} holds if and only if the number of roads going out from AA is the same as the number of roads going out from BB.

This one wants a proof. Work it on paper, then read the official solution and mark yourself. Be honest about it: the record is only any use to you if it is.

Next problem →

Official solutions — 2

Solution 1

We write X→YX \rightarrow Y (or Y←XY \leftarrow X) if the road between XX and YY goes from XX to YY. Notice that, if there is any route moving from XX to YY (possibly passing through some cities more than once), then there is a path from XX to YY consisting of some roads in the route. Indeed, any cycle in the route may be removed harmlessly; after some removals one obtains a path.

Say that a path is short if it consists of one or two roads.

Partition all cities different from AA and BB into four groups, I\mathcal{I}, O\mathcal{O}, A\mathcal{A}, and B\mathcal{B} according to the following rules: for each city CC,
C∈I⟺A→C←B;C∈O⟺A←C→B;C∈A⟺A→C→B;C∈B⟺A←C←B. \begin{array}{ll} C \in \mathcal{I} \Longleftrightarrow A \rightarrow C \leftarrow B ; & C \in \mathcal{O} \Longleftrightarrow A \leftarrow C \rightarrow B ; \\ C \in \mathcal{A} \Longleftrightarrow A \rightarrow C \rightarrow B ; & C \in \mathcal{B} \Longleftrightarrow A \leftarrow C \leftarrow B . \end{array}

Lemma. Let P\mathcal{P} be a diverse collection consisting of pp paths from AA to BB. Then there exists a diverse collection consisting of at least pp paths from AA to BB and containing all short paths from AA to BB.

Proof. In order to obtain the desired collection, modify P\mathcal{P} as follows.
If there is a direct road A→BA \rightarrow B and the path consisting of this single road is not in P\mathcal{P}, merely add it to P\mathcal{P}.
Now consider any city C∈AC \in \mathcal{A} such that the path A→C→BA \rightarrow C \rightarrow B is not in P\mathcal{P}. If P\mathcal{P} contains at most one path containing a road A→CA \rightarrow C or C→BC \rightarrow B, remove that path (if it exists), and add the path A→C→BA \rightarrow C \rightarrow B to P\mathcal{P} instead. Otherwise, P\mathcal{P} contains two paths of the forms A→C→BA \rightarrow C \rightarrow B and A→C→BA \rightarrow C \rightarrow B, where C→BC \rightarrow B and A→CA \rightarrow C are some paths. In this case, we recombine the edges to form two new paths A→C→BA \rightarrow C \rightarrow B and A→C→BA \rightarrow C \rightarrow B (removing cycles from the latter if needed). Now we replace the old two paths in P\mathcal{P} with the two new ones.
After any operation described above, the number of paths in the collection does not decrease, and the collection remains diverse. Applying such operation to each C∈AC \in \mathcal{A}, we obtain the desired collection. □\square

Back to the problem, assume, without loss of generality, that there is a road A→BA \rightarrow B, and let aa and bb denote the numbers of roads going out from AA and BB, respectively. Choose a diverse collection P\mathcal{P} consisting of NABN_{A B} paths from AA to BB. We will transform it into a diverse collection Q\mathcal{Q} consisting of at least NAB+(b−a)N_{A B}+(b-a) paths from BB to AA. This construction yields
NBA⩾NAB+(b−a);similarly, we getNAB⩾NBA+(a−b), N_{B A} \geqslant N_{A B}+(b-a) ; \quad \text{similarly, we get} \quad N_{A B} \geqslant N_{B A}+(a-b),
whence NBA−NAB=b−aN_{B A}-N_{A B}=b-a. This yields the desired equivalence.

Apply the lemma to get a diverse collection P′\mathcal{P}^{\prime} of at least NABN_{A B} paths containing all ∣A∣+1|\mathcal{A}|+1 short paths from AA to BB. Notice that the paths in P′\mathcal{P}^{\prime} contain no edge of a short path from BB to AA. Each non-short path in P′\mathcal{P}^{\prime} has the form A→C→D→BA \rightarrow C \rightarrow D \rightarrow B, where C→DC \rightarrow D is a path from some city C∈IC \in \mathcal{I} to some city D∈OD \in \mathcal{O}. For each such path, put into Q\mathcal{Q} the path B→C→D→AB \rightarrow C \rightarrow D \rightarrow A; also put into Q\mathcal{Q} all short paths from BB to AA. Clearly, the collection Q\mathcal{Q} is diverse.

Now, all roads going out from AA end in the cities from I∪A∪{B}\mathcal{I} \cup \mathcal{A} \cup \{B\}, while all roads going out from BB end in the cities from I∪B\mathcal{I} \cup \mathcal{B}. Therefore,
a=∣I∣+∣A∣+1,b=∣I∣+∣B∣,and hencea−b=∣A∣−∣B∣+1. a=|\mathcal{I}|+|\mathcal{A}|+1, \quad b=|\mathcal{I}|+|\mathcal{B}|, \quad \text{and hence} \quad a-b=|\mathcal{A}|-|\mathcal{B}|+1 .
On the other hand, since there are ∣A∣+1|\mathcal{A}|+1 short paths from AA to BB (including A→BA \rightarrow B) and ∣B∣|\mathcal{B}| short paths from BB to AA, we infer
∣Q∣=∣P′∣−(∣A∣+1)+∣B∣⩾NAB+(b−a), |\mathcal{Q}|=\left|\mathcal{P}^{\prime}\right|-(|\mathcal{A}|+1)+|\mathcal{B}| \geqslant N_{A B}+(b-a),
as desired.

Solution 2

We recall some graph-theoretical notions. Let GG be a finite graph, and let VV be the set of its vertices; fix two distinct vertices s,t∈Vs, t \in V. An (s,t)(s, t)-cut is a partition of VV into two parts V=S⊔TV=S \sqcup T such that s∈Ss \in S and t∈Tt \in T. The cut-edges in the cut (S,T)(S, T) are the edges going from SS to TT, and the size e(S,T)e(S, T) of the cut is the number of cut-edges.

We will make use of the following theorem (which is a partial case of the Ford-Fulkerson "min-cut max-flow" theorem).

Theorem (Menger). Let GG be a directed graph, and let ss and tt be its distinct vertices. Then the maximal number of edge-disjoint paths from ss to tt is equal to the minimal size of an (s,t)(s, t)-cut.

Back to the problem. Consider a directed graph GG whose vertices are the cities, and edges correspond to the roads. Then NABN_{A B} is the maximal number of edge-disjoint paths from AA to BB in this graph; the number NBAN_{B A} is interpreted similarly.

As in the previous solution, denote by aa and bb the out-degrees of vertices AA and BB, respectively. To solve the problem, we show that for any (A,B)(A, B)-cut (SA,TA)(S_{A}, T_{A}) in our graph there exists a (B,A)(B, A)-cut (SB,TB)(S_{B}, T_{B}) satisfying
e(SB,TB)=e(SA,TA)+(b−a) e\left(S_{B}, T_{B}\right)=e\left(S_{A}, T_{A}\right)+(b-a)
This yields
NBA⩽NAB+(b−a);similarly, we getNAB⩽NBA+(a−b), N_{B A} \leqslant N_{A B}+(b-a) ; \quad \text{similarly, we get} \quad N_{A B} \leqslant N_{B A}+(a-b),
whence again NBA−NAB=b−aN_{B A}-N_{A B}=b-a.

The construction is simple: we put SB=SA∪{B}\{A}S_{B}=S_{A} \cup \{B\} \backslash \{A\} and hence TB=TA∪{A}\{B}T_{B}=T_{A} \cup \{A\} \backslash \{B\}. To show that it works, let A and B denote the sets of cut-edges in (SA,TA)(S_{A}, T_{A}) and (SB,TB)(S_{B}, T_{B}), respectively. Let asa_{s} and at=a−asa_{t}=a-a_{s} denote the numbers of edges going from AA to SAS_{A} and TAT_{A}, respectively. Similarly, denote by bsb_{s} and bt=b−bsb_{t}=b-b_{s} the numbers of edges going from BB to SBS_{B} and TBT_{B}, respectively.

Notice that any edge incident to none of AA and BB either belongs to both A and B, or belongs to none of them. Denote the number of such edges belonging to A by cc. The edges in A which are not yet accounted for split into two categories: those going out from AA to TAT_{A} (including A→BA \rightarrow B if it exists), and those going from SA\{A}S_{A} \backslash \{A\} to BB - in other words, going from SBS_{B} to BB. The numbers of edges in the two categories are ata_{t} and ∣SB∣−1−bs|S_{B}|-1-b_{s}, respectively. Therefore,
∣A∣=c+at+(∣SB∣−bs−1).Similarly, we get∣B∣=c+bt+(∣SA∣−as−1), |\mathrm{A}|=c+a_{t}+\left(|S_{B}|-b_{s}-1\right) . \quad \text{Similarly, we get} \quad|\mathrm{B}|=c+b_{t}+\left(|S_{A}|-a_{s}-1\right),
and hence
∣B∣−∣A∣=(bt+bs)−(at+as)=b−a, |\mathrm{B}|-|\mathrm{A}|=\left(b_{t}+b_{s}\right)-\left(a_{t}+a_{s}\right)=b-a,
since ∣SA∣=∣SB∣|S_{A}|=|S_{B}|. This finishes the solution.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty, ordering) added by this project.