4
$\begingroup$
A   F
B D E
C   G

A+B+C = B+D+E = F+E+G

Numbers 1,2,3,4,5,6,7

$\endgroup$
6
  • $\begingroup$ Also the diagonals too, or not? @RandalThor and JMP showed the solution with diagonals too. $\endgroup$
    – smci
    Mar 30, 2020 at 12:24
  • $\begingroup$ It's not a spoiler to point out due to symmetry that for any valid solution, we can get $2x2=4$ or $2x2x2=8$ equivalent solutions by symmetry: flip L-R (swap the vertical columns), and flip each (or both) columns T-B. (If you want to keep the diagonals equal, you have to flip both columns, so only $2x2=4$.) Anyway, WLOG you can require 1 to be in the top-left (it's trivial so show 1 can't occur in B,D,E). $\endgroup$
    – smci
    Mar 30, 2020 at 12:55
  • $\begingroup$ @smci It is trivial to show that B can be 1. ABCDEFG = 6154372. $\endgroup$
    – Florian F
    Mar 31, 2020 at 18:30
  • $\begingroup$ @FlorianF: sorry, yes, B can be 1 if we don't care about the diagonal sums. Ok so WLOG, by symmetry, we only need to consider the two cases A = 1 or B = 1. D can never be 1. $\endgroup$
    – smci
    Mar 31, 2020 at 23:16
  • $\begingroup$ @smci, actually, B can be 1 also if we do care about diagonals, as my example shows. You preserve all sums if you flip AB and FG, or BC and EF. That's another symmetry. For D you are right, it cannot be 1. $\endgroup$
    – Florian F
    Apr 2, 2020 at 6:16

5 Answers 5

7
$\begingroup$

The same 56 solutions but with logical reasoning instead of bruteforcing:

Firstly, let's assume that $A<C$, $F<G$ and $B<E$ (otherwise we can swap A/C, F/G or whole ABC/FEG columns) to find essentially different solutions.
Let $S=A+B+C=B+D+E=F+E+G$. We get $3S=(A+B+C+D+E+F+G)+B+E=28+B+E$ (since we know that A-G are 1-7 in some order). That means that $(B+E)\mod3=2$ (since $28+B+E$ needs to be divisible by 3).
Case 1) $B+E=5$, so $S=11$ and $D=6$. We can get: $B=2$ and $E=3$, to find $(A=4,C=5,F=1,G=7)$, or $B=1$ and $E=4$ to find $(A=3,C=7,F=2,G=5)$.
Case 2) $B+E=8$, so $S=12$ and $D=4$. We can get $B=3$ and $E=5$, to find $(A=2,C=7,F=1,G=6)$, or $B=2$ and $E=6$ to find $(A=3,C=7,F=1,G=5)$, or $B=1$ and $E=7$ to find $(A=5,C=6,F=2,G=3)$.
Case 3) $B+E=11$, so $S=13$ and $D=2$. We can get $B=5$ and $E=6$, to find $(A=1,C=7,F=3,G=4)$, or $B=4$ and $E=7$ to find $(A=3,C=6,F=1,G=5)$. So, we have 7 classes of solutions, each of them gives 8 solutions, with a grand total of 7*8=56.

$\endgroup$
5
$\begingroup$

There are 56 solutions:

