The kingdom of Anisotropy consists of cities. For every two cities there exists exactly one direct one-way road between them. We say that a path from to is a sequence of roads such that one can move from to 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 and be two distinct cities in Anisotropy. Let denote the maximal number of paths in a diverse collection of paths from to . Similarly, let denote the maximal number of paths in a diverse collection of paths from to . Prove that the equality holds if and only if the number of roads going out from is the same as the number of roads going out from .
Problem 1932
Official solutions — 2
Solution 1
We write (or ) if the road between and goes from to . Notice that, if there is any route moving from to (possibly passing through some cities more than once), then there is a path from to 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 and into four groups, , , , and according to the following rules: for each city ,
Lemma. Let be a diverse collection consisting of paths from to . Then there exists a diverse collection consisting of at least paths from to and containing all short paths from to .
Proof. In order to obtain the desired collection, modify as follows.
If there is a direct road and the path consisting of this single road is not in , merely add it to .
Now consider any city such that the path is not in . If contains at most one path containing a road or , remove that path (if it exists), and add the path to instead. Otherwise, contains two paths of the forms and , where and are some paths. In this case, we recombine the edges to form two new paths and (removing cycles from the latter if needed). Now we replace the old two paths in 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 , we obtain the desired collection.
Back to the problem, assume, without loss of generality, that there is a road , and let and denote the numbers of roads going out from and , respectively. Choose a diverse collection consisting of paths from to . We will transform it into a diverse collection consisting of at least paths from to . This construction yields
whence . This yields the desired equivalence.
Apply the lemma to get a diverse collection of at least paths containing all short paths from to . Notice that the paths in contain no edge of a short path from to . Each non-short path in has the form , where is a path from some city to some city . For each such path, put into the path ; also put into all short paths from to . Clearly, the collection is diverse.
Now, all roads going out from end in the cities from , while all roads going out from end in the cities from . Therefore,
On the other hand, since there are short paths from to (including ) and short paths from to , we infer
as desired.
Solution 2
We recall some graph-theoretical notions. Let be a finite graph, and let be the set of its vertices; fix two distinct vertices . An -cut is a partition of into two parts such that and . The cut-edges in the cut are the edges going from to , and the size 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 be a directed graph, and let and be its distinct vertices. Then the maximal number of edge-disjoint paths from to is equal to the minimal size of an -cut.
Back to the problem. Consider a directed graph whose vertices are the cities, and edges correspond to the roads. Then is the maximal number of edge-disjoint paths from to in this graph; the number is interpreted similarly.
As in the previous solution, denote by and the out-degrees of vertices and , respectively. To solve the problem, we show that for any -cut in our graph there exists a -cut satisfying
This yields
whence again .
The construction is simple: we put and hence . To show that it works, let A and B denote the sets of cut-edges in and , respectively. Let and denote the numbers of edges going from to and , respectively. Similarly, denote by and the numbers of edges going from to and , respectively.
Notice that any edge incident to none of and either belongs to both A and B, or belongs to none of them. Denote the number of such edges belonging to A by . The edges in A which are not yet accounted for split into two categories: those going out from to (including if it exists), and those going from to - in other words, going from to . The numbers of edges in the two categories are and , respectively. Therefore,
and hence
since . This finishes the solution.