Magic 20 Squares!

Logic Level 2

In the figure below, there are 6 squares: 4 small, 1 medium (in blue), and 1 large. There are 9 circles, which will be filled with all the integers 1 through 9 such that the sum of the vertices of each square is 20.

What is the product of the 4 numbers along the blue square?


The answer is 384.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

14 solutions

Henry U
Dec 3, 2018

Let's label the circles as follows

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

The given information translates into

{ a + b + d + e = 20 b + c + e + f = 20 d + e + g + h = 20 e + f + h + i = 20 b + d + f + h = 20 a + c + g + i = 20 \begin{cases} a+b+d+e=20 \\ b+c+e+f=20 \\ d+e+g+h=20 \\ e+f+h+i=20 \\ {\color{#3D99F6} b+d+f+h=20} \\ a+c+g+i=20 \end{cases}

Adding all of these up, we get

2 a + 3 b + 2 c + 3 d + 4 e + 3 f + 2 g + 3 h + 2 i = 120 2 ( a + b + c + + h + i ) + b + d + 2 e + f + h = 120 2 45 + b + d + f + h + 2 e = 120 20 + 2 e = 30 2 e = 10 e = 5 \begin{aligned} 2a+3b+2c+3d+4e+3f+2g+3h+2i & = 120 \\ 2{\color{#D61F06} (a+b+c+\cdots+h+i)}+b+d+2e+f+h & = 120 \\ 2 \cdot {\color{#D61F06} 45} + {\color{#3D99F6} b+d+f+h} + 2e & = 120 \\ {\color{#3D99F6} 20} + 2e & = 30 \\ 2e & = 10 \\ e & = 5 \end{aligned}

Let's plug that into the equations from the start that involve e e .

{ a + b + d = 15 b + c + f = 15 d + g + h = 15 f + h + i = 15 \begin{cases} a+b+d=15 \\ b+c+f=15 \\ d+g+h=15 \\ f+h+i=15 \end{cases}

Now, we start putting numbers into the circles. We already have e = 5 e=5

a a b b c c
d d 5 5 f f
g g h h i i

The next number we will place is 1. It can either be placed in a corner or onto an edge.

  • Edge: WLOG let's say b = 1 b=1 . Then, a + d = c + f = 14 a+d=c+f=14 . However, the only way to make 14 is 14 = 6 + 8 14=6+8 . So, we can't place 1 onto an edge.
  • Corner: WLOG let's say a = 1 a=1 . Again, b + d = 14 b+d=14 . But this time, this is possible aince we only have to find one pair for that, which is 6 + 8 6+8 .

WLOG, we can say b = 6 b=6 and d = 8 d=8 . The table now looks like this

1 1 6 6 c c
8 8 5 5 f f
g g h h i i

Now, look at the diagonal square ( b d f h bdfh ). Its sum also has to be 20 and we already have 6 and 8, so f + h = 6 f+h=6 . Since 5 has already been used, f and h have to be 2 and 4. The order actually doesn't matter because we have found everything we need!

b d c h = 2 4 6 8 = 384 b \cdot d \cdot c \cdot h = 2 \cdot 4 \cdot 6 \cdot 8 = \boxed{384}

This the way I did it. Since all the smaller square sums were even, I knew that even and odd must be arranged in a balanced distribution. There were 4 slots for the 4 positive integers less tha 9. Hence. 2 × 4 × 6 × 8 = 384

Paul Hugens - 2 years, 6 months ago

For the large circle the equation should be a+c+g+i = 20

Shardul Maurya - 2 years, 6 months ago

Log in to reply

Oh, that's right. Thanks!

Henry U - 2 years, 6 months ago

Can you provide a solution that doesn't assume that the sum of the vertices is 20? There only solution (ignoring reflections and rotations) to the problem even without requiring the sum of the vertices to be 20.

Patrick Armitage - 2 years, 4 months ago

So I had the same idea to put 5 in the middle, then I put 9 in a corner

Da Wae - 2 years, 4 months ago

You substituted the sum of the letters with 45 but this assumes that e = 5 but the right thing would be not taking factors from e and you would be left with a+c+g+i+b+d+f+h which is the big square+the blue so the equations after would be 2•40+b+d+f+h+4e=120 4e=20 e=5

Omar Abdul'Azeez - 2 years, 2 months ago

Log in to reply

Summing all the letters from a to i corresponds to summing the digits 1 to 9.

Ian Koch - 2 years ago
Zac Mann
Dec 10, 2018

The vertices of each square must contain 0, 2 or 4 odd numbers as they sum to 20, an even number. Also note there are 4 even numbers and 5 odd numbers making up the integers 1 - 9. Additionally, as has been pointed out by other solutions, the middle circle must be 5 as the sum of all the numbers is 45 and the big square and blue square together sum to 40.

Now If the blue square contained 4 odd numbers then one of the remaining 5 circles would contain the 5th and one of the small red squares would have 3 odd vertices, which cannot be true, and so the blue square cannot contain 4 odd numbers.

If the blue square contains 2 odd numbers then the odd numbers are either next to each other or opposite.

Opposite: All the corner vertices must be even to satisfy having two evens in each small square, making a total of 6 even numbers which is impossible.

Adjacent: The fourth vertex of the same small square as the three odd vertices must be odd, and so must the vertex opposite it. The remaining corners must be even. As the middle circle is 5, the other 3 odd numbers in the small square with 4 odd numbers must sum to 15. In other words, some combination of 1, 3, 7 and 9 must sum to 15, which is impossible.

Thus the only remaining case is an even blue square:

The even blue square gives the nice solution of 2 x 4 x 6 x 8 = 384.

Edit: Finished solution thanks to Nicholas Palevsky.

Because 5 has to be in the middle, and 4 odd numbers adding to 20 would have to be 1, 3, 7, 9.

Niels van Z - 2 years, 6 months ago

Log in to reply

Thanks, I was just getting to changing it after seeing Nicholas's solution.

Zac Mann - 2 years, 6 months ago

Log in to reply

I think your solution is clear and simpler than mine.

Nicholas Palevsky - 2 years, 6 months ago

Log in to reply

@Nicholas Palevsky Thank you Nicholas.

Zac Mann - 2 years, 6 months ago
T.J. Span
Dec 5, 2018

Step 1: Realize that 5 occupies the middle circle. (1+2+3+4+5+6+7+8+9=45 while the large square and medium square corners sum to 40 without using the middle circle.)

Step 2: Realize that 9 occupies a corner circle. (If 9 occupies the middle of a side, two small squares contain 9 and 5. These two small squares must have unique ways to generate 6 so that they sum to 20. 1+5=6, 2+4=6, and 3+3=6, however the first option can be discarded because 5 has already been used and the third option is also unavailable because it reuses 3.)

Step 3: Realize that 2 and 4 must occupy the side circles adjacent to 9. (This follows directly from the argument for step 2)

Step 4: Realize that 6 and 8 complete the medium square along with 2 and 4. (Since 2 and 4 already belong to the medium square, the remaining circles must sum to 14. 7+7=14, 6+8=14, 5+9=14, 4+10=14, 3+11=14, 2+12=14, and 1+13=14. The first option is invalid because it reuses 7. The third option is invalid because it reuses 5 and 9. The last four options are invalid because they employ addends that aren't digits.)

Step 5: 2 ( 4 ) ( 6 ) ( 8 ) = 384 2(4)(6)(8)=\boxed{384}

Step 6: Fill in the remaining circles to verify the solution. Start by fixing the orientation of 6 and 8. (6 cannot link to 4, otherwise a second 5 must occupy a corner so that 4+5+5+6=20)

Step 7: Complete the remaining circles and sum the vertices of the large square for a final check: 1+3+7+9=20.

Very nice logical deduction steps!

Note: For completeness, you should show that the system can be solved.

Calvin Lin Staff - 2 years, 6 months ago

Log in to reply

Okay. I tied up the loose ends. ;)

T.J. Span - 2 years, 6 months ago

Nice work, but 'realize' is not a mathmatical function. lol

Paul Hugens - 2 years, 6 months ago
Geoff Pilling
Dec 12, 2018

This problem maps perfectly to a magic square where the corners and edges are transposed. Since we know the corners of a magic square are even, we know that the edges are in this case, so their product is 2 4 6 8 = 384 2 \cdot 4 \cdot 6 \cdot 8 = 384

Brandon Parker
Dec 15, 2018

This Python script actually runs a lot faster than I expected:

import itertools as it
num_set = [1,2,3,4,5,6,7,8,9]
pmt = it.permutations(num_set)
def check(x):
    s1 = x[0] + x[2] + x[6] + x[8]
    s2 = x[1] + x[3] + x[5] + x[7]
    if s1 != s2:
        return False
    s3 = x[0] + x[1] + x[3] + x[4]
    if s1 != s3:
        return False
    s4 = x[1] + x[2] + x[4] + x[5]
    if s1 != s4:
        return False
    s5 = x[3] + x[4] + x[6] + x[7]
    if s1 != s5:
        return False
    s6 = x[4] + x[5] + x[7] + x[8]
    return s1 == s6
def f(x):
    return x[1]*x[3]*x[5]*x[7]
for z in pmt:
    if check(z):
        print(z, f(z))
Nate Castillo
Dec 12, 2018

Since 20 is an even number we must have an even number of odd numbers in each square. If we try all even numbers in one corner the opposite corner will have 3 odd numbers which cannot add to an even number. Other arrangements will lead to an odd number of odd numbers in a square.

Noting that there are 4 even numbers and 5 odd numbers, we can try symmetric arrangements of 5 odds in a cross or 5 odds in an X. 5 odds in a cross leads to odd numbers of odds in a square.

The only valid arrangement must then be all even numbers in a diamond. We can solve the product directly by multiplying 2x4x6x8 = 384.

Going further to create a valid figure we note that the odd numbers sum to 1+3+5+7+9 = 25. Since the outside vertices sum to 20 we can deduce that 5 is the center.

Now we can place numbers on the diamond. If we place 2 and 8 adjacent in the diamond with 5 in the center, 2+8+5 = 15, meaning that the remaining corner must be 5, which will is invalid. So, 2 must be opposite 8.

By symmetry, 4 is opposite 6 and can be placed at will.

Now the remaining corners can be filled by deduction. One solution is:

9,2,7

4,5,6

3,8,1

Antoine Crbs
Dec 15, 2018

Here is a Python solution using a recursive function :

1
2
3
4
5
6
7
8
9
def b(n):
    if len(n)==9: return check(n)
    for x in [d for d in range(1,10) if d not in n]: b(n+[x])
def check(n):
    if n[0]+n[2]+n[6]+n[8]!=20 or n[1]+n[3]+n[5]+n[7]!=20: return
    for b in [0,1,3,4]: 
        if n[b]+n[b+1]+n[b+3]+n[b+4]!=20: return
    print(n)
b([])

output : 
[1, 6, 7, 8, 5, 2, 3, 4, 9]
[1, 8, 3, 6, 5, 4, 7, 2, 9]
[3, 4, 9, 8, 5, 2, 1, 6, 7]
[3, 8, 1, 4, 5, 6, 9, 2, 7]
[7, 2, 9, 6, 5, 4, 1, 8, 3]
[7, 6, 1, 2, 5, 8, 9, 4, 3]
[9, 2, 7, 4, 5, 6, 3, 8, 1]
[9, 4, 3, 2, 5, 8, 7, 6, 1]

All the possible solutions are listed higher, just take one of them let's say the first, 6 8 5 3 = 384 6*8*5*3=384

Hence the answer is 384 \boxed{384}

Max Freeway
Dec 11, 2018

All the outside numbers are used in 2 squares, once each ... totalling 2x20=40. As sum 1-9 =45, the centre number is 5.

There are 4 odd numbers left and as you can’t make 15 with any 3 of 1,3,7,9 each small square contains 1 odd number ... which must be the corners of the big square (as if any were on the blue square a small square would have more than 1 odd number)

That leaves only the 4 even numbers for the blue square: 2x4x6x8=384

Nicholas Palevsky
Dec 10, 2018

ISOMORPHISM: The problem is isomorphic to subtracting 5 from each number — filling in the puzzle with -4..0..4 instead — and requiring each square to sum up to 0 instead of 20, so we will solve that problem first.

SOME OBSERVATIONS:

A) in order for it to sum up even, each square has to contain an even count of odd vertices: either 0,2 or 4.

B) which means that each square has to have an even count of even vertices, as well. So the possibilities for each square is [4,0],[2,2] or [0,4] (where the first is the count of evens, the second is the count of odds).

C) The sum of all the numbers in the outer circles must equal 0, since it is just the sum of the vertices of the medium square & the large square.

D) The center circle must be 0 (under the isomorphism), since this is the only way to balance the remaining positive and negative integers to achieve C.

SOLUTION:

1) Assume that the blue medium square has half even and half odd vertices.

i) We can eliminate the possibility of the medium square having alternating even and odd numbers by contradiction, because to complete the sum of each small square to be even (0 is even) would require four odd numbers at each vertex of the large square, and we have already used up two of the four odd numbers in the blue square.

