All the chairs in a classroom are arranged in a square array (in other words, columns and rows), and every chair is occupied by a student. The teacher decides to rearrange the students according to the following two rules:
(a) Every student must move to a new chair.
(b) A student can only move to an adjacent chair in the same row or to an adjacent chair in the same
column. In other words, each student can move only one chair horizontally or vertically.
(Note that the rules above allow two students in adjacent chairs to exchange places.)
Show that this procedure can be done if is even, and cannot be done if is odd.
Problem 1446
Official solution
1. **Checkerboard Coloring Argument for Odd :**
Suppose is odd. We can color the grid in a checkerboard pattern, where each square is either black or white, and adjacent squares have different colors.
- In a checkerboard pattern, the number of black squares and white squares are not equal when is odd. Specifically, there are squares of one color and squares of the other color.
- When a student moves to an adjacent chair, they move from a black square to a white square or vice versa.
- Since the number of black and white squares are unequal, it is impossible for every student to move to a new chair while maintaining the checkerboard pattern. This is because there would be an imbalance in the number of students moving to black squares versus white squares.
Therefore, it is impossible to rearrange the students according to the given rules if is odd.
2. **Constructive Argument for Even :**
Suppose is even. In this case, the number of black squares and white squares in the checkerboard pattern are equal. Specifically, there are black squares and white squares.
- We can rearrange the students by having each student swap seats with the student right next to them in the same row. For example, if the students in a row are initially seated as , we can have:
- Student 1 swap with Student 2
- Student 3 swap with Student 4
- And so on, up to Student swapping with Student .
- This ensures that every student moves to a new chair, and since is even, this swapping can be done for every row without any issues.
Therefore, it is possible to rearrange the students according to the given rules if is even.