Baltic Way 2018 · Problem 7
Combinatorics
Consider the graph obtained from a square grid by identifying each pair of opposite sides, so that the grid lies on a torus. Its 512 edges are colored red or blue. A coloring is called good if every vertex is incident with an even number of red edges. A move consists of switching the color of all four edges of one cell. What is the largest possible number of good colorings such that no one of them can be transformed into another by a sequence of moves?
When you’re ready
Review material becomes available with the next Daily.
Review
Topics
Graph theory · Games and strategies · Colorings and configurations
Solutions
Solution

Answer: 4. Representatives of the equivalence classes are: all blue, all blue with one longitudinal red ring, all blue with one transversal red ring, all blue with one longitudinal and one transversal red ring.
First, show that these four classes are non equivalent. Consider any ring transversal or longitudinal and count the number of red edges going out from vertices of this ring in the same halftorus. This number can not be changed mod 2.
Now we show that each configuration can be transformed to one of these four classes. We suggest two independent reasoning.
Scanning of the square.
Cut the torus up in a square . In order to restore the initial torus we will identify the opposite sides of the square, but we will do it in the end of solution. Now we will work with the square. It is clear that during all recolorings each vertex of torus has even red degree. The same is true for the degrees of the inner vertices of the square when we deal with it instead of the torus.
Scan all cells of this square one by one from left to right and from bottom to top. For convenience we may think that in each moment the scanned area is colored grey. First we take bottom left corner cell ( in chess notations) and color it grey. Then we consider the next cell ( in chess notations) color it grey and if the edge between the cells and is red, change the colors of the cell edges.
We obtain a grey area with no red edges in its interior. After that when we scan each new cell we append this cell to the grey figure and if it is necessary change the colors of edges of the new cell to make the color of all new edges in the grey area blue.
The latter is always possible because the new cell have either one common edge with the grey figure (as in the case " " above) or two common edges. For example let grey figure consist of the first row of the square and cell. When we append the cell to the grey figure two edges of its lower left corner vertex already belong to the grey figure, they are blue. Therefore the other two edges and have the same color and we can make them both blue (if they are not) by recoloring the edges of cell .
So by doing that with all cells of the square we obtain square with blue edges inside it. Now its time to recall that the sides of the square should be identified, and the red degree of each vertex of torus is even. It follows that the whole (identified) vertical sides of the square are either red or blue, and the same for horizontal sides.
Deformations of red loops (sketch).
To see that any configuration can be made into one of the above four configurations it is most clear to cut the torus up in a square with opposite edges identified.
Since the red degree of each vertex is even we can always find a loop consisting of red edges only. Now, suppose that one can make a (simple) red loop that does not cross the boundary of the square. We can change the color of this loop by changing one by one the colors of unit squares inside it. In the remaining configuration every vertex is still an endpoint of an even number of red edges and we can repeat the operation. So by doing that to every red loop we are left with a configuration where one can not make red loops that do not intersect the boundary. Second, any red loop left that passes through more than one boundary vertex can be deformed into a loop containing only one boundary vertex. Finally, any two loops crossing the same side of the square can be removed by changing colors of all unit squares between these loops. Thus, we are left with only the four possibilities mentioned.
Contest context
Results from Baltic Way 2018
11 teams
- Mean score
- 1.5 / 5
- Scores of 4 or 5
- 2 / 11
- Estonia
- 1 / 5
Score distribution
All team scores
| Team | Score |
|---|---|
| Germany | 2 / 5 |
| St. Petersburg | 5 / 5 |
| Denmark | 4 / 5 |
| Estonia | 1 / 5 |
| Sweden | 0 / 5 |
| Norway | 2 / 5 |
| Lithuania | 0 / 5 |
| Finland | 1 / 5 |
| Latvia | 0 / 5 |
| Poland | 0 / 5 |
| Iceland | 2 / 5 |