A positive integer is written in each square of an n2×n2 chess board. The difference between the numbers in any adjacent squares (sharing an edge) is less than or equal to n. Prove that at least ⌊n2⌋+1 squares contain the same number.
Consider the smallest and the largest numbers on the chess board as a and b. They are atmost separated by n2−1 squares horizontally and n2−1 squares vertically. So there is a path between one to other with lenght at most 2(n2−1). As any two successive differ by n, we have,
b−a≤2(n2−1)n
All the numbers on the board are integers lying between a and b. Therefore only 2(n2−1)n+1 numbers exists. Therefore, because n4>(2(n2−1)n+1)n2,, more than n2 squares contain the same numbers.