[Math] Chess board problem

combinatorics

Is it possible to write the numbers 1, 2, …, 25 on the square of a 5 by 5 chess board (one number per square) such that any two neighbouring numbers differ by at most 4?

(Two numbers are neighbours if they are written on squares that share a side.)

Thanks, the problem was from a maths olympiad so it might prove to be quite a tricky one :/

Any help is appreciated! Thanks! 🙂

Best Answer

We will prove the general case: In a $ n \times n$ board filled with integers $1$ to $n^2$, then there exist 2 neighboring squares whose difference is at least $n$.

Explanation of main idea: Find $n$ distinct pairs of neighbors where one term is $\leq K$ and the other neighboring term is $\geq K+1$. Then, the smallest of this terms is at most $K-n+1$, and it's neighbour is at least $K+1$, so their difference is at least $n$.


For each row, let $r_i$ be the largest number in that row.
For each column, let $c_i$ be the largest number in that column.
Let $N$ be the smallest of these $2n$ values. WLOG $N=r_I$, and cell $(I,J)$ is equal to $N$. Then, every other integer in this row is $\leq N-1$.
For every column not equal to $J$, we can find adjacent cells where one is $\leq N-1$ (starting with row $I$) and one is $\geq N+1$ (otherwise, this contradicts the minimality of $N$).

In column $J$, either $N$ is adjacent to a number $<N$, or to a number $>N$.

Case 1:$N$ is adjacent to a number $< N$
We now have $n$ distinct pairs of neighbors (since they are in different columns) where one term is $\leq N-1$ and the other is $\geq N$. Let the smallest of the terms be $S$, then $S \leq N-n$. Hence, the difference between $S$ and its neighbor is at least $n$.

Case 2:$N$ is adjacent to a number $> N$.
We now have $n$ distinct pairs of neighbors (since they are in different columns) where one term is $\leq N$ and the other is $\geq N+1$. Let the smallest of the terms be $S$, then $S \leq N-n+1$. Hence, the difference between $S$ and its neighbor is at least $n$.

Related Question