7
$\begingroup$

Instead of placing every number from 1-9 in the square below such that each column, row and long diagonal has the same sum, do the opposite!

Place 1-9 in the squares below in a manner such that none of the columns, rows or long diagonals have the same sum:

enter image description here

Edit: The question above seemed too easy for many of you. Lets take the next step. Please count or calculate the number of possible correct answers to the same question.

No ordinary magic square part 2. How many solutions are there?

$\endgroup$
7
  • 2
    $\begingroup$ I think there must be many many solutions to this puzzle. I just put in the numbers 1-9 and swapped about 2 numbers. I think a much more interesting challenge might be to place some restrictions, or to see how many possibilities there are. I don't have the tools to do it myself, but I think that would pose a much more interesting challenge to the brilliant minds in this community. $\endgroup$
    – Inazuma
    Jun 9, 2016 at 9:17
  • 1
    $\begingroup$ next puzzle should be how many combinations can this be done in? $\endgroup$ Jun 9, 2016 at 9:18
  • 1
    $\begingroup$ @ShaneRowattgood idea $\endgroup$ Jun 9, 2016 at 9:25
  • 1
    $\begingroup$ @GregHastings You do not necessarily need to know the answer yourself. Tag it as open-ended, the right answer should be self-explanatory enough to be judged well by the community. $\endgroup$
    – Inazuma
    Jun 9, 2016 at 9:37
  • 1
    $\begingroup$ No. When you tag as open-ended responders know they run the risk of not having a 'correct' answer. But it is also much more challenging because there is generally no distinct 'right answer'. However someone may be able to generate a code or come up with a permutations method etc. that can calculate the number of possible solutions, and if this can be proven to be correct, then you may want to tag it as the accepted answer. See puzzling.stackexchange.com/questions/8843/… for an example, perhaps. $\endgroup$
    – Inazuma
    Jun 9, 2016 at 9:41

5 Answers 5

2
$\begingroup$

The following is a solution

1 2 9
4 5 7
6 8 3

Reasoning

Sum of rows, then sum of columns, then diagonals.

129 = 12, 457 = 16, 683 = 17, 146 = 11, 258 = 15, 973 = 19, 153 = 9, 956 = 20

$\endgroup$
4
  • $\begingroup$ You found a different answer than I did, but it checks out! Congratulations $\endgroup$ Jun 9, 2016 at 9:08
  • $\begingroup$ If I am sure someone is right, what is the reason for making me wait a certain number of minutes to accept an answer? $\endgroup$ Jun 9, 2016 at 9:09
  • 5
    $\begingroup$ @Greg Hastings I think the waiting period might be to stop spam, or perhaps to just give everyone an equal opportunity to post an answer. I'm not too sure. $\endgroup$
    – Inazuma
    Jun 9, 2016 at 9:11
  • $\begingroup$ Shame on the anonymous down voter. Hmmm $\endgroup$
    – Inazuma
    Jun 11, 2016 at 4:08
4
$\begingroup$

Answer including approach:

Start with:

1 2 3
4 5 6
7 8 9

Now the middle row and column both sum up to 15, so swap 6 and 8

1 2 3
4 5 8
7 6 9

Now both diagonals still sum up to 15, so swap 1 and 5.

5 2 3
4 1 8
7 6 9

Rows: 10,13,22, Columns: 16,9,20, Diagonals: 15,11

$\endgroup$
1
  • $\begingroup$ correct. I know there are multiple solutions but have not attempted count how many. $\endgroup$ Jun 9, 2016 at 9:23
2
$\begingroup$

The answer is:

169 On the top row, 258 On the second row, 374 On the third

$\endgroup$
1
  • $\begingroup$ Correct. I know there are multiple solutions but have not attempted calculate how many. $\endgroup$ Jun 9, 2016 at 9:23
2
$\begingroup$

One solution:

-------------- = 17
9 | 1 | 6 = 16
8 | 7 | 5 = 20
4 | 3 | 2 = 9
= | = | = 18
21 | 11 | 13

$\endgroup$
2
$\begingroup$

There are quite a few possible answers. Specifically:

There are 24960, out of a possible 362880 squares (ignoring the fact that you could consider two squares to be the same if rotated/flipped).

The first one, lexicographically sorted is

1 2 3
4 5 8
6 9 7

and the last one is

9 8 7
6 5 2
4 1 3

I arrived at the answer by writing a script in Python 3 that checks every possible option:

import itertools

matches = 0
for square in itertools.permutations(range(1, 10)):
    sums = set()
    # rows (sum consecutive groups of 3)
    sums.add(sum(square[0:3]))
    sums.add(sum(square[3:6]))
    sums.add(sum(square[6:9]))
    # columns (sum every third element, starting at a different position for each column)
    sums.add(sum(square[0::3]))
    sums.add(sum(square[1::3]))
    sums.add(sum(square[2::3]))
    # diagonals (summing diagonals is trickier to explain, but the following works)
    sums.add(sum(square[0::4]))
    sums.add(sum(square[2:7:2]))

    # the length of a set is the number of unique elements.
    # if we have 8, then each sum is unique.
    if len(sums) == 8:
        matches += 1

print(matches)
$\endgroup$
1
  • $\begingroup$ I have verified this count with my own Python 2 script (before realizing it had already been posted as an answer). $\endgroup$ Jun 9, 2016 at 16:08

Your Answer

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

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