I am trying to solve the following problem : Find all the positive integers $n$ and $k$ such that it is possible to write integers in an $n \times n$ grid so that the sum of all elements in the grid is negative but the sum of elements of each $k \times k$ grid contained in it is positive. I am only looking for a small hint to get started.
Square grid , sum of elements
497 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail AtThere are 2 best solutions below
On
Here is a way of putting numbers on an $n\times n$ board to satisfy the conditions if $n$ is not a multiple of $k$.
Suppose $n=qk+r$ with $0<r<k$. The idea is to put $-N$ into every cell in row 1, then to have $k-1$ rows with $+m$ in every cell. Then repeat, so a row of $-N$ followed by $k-1$ rows with $+m$, except that on the last repeat we will have only $r-1$ rows of $+m$.
Any $k\times k$ will straddle one negative row and $k-1$ positive rows, so its sum will be $k(m(k-1)-N)$, which will be $k$ if we take $N=m(k-1)-1$.
The sum for a complete column will be at most $q(m(k-1)-N)+(-N+(k-2)m)=q-(m-1)$, which will be negative provided $m$ is at least $q+2$. Of course, if a complete column has negative sum, the whole board will also.
Hint: As explained in the comments, you cannot do so when $k \mid n$. So let's show it is possible when $k \nmid n$. Try to put positive numbers in only a few squares, such that every $k \times k$-grid contains exactly one positive number.