The numbers from $1$ to $n^2$ are written in order in a grid of $n \times n$, one number in each square, in such a way that the first row contains the numbers from $1$ to $n$ from left to right; the second row contains the numbers $n + 1$ to $2n$ from left to right, and so on and so forth. An allowed move on the grid consists in choosing any two adjacent squares (i.e. two squares that share a side), and add (or subtract) the same integer to both of the numbers that appear on those squares. Find all values of $n$ for which it is possible to make every squares to display $0$ after making any number of moves as necessary and, for those cases in which it is possible, find the minimum number of moves that are necessary to do this.
Problem
Source: Mexican National Olympiad 2016
Tags: Mexico, combinatorics, Parity
18.11.2016 12:56
I usually suck at these kind of problems, but I gave it a try.
18.11.2016 16:48
20.11.2016 02:43
ralk912 wrote: Hence, with $\frac{n^2}{2}$ moves we can only get, at most, half of the numbers to turn to $0$. Unfortunately, this is false. Consider for instance a $6 \times 6$ grid, we can divide it into 18 $2 \times 2$ grids, and for each of these grids we need only three moves to turn all of the numbers in them to 0. Hence we can use 18 moves to turn all of the numbers in each of these boards to 0, so we get 24 zeroes using $18 = \frac{6^2}{2}$ moves. I'll only provide proof that $\frac{3n^2}{4}$ is the minimum, as ralk912 already gave a construction and proved that $n$ must be even:
Additionally, here is the official solution:
20.11.2016 09:22
Ah well, good thing I ended up being a chemist and not a mathematician haha, good call there!
20.11.2016 15:32
Got me thinking though, your counterexample wouldn't be exactly against my argument because the $\frac{n^2}{2}$ moves I mention are the ones that involve every number in the grid (since every number must be involved in at least one move). Not saying my proof is not wrong, just that it is not completely disproved by that?