Maths Olympiad Prep

Library / /47 of 48

Combinatorics Difficulty 6.3 National Olympiad Prove it United States

Problem:

There are 1000 cities in the country of Euleria, and some pairs of cities are linked by dirt roads. It is possible to get from any city to any other city by traveling along these roads. Prove that the government of Euleria may pave some of the roads so that every city will have an odd number of paved roads leading out of it.

Solutions — 2

Solution 1

Solution:

Call a city "even" or "odd" according to whether the number of paved roads coming out of it is even or odd. Note the following.

Lemma: No matter which roads are paved, there will be an even (possibly zero) number of even cities.

To see why this is true, let did_{i} be the number of paved roads leading out of city ii. The sum
d1+d2++d1000 d_{1}+d_{2}+\cdots+d_{1000}
counts each paved road exactly twice, and hence will be an even number (this is known as the "Handshake Lemma"). If there were an odd number of even cities, then there would be an odd number of odd cities (since there are 1000 cities and 1000 is even). But then the sum above would be odd, a contradiction.

Using this lemma, we can create an algorithm which will eventually pave the roads so that all cities are odd.

1. Start by paving all the roads. If each city is odd, we are done.

2. Otherwise, find an even city xx. By the lemma, there will be at least one other even city, yy. Consider the path joining xx and yy. Change the "state" of all the roads in this path (in other words, if a road is paved, unpave it; if it is dirt, pave it). This procedure changes the parity of xx and yy (i.e., changes them from even to odd), but does not alter the parity of any other city in Euleria, because if zz is a city on the path from xx to yy, both the road going into zz (from the xx-direction) and the road leaving it (heading towards yy) will have changed.

3. Step 2 thus reduces the number of even cities by 2. Repeat this step as much as needed until the number of even cities is zero.

Solution 2

Solution:

We will think of Euleria as a connected graph (a network of vertices joined by edges), where each city is a vertex and each dirt road joining two cities is an edge. Number the vertices 1,2,,10001,2, \ldots, 1000. For each i=1,2,,500i=1,2, \ldots, 500, consider any path from vertex 2i12i-1 to vertex 2i2i (we know such a path exists, since the graph is connected), and place a mark on each edge used in the path. Then pave all the roads (edges) that have an odd number of marks. To show that this scheme meets the requirements, it is enough to prove that, for each vertex vv, the edges incident to it have an odd total number of marks, since the number of such edges with an odd number of marks will then be odd. But consider all the occurrences of vv in any of our 500 paths. Notice that vv is an endpoint of one such path, which therefore contributes one mark on an edge incident to vv; any other occurrence of vv is internal to a path, which therefore contributes two marks, one on the edge leading into vv and another on the edge leading out of it. It follows that the total number of marks on edges incident to vv is odd. This completes the proof.

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.