Olympiad Maths Prep

Library / /33 of 33

Combinatorics Difficulty 7.8 National olympiad, round 2 Prove it Belarus

Given a (2n+1)×(2n+1)(2n + 1) \times (2n + 1) table, all its cells being white.
Figure 1
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 nn such that one can obtain the chess coloring of the given table with black corner cells (the example of such coloring is shown in the figure for n=2n = 2).
(E. Barabanov)

Solution

Answer: n1(mod3)n \equiv 1 \pmod{3}.

We say that a cell is black if this cell becomes black in the final coloring, and white if this cell becomes white in the final coloring. It is easy to see that we have 2n2+2n+12n^2 + 2n + 1 black and 2n2+2n2n^2 + 2n white cells in the chess coloring of the given table with black corner cells. In particular, we have even number of white cells and odd number of black cells.

Since each of 2n2+2n+12n^2 + 2n + 1 black cells must be recolored odd number of times and each of 2n2+2n2n^2 + 2n white cells must be recolored even number of times (may be, zero), the total number of the recolorings is odd. Per move odd number (namely, three) cells are recolored, so the number of moves is odd.

Now we show that if n≢1(mod3)n \not\equiv 1 \pmod{3}, then the number of moves to obtain the final coloring must be even, so one cannot obtain the final coloring for such nn.

Figure 2
Fig. 1
Figure 3
Fig. 2

Let AA, BB, CC, DD denote the vertices of the (2n+1)×(2n+1)(2n + 1) \times (2n + 1) square (see Fig. 1). 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 13 possible diagonals of the 7×77 \times 7 square are indicated). It is evident that there are 4n+14n + 1 distinct diagonals starting from the cells of the half-perimeter ABCABC, and each diagonal consists of either black cells (we call such diagonal black) or white cells (we call such diagonal white).

We number the cells of the half-perimeter ABCABC as shown in Fig. 2. 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). 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 4n+14n + 1.

Figure 4
Fig. 3
Fig. 4

If n0(mod3)n \equiv 0 \pmod{3}, i.e., n=3kn = 3k, kNk \in \mathbb{N}, then 4n+1=12k+14n + 1 = 12k + 1 and between 1 and 4n+14n + 1 odd numbers which are 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 4n+1=12k+54n + 1 = 12k + 5 and between 1 and 4n+14n + 1 odd numbers which are 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 4n+1=12k+94n + 1 = 12k + 9 and between 1 and 4n+14n + 1 odd numbers which are divisible by 3 have the forms 31,33,,3(4k+1),3(4k+3)3 \cdot 1, 3 \cdot 3, \dots, 3 \cdot (4k + 1), 3 \cdot (4k + 3). There are 2k+22k + 2 such numbers.

Therefore, the symbol "*" is written in the even number of black cells if n≢1(mod3)n \not\equiv 1 \pmod{3}, and the symbol "*" is written in the odd number of black cells if n1(mod3)n \equiv 1 \pmod{3}. Suppose one can obtain the final 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 also even number of moves from BB if n1(mod3)n \neq 1 \pmod{3}, since in this case we have even number of black cells with "*" and each of them must be recolored odd number of times. Therefore, one must make even number of moves, contrary to our previous statement about the parity of the moves for n1(mod3)n \neq 1 \pmod{3}. Thus, for n1(mod3)n \neq 1 \pmod{3} one cannot obtain the required chess coloring of the table.

If n1(mod3)n \equiv 1 \pmod{3}, i.e., 2n+12n+1 is divisible by 3, one can obtain the required coloring. It suffices to divide the (2n+1)×(2n+1)(2n+1) \times (2n+1) 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 as it is shown in Fig. 5 or Fig. 6, where the moves are shown as the segments connecting the centers of the recolored cells.

Figure 5
Fig. 5
Figure 6
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.