Olympiad Maths Prep

Library / /28 of 33

Combinatorics Difficulty 7.4 National olympiad, round 2 Prove it Belarus

Given a 2n×2n2n \times 2n table all the cells being white. Per move it is allowed to change the color of any three consecutive cells in any row or in any column (white cell is replaced by black one and vice versa).
Find all possible values of n2n \ge 2 for which one can obtain the chess coloring of the given table.
(E. Barabanov)

Solution

Answer: n0(mod3)n \equiv 0 \pmod{3}.
It is easy to see that we have 2n22n^2 black and 2n22n^2 white cells in any chess coloring of the given 2n×2n2n \times 2n table, in particular, we have even number of white cells and even number of black cells.
Since each of 2n22n^2 black cells must be recolored odd number of times and each of 2n22n^2 white cells must be recolored even number of times (may be, zero), the total number of the recolorings is even. Per move odd number (namely, three) cells are recolored, so the number of moves is even.

Now we show that if n≢0(mod3)n \not\equiv 0 \pmod{3}, then the number of moves to obtain the final coloring must be odd, so one cannot obtain the final coloring for such nn.
Let AA, BB, CC, DD denote the vertices of the (2n+1)×(2n+1)(2n+1) \times (2n+1) square (see Fig. 1).
Figure 1
Fig. 1
Figure 2
Fig. 2

Consider any line parallel to the line BDBD (see Fig. 1) and passing through the centers of some cells. We call the set of all cells with the centers on such line a *diagonal* (see Fig. 1, where 4 from 11 possible diagonals of the 6×66 \times 6 square are indicated). It is evident that there are 4n14n-1 distinct diagonals starting from the cells of the half-perimeter ABCABC, and each diagonal consists of either black cells (we call such black) or white cells (we call such diagonal white).

Without loss of generality we assume that the cell with the vertex AA is black. We number the cells of the half-perimeter ABCABC as shown in Fig. 2. We consider the diagonals starting from the cells with the numbers which are divisible by 3 (let D3D_3 be the set of these diagonals), and write the symbol "*" in the cells of these diagonals (see Fig. 3 and Fig. 4 for n=2n=2 and n=3n=3, respectively).

Figure 3
Fig. 3
Fig. 4

Find the parity of the number of the black cells with "*". It is evident that the diagonal from D3D_3 starting from the cell with even (odd) number is white (black). It is also evident that the diagonal starting from the cell with odd number consists of odd number of the cells. Hence, the parity of the number of the black cells with "*" is equal to the parity of the number of all odd numbers (divisible by 3) between 1 and 4n14n-1.

If n0(mod3)n \equiv 0 \pmod{3}, i.e., n=3kn = 3k, kNk \in \mathbb{N}, then 4n1=12k14n-1 = 12k-1 and between 1 and 4n14n-1 odd numbers which is divisible by 3 have the forms 31,33,,3(4k3),3(4k1)3 \cdot 1, 3 \cdot 3, \dots, 3 \cdot (4k-3), 3 \cdot (4k-1). There are 2k2k such numbers.
If n1(mod3)n \equiv 1 \pmod{3}, i.e., n=3k+1n = 3k+1, kN{0}k \in \mathbb{N} \cup \{0\}, then 4n1=12k+34n-1 = 12k+3 and between 1 and 4n14n-1 odd numbers which is divisible by 3 have the forms 31,33,,3(4k1),3(4k+1)3 \cdot 1, 3 \cdot 3, \dots, 3 \cdot (4k-1), 3 \cdot (4k+1). There are 2k+12k+1 such numbers.
If n2(mod3)n \equiv 2 \pmod{3}, i.e., n=3k+2n = 3k+2, kN{0}k \in \mathbb{N} \cup \{0\}, then 4n1=12k+74n-1 = 12k+7 and between 1 and 4n14n-1 odd numbers which is divisible by 3 have the forms 31,33,,3(4k1),3(4k+1)3 \cdot 1, 3 \cdot 3, \dots, 3 \cdot (4k-1), 3 \cdot (4k+1). There are 2k+12k+1 such numbers.

Therefore, the symbol "*" is written in the odd number of black cells if n≢0(mod3)n \not\equiv 0 \pmod{3}, and the symbol "*" is written in the even number of black cells if n0(mod3)n \equiv 0 \pmod{3}. Suppose one can obtain the finishing coloring after some moves. It is easy to see that per move exactly one cell with "*" is recolored. Hence we can divide all moves into two sets: the set WW consists of the moves when some white cell (with "*") is recolored and the set BB consists of the moves when some black cell (with "*") is recolored. There are even number of the moves from WW because any recolored white cell is recolored even number of times; there are odd number of moves from BB if n≢0(mod3)n \not\equiv 0 \pmod{3}, since in this case we have odd number of black cells with "*" and each of them must be recolored odd number of times. Therefore, one must make odd number of the moves, contrary to our previous statement about the parity of the moves for n≢0(mod3)n \not\equiv 0 \pmod{3}. Thus, for n≢0(mod3)n \not\equiv 0 \pmod{3} one cannot obtain the required chess coloring of the table.

If n0(mod3)n \equiv 0 \pmod{3}, i.e., 2n2n is divisible by 3, one can obtain the required coloring. It suffices to divide the given 2n×2n2n \times 2n table into the 3×33 \times 3 squares and in each such square make the moves depending on the arrangement of the black cells in this square so as indicated in Fig. 5 or Fig. 6, where the moves are shown as the segments connecting the centers of the recolored cells.
Figure 4
Fig. 5
Figure 5
Fig. 6

Looking for a route rather than 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 and solution reproduced as published; topic and difficulty added by this site.