Olympiad Maths Prep

Track / Stage 7 / 199 of 300 #1599 of 2000

Problem 1599

National olympiad second round; IMO P1/P4
Combinatorics Difficulty 7.4 Prove it

The kingdom of Pinguinia has various cities and streets, the latter being all one-way streets always run between exactly two cities, so there are no intermediate stops. Every city has exactly two streets that lead out of it and exactly two that lead into it. Prove that the streets can be divided into black and white streets so that exactly one exit of each city is black and one is white and exactly one white and one black entrance in each city.

This one wants a proof. Work it on paper, read the official solution, then mark yourself honestly — the ladder only means something if the record is true.

Official solution

1. Graph Construction:
- Let V V be the set of cities.
- Construct a bipartite graph G G with vertex set V×{0,1} V \times \{0, 1\} .
- For each city vV v \in V , create two vertices: (v,0) (v, 0) and (v,1) (v, 1) .
- Draw an edge between (v,0) (v, 0) and (w,1) (w, 1) if there is a one-way street from city v v to city w w .

2. Degree of Vertices:
- Each city v v has exactly two streets leading out of it and exactly two streets leading into it.
- Therefore, each vertex in G G has degree 2.

3. Perfect Matching:
- By Hall's Marriage Theorem, a bipartite graph has a perfect matching if and only if for every subset S S of one part, the neighborhood of S S (denoted N(S) N(S) ) has at least as many vertices as S S .
- In our graph G G , since each vertex has degree 2, the conditions of Hall's Marriage Theorem are satisfied.
- Therefore, there exists a perfect matching in G G .

4. Coloring the Streets:
- The perfect matching in G G corresponds to a set of streets in the original graph.
- Color the streets in the perfect matching as black.
- The remaining streets (not in the perfect matching) are colored white.

5. Verification:
- Each city v v has exactly one black and one white street leading out of it:
- Since each vertex (v,0) (v, 0) and (v,1) (v, 1) is matched exactly once in the perfect matching, each city v v has exactly one black street leading out.
- The remaining street leading out of v v must be white.
- Each city v v has exactly one black and one white street leading into it:
- Similarly, each vertex (v,0) (v, 0) and (v,1) (v, 1) is matched exactly once in the perfect matching, so each city v v has exactly one black street leading in.
- The remaining street leading into v v must be white.

Thus, we have successfully divided the streets into black and white such that each city has exactly one black and one white street leading out and one black and one white street leading in.

\blacksquare

Source: NuminaMath-1.5, licensed Apache-2.0. Statement and solution reproduced as published; topic, difficulty and ordering added by this site.