ii) We can eliminate having the medium square having adjacent even and odd numbers, because that means one small square must have all even vertices. 0 is the center vertex (by D) and thus the inner vertex of each small square, and there is no way to make any combination of three of the remaining even numbers balance out to add up to 0 without repetition, so this is a contradiction.

iii) Those are the only two possible ways for the blue square to have both odds and evens ([2,2]).

2) So, by contradiction, the blue square has to be either all evens or all odds ([0,4] or [4,0]). But if the blue square is all evens, then the large square also has to be all evens (to make the small squares all come out even), and there are not that many even numbers to go around. So the blue square is all odds {-3,-1,1,3} and the large square (again, to make the small squares all come out even) is all even numbers {-4,-2,2,4}.

BACK FROM ISOMORPHISM: So now coming back out of our isomorphism — adding 5 to each number — the evens and odds are reversed. The blue, large square must be all odds {1,3,7,9} and the medium, blue square all evens {2,4,6,8}. The latter set of numbers is all we need to know. Their product is 3* 2^7 = 384 \boxed{384} .

(The others each give a graph of a valid solution. I suspect these are all the same, if you allow for rotation and reflection. These solutions, Including the one below, conform to the constraints I have deduced above, and show that a solution is possible.)

9 2 7
4 5 6
3 8 1

