2025 NZMO Round 2 · Question 1
Solutions (answers with justifications) are required for all problems, including those which ask for an answer.
Find all pairs of positive integers and such that the centres of the unit squares in an by grid of unit squares can be paired up so that the distance between the centres of each pair is exactly . (A unit square has side length .)
Show answer and methods 2 methods
Answer
Exactly the pairs for which or .
Method 1 Pair within four parity classes
Number the rows and columns starting at . A displacement of length satisfies with integer . Its only possibilities are and . Thus a pair must have the same row parity and the same column parity.
The numbers of odd and even row indices are and . Both counts are even exactly when : for , the pairs of counts are , , and . The same observation applies to the columns.
If neither dimension is divisible by , choose a row parity with an odd count and a column parity with an odd count. The corresponding class has odd size. Its centres can only be paired within that class, which is impossible.
Conversely, if , split each column into blocks of four consecutive centres. In each block pair the first with the third and the second with the fourth. This uses every centre exactly once. If , apply the construction along rows.
Adapted from the solution by Tony Wang · Published solution (external)
Method 2 Give each centre a fourth-root weight
Index the rows by and the columns by . Give centre the weight , where . A legal move changes one coordinate by and leaves the other fixed, so it negates the weight.
If a complete pairing exists, weights cancel pair by pair. The sum of all weights therefore vanishes. It also factors as A geometric sum vanishes precisely when its length is divisible by . Thus or .
This necessary condition is sufficient. Along whichever dimension has length divisible by , divide every line of centres into blocks of four and pair positions and within each block.