Olympiad Maths Prep

Track / Stage 6 / 276 of 400 #1276 of 2000

Problem 1276

National olympiad, first round
Combinatorics Difficulty 6.5 Find the answer

A stone is placed in a square of a chessboard with nn rows and nn columns. We can alternately undertake two operations:
[b](a)[/b] move the stone to a square that shares a common side with the square in which it stands;
[b](b)[/b] move it to a square sharing only one common vertex with the square in which it stands.

In addition, we are required that the first step must be [b](b)[/b]. Find all integers nn such that the stone can go through a certain path visiting every square exactly once.

Official solution

1. Coloring the Chessboard:
We color the chessboard in a repeating pattern of 1, 2, 3, and 4 as follows:
1212434312124343 \begin{array}{cccc} 1 & 2 & 1 & 2 & \ldots \\ 4 & 3 & 4 & 3 & \ldots \\ 1 & 2 & 1 & 2 & \ldots \\ 4 & 3 & 4 & 3 & \ldots \\ \vdots & \vdots & \vdots & \vdots & \ddots \\ \end{array}

2. Analyzing Moves:
- (b) Move: Moves the stone to a square sharing only one common vertex with the current square. This means the stone moves to a square of the same parity but different color.
- (a) Move: Moves the stone to a square sharing a common side with the current square. This means the stone moves to a square of different parity.

3. Path Analysis:
Consider a sequence of moves in groups of 4 squares: A, B, C, D.
- A to B is a (b) move: A and B have the same parity but different colors.
- B to C is an (a) move: B and C have different parities.
- C to D is a (b) move: C and D have the same parity but different colors.

This implies:
- AA and BB have the same parity.
- CC and DD have the same parity.
- BB and CC have different parities.
- ABA \neq B and CDC \neq D.

Therefore, {A,B,C,D}={1,2,3,4}\{A, B, C, D\} = \{1, 2, 3, 4\}. Every 4 consecutive squares must include one of each color.

4. **Odd nn Analysis:**
Let n=2k+1n = 2k + 1. The total number of squares is n2=(2k+1)2=4k2+4k+1n^2 = (2k+1)^2 = 4k^2 + 4k + 1.
- We can decompose this path into (k2+k)(k^2 + k) blocks of 4 squares and one final square.
- Each block of 4 squares must contain one of each color (1, 2, 3, 4).

However, there are only k2k^2 squares of color 4 on the board. Since we need at least k2+kk^2 + k squares of each color, it is impossible to visit every square exactly once for odd n3n \geq 3.

5. **Even nn Analysis:**
For even nn, let n=2kn = 2k. The total number of squares is n2=(2k)2=4k2n^2 = (2k)^2 = 4k^2.
- We can decompose this path into k2k^2 blocks of 4 squares.
- Each block of 4 squares must contain one of each color (1, 2, 3, 4).

Since there are exactly k2k^2 squares of each color, it is possible to visit every square exactly once for even nn.

Conclusion:
For the stone to visit every square exactly once, nn must be even.

The final answer is n \boxed{ n } must be even.

Source: NuminaMath-1.5, licensed Apache-2.0. Statement and solution reproduced as published; topic, difficulty and ordering added by this site.