Let be a positive integer. We are given a board whose unit squares are colored in black and white in such way that starting with the top left square, every third diagonal is colored in black and the rest of the board is in white. In one move, one can take a square and change the color of all its squares in such way that white squares become orange, orange ones become black and black ones become white. Find all for which, using a finite number of moves, we can make all the squares which were initially black white, and all squares which were initially white black.
Problem 1391
Official solution
Let be a positive integer, and consider a board with unit squares colored such that every third diagonal starting with the top left square is black, and the rest of the board is white. We need to determine for which values of it is possible to transform all initially black squares to white and all initially white squares to black using a series of moves, where each move consists of selecting a square and changing the color of each of its squares cyclically through white, orange, black.
### Observations
1. Board Size and Coloring Pattern:
The board is , and every third diagonal is black. Given this structure, the number of black squares in the entire grid is , since every third diagonal contains black squares, and there are three such diagonals within any subgrid across the board.
2. Move Description and Effect:
Each move allows us to select a square and change its colors according to the problem's rule. This means the total parity (modulo 2 sum of colors, treating white as 0 and black as 1) for each change remains invariant modulo 2.
3. Parity Consideration:
Initially, the total number of black squares is odd, since the number of black squares is proportional to .
- **For :** The total number of black squares is , which is odd.
- **For :** The total number of black squares is , which is even. Therefore, a transformation leaving the black-to-white parity unchanged is possible.
Solution Analysis
- **Case :**
When , the grid becomes a board, and the problem's condition allows for transformation because the number of black squares can become equal to the number of initially white squares after applying the moves (switching colors maintains the condition).
- **Case :**
When , the number of black squares is odd (9). In this case, since moves only allow flipping an even 2x2 section of the board, there is no possible sequence of moves that solves the problem because the parity can't be balanced between black and white.
Hence, the values of for which the transformation is possible are: