Filling an $8\times 8$ grid with the numbers $1$ to $64$ such that every $3\times 3$ subsquare has a sum less than $256$

121 Views Asked by At

Can you help me construct an $8 \times 8$ square filled with numbers from 1 to 64 (each cell has a different number obviously) such that every $3 \times 3$ subsquare has sum of numbers less than $256$?

I have tried to fill up the corners with the big numbers but I have failed to balance the $3 \times 3$ squares. I have also find some symmetries in the configuration but I still haven't succeed to stay lower than $256$.

The question is a subtask from a problem I invented myself. I don't post the whole problem because I want to protect my work and use it for future projects.

2

There are 2 best solutions below

2
On BEST ANSWER

One qualifying grid: \begin{array}{|c|c|} \hline 61 & 50 & 21 & 54 & 57 & 14 & 44 & 62 \\ \hline 43 & 32 & 12 & 36 & 39 & 19 & 31 & 49 \\ \hline 27 & 5 & 4 & 23 & 9 & 1 & 10 & 25 \\ \hline 58 & 40 & 22 & 38 & 56 & 7 & 41 & 52 \\ \hline 53 & 35 & 11 & 55 & 37 & 26 & 34 & 59 \\ \hline 13 & 20 & 3 & 15 & 18 & 2 & 17 & 16 \\ \hline 45 & 30 & 8 & 33 & 42 & 6 & 29 & 47 \\ \hline 63 & 48 & 24 & 51 & 60 & 28 & 46 & 64 \\ \hline \end{array}

Sums of $3\times 3$ subsections: \begin{array}{|c|c|} \hline 255 & 237 & 255 & 252 & 224 & 255 \\ \hline 243 & 212 & 239 & 228 & 213 & 235 \\ \hline 255 & 233 & 255 & 252 & 221 & 255 \\ \hline 255 & 239 & 255 & 254 & 238 & 254 \\ \hline 218 & 210 & 222 & 234 & 211 & 236 \\ \hline 254 & 232 & 254 & 255 & 248 & 255 \\ \hline \end{array}

6
On

Assume we have solved the problem. Append column 6 as new column 9 to the right, then append row 6 as new row 9 below. In the extended figure, we still have the sum property for all $3\times 3$ squares. We can tile the $9\times 9$ board with $9$ such squares and conclude that the sum of all fields plus the sum of all entries in the 6th column plus the sum of all entries in the 6th row, plus one more copy of field $(6,6)$, is at most $$\tag19\cdot 255=2295.$$ On the other hand, that sum is certainly at least $$\tag2(1+2+\cdots+64)+(1+2+\cdots+15)+1+1=2202.$$ This seems like it could still work.

However, instead of to the right/below, we could have extended to the left/up. The sum of 3rd column plus 6th column plus 3rd row plus 6th row ($32$ fields, of which $4$ are used twice) is at least $$(1+2+\cdots+32)+(1+2+3+4)=522.$$ Hence the heavier of the two rows plus the heavier of the two columns sums sums to at least $261$. Thus instead of $(2)$, we should compare to $$(1+2+\cdots+64)+261+1=2342 $$ and as this exceeds $(1)$, no solution exists.

In fact, from $\frac{2342}{9}>260$, we see that at least one $3\times 3$ square must have sum $\ge 261$.