2
$\begingroup$

A $3\times3$ grid contains altogether six squares that are formed by its nine entries: there are five squares whose sides are parallel to the sides of the grid (four small ones and a big one), and there is one square that is tilted by $45$ degrees:

  a b c             a b    b c                     a    c          b
  d e f  contains   d e    e f    d e    e f                    d     f
  g h i                           g h    h i       g    i          h

Determine all possible ways of arranging the nine numbers $1,2,3,\ldots,9$ in a $3\times3$ grid, such that the four numbers in the corners of each of the six squares add up to the same sum.

$\endgroup$
2
  • $\begingroup$ So... this is asking for a 3x3 magic square where a+b+d+e = b+c+e+f = d+e+g+h = e+f+h+i = a+c+g+i = b+d+f+h? $\endgroup$ Commented Feb 19, 2015 at 10:30
  • $\begingroup$ I wonder if there are any solutions for larger grids? The number of squares increases quite rapidly, but there might at least be a solution for a 4×4 grid.) $\endgroup$
    – r3mainer
    Commented Feb 19, 2015 at 11:49

2 Answers 2

3
$\begingroup$

Summing the big square and the tilted square, we get for the common sum $S$
$$ 2S = (a+c+g+i)+(b+d+f+h) = 45-e.$$ Summing the entries in the four small squares $$4S = (a+b+d+e)+(b+c+e+f)+(d+e+g+h)+(e+f+h+i).$$ Summing the big square, twice the tilted square and four times entry $e$
$$3S+4e = (a+c+g+i)+2(b+d+f+h)+4e.$$ This shows $4S=3S+4e$ and $S=4e$. Then $2S+e=45$ and $S-4e=0$ shows $e=5$ and $S=20$.

One of the small squares uses $e=5$ and the number $1$. Then the other two entries are distinct and have sum $14$. Then the other two entries can only be $6$ and $8$. Then $1$ must be in a corner:

   1 6 c
   8 5 f
   g h i

Since 1 can be in any of the four corners and 6 and 8 can switch places, there are eight symmetric solutions.

One of the small squares uses $e=5$ and the number $7$. Then the other two entries are distinct and have sum $8$. Then the other two entries can only be $2$ and $6$. Then $7$ must be in a corner:

   1 6 7
   8 5 2
   g h i

The tilted sqaure has $20=b+d+f+h=6+8+2+h$ and $h=4$. Then $g$=3$ and $i=9$.

   1 6 7
   8 5 2
   3 4 9

Alltogether there are eight solutions. The other seven solutions come from rotating my solution by 90, 180, 270 degree and reflecting it on the middle line.

$\endgroup$
1
$\begingroup$

Solutions:

(a, b, c, d, e, f, g, h, i) = (1, 6, 7, 8, 5, 2, 3, 4, 9)
(a, b, c, d, e, f, g, h, i) = (1, 8, 3, 6, 5, 4, 7, 2, 9)
(a, b, c, d, e, f, g, h, i) = (3, 4, 9, 8, 5, 2, 1, 6, 7)
(a, b, c, d, e, f, g, h, i) = (3, 8, 1, 4, 5, 6, 9, 2, 7)
(a, b, c, d, e, f, g, h, i) = (7, 2, 9, 6, 5, 4, 1, 8, 3)
(a, b, c, d, e, f, g, h, i) = (7, 6, 1, 2, 5, 8, 9, 4, 3)
(a, b, c, d, e, f, g, h, i) = (9, 2, 7, 4, 5, 6, 3, 8, 1)
(a, b, c, d, e, f, g, h, i) = (9, 4, 3, 2, 5, 8, 7, 6, 1)

How?

proof-by-exhaustion

$\endgroup$
2
  • 2
    $\begingroup$ If I am not mistaken those 8 answers are actual the same if you treat mirrored and rotated answers as the same. $\endgroup$
    – Ivo
    Commented Feb 19, 2015 at 12:03
  • $\begingroup$ @IvoBeckers Indeed they are, you can see the 5 in the middle, each solution has a mirror image, and the rotations are observable by noticing that two numbers always keep they their place in terms of "first four" and "last four" $\endgroup$
    – dmg
    Commented Feb 19, 2015 at 13:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.