1 3 7 6 2 4 5 (Sum: 11)
1 3 7 6 2 5 4 (Sum: 11)
1 5 6 4 3 2 7 (Sum: 12)
1 5 6 4 3 7 2 (Sum: 12)
1 5 7 2 6 3 4 (Sum: 13)
1 5 7 2 6 4 3 (Sum: 13)
1 6 5 4 2 3 7 (Sum: 12)
1 6 5 4 2 7 3 (Sum: 12)
1 7 5 2 4 3 6 (Sum: 13)
1 7 5 2 4 6 3 (Sum: 13)
2 3 7 4 5 1 6 (Sum: 12)
2 3 7 4 5 6 1 (Sum: 12)
2 4 5 6 1 3 7 (Sum: 11)
2 4 5 6 1 7 3 (Sum: 11)
2 7 3 4 1 5 6 (Sum: 12)
2 7 3 4 1 6 5 (Sum: 12)
3 1 7 6 4 2 5 (Sum: 11)
3 1 7 6 4 5 2 (Sum: 11)
3 2 7 4 6 1 5 (Sum: 12)
3 2 7 4 6 5 1 (Sum: 12)
3 4 6 2 7 1 5 (Sum: 13)
3 4 6 2 7 5 1 (Sum: 13)
3 6 4 2 5 1 7 (Sum: 13)
3 6 4 2 5 7 1 (Sum: 13)
3 7 2 4 1 5 6 (Sum: 12)
3 7 2 4 1 6 5 (Sum: 12)
4 2 5 6 3 1 7 (Sum: 11)
4 2 5 6 3 7 1 (Sum: 11)
4 6 3 2 5 1 7 (Sum: 13)
4 6 3 2 5 7 1 (Sum: 13)
5 1 6 4 7 2 3 (Sum: 12)
5 1 6 4 7 3 2 (Sum: 12)
5 2 4 6 3 1 7 (Sum: 11)
5 2 4 6 3 7 1 (Sum: 11)
5 4 2 6 1 3 7 (Sum: 11)
5 4 2 6 1 7 3 (Sum: 11)
5 6 1 4 2 3 7 (Sum: 12)
5 6 1 4 2 7 3 (Sum: 12)
5 7 1 2 4 3 6 (Sum: 13)
5 7 1 2 4 6 3 (Sum: 13)
6 1 5 4 7 2 3 (Sum: 12)
6 1 5 4 7 3 2 (Sum: 12)
6 4 3 2 7 1 5 (Sum: 13)
6 4 3 2 7 5 1 (Sum: 13)
6 5 1 4 3 2 7 (Sum: 12)
6 5 1 4 3 7 2 (Sum: 12)
7 1 3 6 4 2 5 (Sum: 11)
7 1 3 6 4 5 2 (Sum: 11)
7 2 3 4 6 1 5 (Sum: 12)
7 2 3 4 6 5 1 (Sum: 12)
7 3 1 6 2 4 5 (Sum: 11)
7 3 1 6 2 5 4 (Sum: 11)
7 3 2 4 5 1 6 (Sum: 12)
7 3 2 4 5 6 1 (Sum: 12)
7 5 1 2 6 3 4 (Sum: 13)
7 5 1 2 6 4 3 (Sum: 13)

I wrote an algorithm to find these solutions.

$\endgroup$
4
$\begingroup$

Sum:

12

is

 1     2
 5  4  3
 6     7

Method:

$4$ in the middle looks pretty likely, so let's give $3\;4\;5$ a go!
With this solution, we also have the two diagonals: $2+4+6=1+4+7=12$.

$\endgroup$
3
$\begingroup$

1 2
5 4 3
6 7

Methodology:

we want to put the largest and smallest numbers out on the corners, not on the intersections, so as to make all the sums as near as possible to equal. So we try

1 2
3 4 5
6 7

Then the sum across is 12, and the sums down are 10 and 14. So just swapping 3 and 5 is enough to make it correct.

$\endgroup$
1
$\begingroup$

First we construct a square A,C,G,F then we draw the bisector BE of the sides AC and FG. We set A=3, C=7, F=5, G=2. Then we set B=1, E=4, and on the middle of the bisector we put the D=6. All rows and columns add to 11.

square

$\endgroup$
5
  • $\begingroup$ 3+5+7=15, 7+2+6=15, 1+4+6=11. I don't think this works. $\endgroup$ Mar 30, 2020 at 3:53
  • $\begingroup$ @eyl327. I added an image to my answer. As you can see, 3+1+7=11, 5+4+2=11, 1+6+4=11. $\endgroup$ Mar 30, 2020 at 5:36
  • $\begingroup$ Ok, that is a valid solution. Using the letters from the question, this would be A=3 B=1 C=7 D=6 E=4 F=5 G=2. $\endgroup$ Mar 30, 2020 at 5:39
  • $\begingroup$ You've mislabeled the letters. For example the left vertical column should be ABC, not AFB. Can you fix that? $\endgroup$
    – smci
    Mar 31, 2020 at 23:19
  • $\begingroup$ @smci. I edited my answer and fixed it. $\endgroup$ Apr 1, 2020 at 3:21

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.