Maths Olympiad Prep

Library / /99 of 105

Combinatorics Difficulty 5.7 AIME, harder Prove it United States

Problem:

Mathlandia has 20222022 cities. Show that the number of ways to construct 20212021 roads connecting pairs of cities such that it is possible to get between any two cities, there are no loops, and each city has exactly one or three roads coming out of it is given by
2022!2019!!1012! \frac{2022 ! \cdot 2019 !!}{1012 !}
(The notation 2019!!2019!! means 20192017312019 \cdot 2017 \cdot \cdots \cdot 3 \cdot 1.)

Solution

Solution:

If we consider the cities to be vertices and the roads to be edges, this arrangement is a type of graph known as a trivalent tree. We will find a general formula in terms of nn for the number of trivalent trees on 2n2n vertices.

We can construct such a tree as follows. First, we will choose the internal vertices (non-leaves) of TT. If there are ii internal vertices, then summing the degrees over all vertices we get
2(# of edges)=2(2n1)=i3+(2ni)1=2i+2n. 2 \cdot (\# \text{ of edges}) = 2 \cdot (2n-1) = i \cdot 3 + (2n-i) \cdot 1 = 2i + 2n.
Solving for ii gives i=n1i = n-1, so there are (2nn1)\left(\begin{array}{c}2n \\ n-1\end{array}\right) ways to choose the internal vertices. Now imagine attaching two edges to each of these n1n-1 vertices (with the other endpoint of each edge not yet chosen). This is 2n22n-2 edges total, so all but one edge of the graph. We can think of the other endpoint of each edge as a position that needs to be filled, so at the start there are 2n22n-2 available positions. Now, go through the leaves in increasing order, and for each leaf, choose an edge to attach it to. The number of available edges starts at 2n22n-2 and goes down by one at each step as one position gets taken, so the number of ways to do this is (2n2)(2n3)(n2)(2n-2)(2n-3) \ldots (n-2). After all the leaves are added, there must be at least one internal vertex both of whose edges are filled, since there are n1n-1 internal vertices and only n3n-3 unfilled edges left. Find the smallest such vertex, and choose an open edge to attach it to, which can be done in n3n-3 ways. Now that vertex has all three of its neighbors chosen.

After that, there are n2n-2 remaining internal vertices and n4n-4 available edges, all of which are attached to one of those vertices. So again, there must be a vertex both of whose edges are filled, so we can take the smallest such vertex and choose any of the n4n-4 edges to attach it to. We can continue this process until every internal vertex except for two of them has three edges, and at that point, we must add the final edge between those two vertices.

After this process is complete, we have a trivalent tree, but each such tree has been counted 2n12^{n-1} times, because we considered the two edges coming out of each internal vertex to be distinct, when actually they should not be. Thus, we must divide by 2n12^{n-1}, implying that the total number of trivalent trees is
(2nn1)(2n2)(2n3)212n1=(2n)!(n+1)!(2n3)!! \left(\begin{array}{c} 2n \\ n-1 \end{array}\right) \cdot \frac{(2n-2)(2n-3) \cdot \ldots \cdot 2 \cdot 1}{2^{n-1}} = \frac{(2n)!}{(n+1)!}(2n-3)!!
Plugging in n=1011n=1011 gives the desired expression.

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

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