Let $m, n \ge 2$ be distinct positive integers. In an infinite grid of unit squares, each square is filled with exactly one real number so that In each $m \times m$ square, the sum of the numbers in the $m^2$ cells is equal. In each $n \times n$ square, the sum of the numbers in the $n^2$ cells is equal. There exist two cells in the grid that do not contain the same number. Let $S$ be the set of numbers that appear in at least one square on the grid. Find, in terms of $m$ and $n$, the least possible value of $|S|$. Kiran Reddy
Problem
Source: ELMO Shortlist 2024/C1.5
Tags: Elmo, combinatorics
22.06.2024 18:45
some context behind the name: the psc (which makes the shortlist) kinda forgot to post this problem onto the psc forum and only realized after the shortlist was determined. After a review we found that the problem was shortlist quality and inserted it between C1 and C2
24.06.2024 03:45
Solved with MathLuis and YaoAOPS (in particular this is his quick write up).We claim that the minimum nnumber of numbers for a $m,n$ is given by \[f(m,n) = \begin{cases} 2 & \gcd(m,n)>1\\ 3 & \gcd (m,n)=1 \end{cases}\] We first give the construction. If $\gcd(m, n) \ne 1$, two numbers suffice, which is also obviously the minimum possible. First, notice that we can replace the condition with the stronger condition that the sum is constant on any $\gcd(m, n) \times \gcd(m, n)$ square. Then take the numbering which is $0$ on all values unless $x \equiv y \equiv 0 \pmod{\gcd(m, n)}$. Now consider the $\gcd(m, n) = 1$ case.Take a $m \times n$ grid, fill it with $0$s, put $-1$ in two opposite corners and $1$ in the other two opposite corners. uplicate this grid to fill the entire lattice.Then the sum of $1 \times m$ vertical sticks and $1 \times n$ horizontal sticks are both constant, which implies the result because shifting a $m \times m$ by $1$ preserves the sum. Now, we show that when $\gcd(m,n)=1$, it is impossible to cover the board using just 2 numbers. Normalize (shift so that the smaller number is 0 and then scale so that the other is 1) to just being $0, 1$. Note that the sum over a $m \times m$ is $\frac{m^2}{n^2}$ of the sum over a $n \times n$. As such, the sum over a $m \times m$ is either $m^2$ or $0$, giving constancy either way, contradiction.