Browse · MathNet
PrintChina Western Mathematical Olympiad
China counting and probability
Problem
Given an grid, we call two cells in it adjacent if they have a common side. At the beginning, each cell is assigned number . An operation on the grid is defined as follows: one chooses a cell, and then changes the signs of every number in its adjacent cells (but does not change the sign of the number in itself). Find all the integers , such that after a finite number of operations, all the numbers in the cells of the grid are changed to . (posed by Shen Huyue)



Solution
We denote the cell in the -row and -column of the grid as ().
When , , we mark each satisfying with color red (presented by shaded areas), and that satisfying and with blue (presented by oblique line areas) (see Fig. 7.1).
Fig. 7.1 Fig. 7.2
In this way, we can see that every cell adjacent to a blue one is red, and there is exactly one blue cell around each red one.
Now we do the operation on each blue cell. The number in each red cell is then changed from to , while the numbers in the remaining cells are unchanged.
Since is an even number, we can rotate the grid around its center anticlockwise by . Then all the red cells of the rotated grid cover exactly all the cells that are not red in the original grid (see Fig. 7.2).
We do the operations again for the original grid on all the cells that are covered by blue cells of the rotated grid. Then we see that all the numbers with value in the remaining cells of the original grid are changed to , while the numbers in the other cells are unchanged.
Therefore, when is an even number, all the numbers in the cells of the grid can be changed to by a finite number of operations.
When is odd, we denote the number in cell as (), and denote the number of operations on each of their adjacent cells as , respectively (see Fig. 7.3).
After finite operations, it is easy to see that:
Fig. 7.3
is changed from to if and only if is odd;
is changed from to if and only if is odd;
is changed from to if and only if is odd;
is changed from to if and only if is odd, and
is changed from to if and only if is odd.
Since is odd, the sum of odd numbers is still odd. Then,
is odd. It is impossible!
Therefore, all the numbers in the cells of a given grid can be changed from to after a finite number of operations if and only if is an even number.
When , , we mark each satisfying with color red (presented by shaded areas), and that satisfying and with blue (presented by oblique line areas) (see Fig. 7.1).
Fig. 7.1 Fig. 7.2
In this way, we can see that every cell adjacent to a blue one is red, and there is exactly one blue cell around each red one.
Now we do the operation on each blue cell. The number in each red cell is then changed from to , while the numbers in the remaining cells are unchanged.
Since is an even number, we can rotate the grid around its center anticlockwise by . Then all the red cells of the rotated grid cover exactly all the cells that are not red in the original grid (see Fig. 7.2).
We do the operations again for the original grid on all the cells that are covered by blue cells of the rotated grid. Then we see that all the numbers with value in the remaining cells of the original grid are changed to , while the numbers in the other cells are unchanged.
Therefore, when is an even number, all the numbers in the cells of the grid can be changed to by a finite number of operations.
When is odd, we denote the number in cell as (), and denote the number of operations on each of their adjacent cells as , respectively (see Fig. 7.3).
After finite operations, it is easy to see that:
Fig. 7.3
is changed from to if and only if is odd;
is changed from to if and only if is odd;
is changed from to if and only if is odd;
is changed from to if and only if is odd, and
is changed from to if and only if is odd.
Since is odd, the sum of odd numbers is still odd. Then,
is odd. It is impossible!
Therefore, all the numbers in the cells of a given grid can be changed from to after a finite number of operations if and only if is an even number.
Final answer
all even integers n ≥ 2
Techniques
Invariants / monovariantsColoring schemes, extremal arguments