Thanks for this, now I can complete my solution.

Zac Mann - 2 years, 6 months ago
Vinod Kumar
Dec 10, 2018

Following solution satisfies all the conditions:

(1) 9, 2, 7

(2) 4, 5, 6

(3) 3, 8, 1

Answer=4×2×6×8=384

Sidhant Chaliha
Dec 15, 2018

Let's start with the most basic square possible:

1 2 3 4 5 6 7 8 9 \begin{array}{lcr}1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{array}

First observe the blue square in the middle: 2 + 4 + 6 + 8 = 20 2+4+6+8=20

Good! Now observe the red outer square: 1 + 3 + 7 + 9 = 20 1+3+7+9=20

Great! Now look at the red inner squares:

1 + 2 + 4 + 5 = 12 1+2+4+5=12 ; off by 8 -8

2 + 3 + 5 + 6 2+3+5+6 ; off by 4 -4

4 + 5 + 7 + 8 4+5+7+8 ; off by + 4 +4

5 + 6 + 8 + 9 5+6+8+9 ; off by + 8 +8

So we have a working blue square, a working outer square, and 4 lacking inner squares. But the amount by which the inner squares are off compliment each other. Since the outer square is unchanged, you can switch the vertices around so that they line up. Switching the 1 1 and the 9 9 change their respective squares by a magnitude of 8 8 , fixing both.Switching the 3 3 and the 7 7 change their respective squares by a magnitude of 4 4 , fixing both. Now the entire square works, so the blue square is correct. Now you just have to multiply the vertices together: 2 × 4 × 6 × 8 = 384 2 \times 4 \times 6 \times 8 = \boxed{384}

