CUMO B November 2026

Problem 6

Difficulty D 6.5

Problem

Let be an integer. A country has cities and, at the beginning, no roads. Each day a new road may be built between two cities, provided that there is no road between them yet and that, at that moment, the two cities have the same number of roads. Roads are built until no further road can legally be built.

Determine the maximum possible number of distinct values among the numbers of roads of the cities at that moment.

Solution

Answer
.
Proof

Think of cities as vertices and roads as edges; "degree" means number of roads. In the final graph , two cities of equal degree are adjacent (otherwise another road could be built). So each degree class (cities of one given degree) is a clique. Let be the number of cities of final degree .

Claim 1. is even for every .

Proof. Let be the number of cities of final degree . A city has final degree iff it once goes from degree to , and this happens exactly once, in a road whose other end also goes from to at that moment. So these cities are paired up by the roads built between two cities of degree , and is even for all . Hence is even for .

Claim 2. There are at most distinct degrees.

Proof. Two cities of degree are not adjacent, so . By Claim 1, is even, and each nonempty class with has at least cities. If is even, and there are at most classes. If is odd, and there are at most classes.

Call a legal process on cities good if it ends with degrees , the two cities of each degree being adjacent. A good process ends in a final state (degree classes are cliques).

Claim 3. There is a good process on cities.

Proof. Cities . Build, in this order (the common degree before each road in brackets): , , , , , , , , . Final degrees: ; ; , and , , are roads.

Claim 4. If is the final graph of a good process on cities, its complement has a matching with edges.

Proof. The degrees in are , i.e. , each twice. Take a maximum matching of and suppose ; then at least vertices are unmatched. Among vertices, the two of largest -degree, and , satisfy . All -neighbours of are matched (else grows). For an edge , if (for some labelling of ) we could replace by ; so at most edges of join to . Hence , a contradiction.

Claim 5. If there is a good process on cities (), there is one on cities.

Proof. Let be good on the set , with final graph . By Claim 4 pick a matching of non-edges of ; it misses two cities . Add new cities . First build , and the matching roads (all between cities of degree ), so every city has degree . Then build (both of degree ). Then run : every city of now starts at degree instead of , so every road of is still legal (and none of them has been built already). At the end have degree and are adjacent, and a city of has degree . So the degrees are with each pair adjacent: the process is good.

Conclusion. By Claims 3 and 5, a good process exists on cities for every . For it gives distinct values. For , add one city that never gets a road: it is the only city of degree , so the final state is still final, with distinct values. With Claim 2, the answer is .

Solved it another way? Send a written solution to [email protected]. The most interesting solution, with the solver's name, will be posted.