Mikel Moriana
Dec 11, 2018

All 6 squares must have an even number of even (and odd) numbers in order to add up to an even number (20).

The only configuration that fulfills this is that in which the 4 even numbers occupy the squares in the middle of the big square, that's it, the corners of the blue square.

From that just multiply 2, 4, 6 and 8 to get 384.

K T
Dec 11, 2018

All numbers 1+2+..+9 add up to 45. The large and medium squares together must add up to 40, so there must be a 5 in the center. 7 cannot be in a small square together with 5 and either 1, 3, 4, 8 or 9, because either the sum would get too large or numbers would be used twice. So 7 must be in a corner with 2, 5 and 6 as its neighbours. Analogously, 3 cannot be together with 1,2,6,7 or 9 in a small square, so it must be in a corner with 4, 5 and 8 as its neighbours. Since the only common neighbour of 3 and 7 is 5, they must be in opposite corners, and the numbers 1 and 9 (that are a neighbour of 3 nor 7) will go in the other corners.

This leaves the even numbers for blue square, so that our product must be 2×4×6×8 = 384.

Tho show that there is a solution at all, I will complete the puzzle. Since 2 cannot be a neighbour of 1 or 3, the only place left is between 7 and 9. The other numbers follow directly by making the sum of small squares equal to 10. Apart from symmetries, the only solution is:

1 8 3
6 5 4
7 2 9
Laszlo Kocsis
Dec 10, 2018

I have no proof for this, but I suspected that considering symmetry and possible parity distributions result in the vertexes of the blue square being even. 2x4x6x8=384 I would love to hear your opinion about this approach, was I just lucky, or can you find a proof using this idea? So far I have not found a complete one.

I had the same idea, but couldn't find a complete solution either. I did post an incomplete solution though. Edit: solution finished after looking at Nicholas Palevsky's solution.

Zac Mann - 2 years, 6 months ago

Given the way the question is posed, it is sufficient to find a placement of the 9 digits that meets the requirements, and then just multiply together the values in the vertices of the blue square. The way I solved it was to guess, as Laszlo did, that the blue vertices were the even digits, then found a placement of the odd digits that worked, and hence the solution.

A trivial, but inelegant, proof is to check that all possible 9! solutions have the even digits in the vertices of the blue square.

Patrick Armitage - 2 years, 4 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...