Seven?

64 numbers (not necessarily distinct) are placed on the squares of a chessboard such that the sum of the numbers in every 2x2 square is 7.

What is the sum of the four numbers in the corners of the board?

It depends Seven

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.

4 solutions

Chris Lewis
Apr 12, 2019

Call a 2 × 2 2\times 2 square a "tile". The whole chessboard can be partitioned into 16 16 tiles, so the total of all the numbers on the board is 16 7 = 112 16\cdot 7=112 .

Now colour the board as below:

The green section can be partitioned into 9 9 tiles; its total is 63 63 .

The dark blue sections together with the green section can be partitioned into 12 12 tiles, so its total is 84 84 ; so the total of the numbers in the dark blue sections is 84 63 = 21 84-63=21 . In the same way, the total for the light blue sections is also 21 21 .

The orange section (ie the corners) is the whole board with the green and blue sections removed; so the total in the orange cells is 112 63 21 21 = 7 112-63-21-21=\boxed7 .

Cool solution, Chris! 😎

Geoff Pilling - 2 years, 2 months ago

Good solution

vu van luan - 2 years, 1 month ago

There is an easier way to do it, but your method is elegant too.

Popular Power - 2 years, 1 month ago

Log in to reply

Whats the easier way?

Geoff Pilling - 2 years, 1 month ago

I found the problem unspecific. Are we counting ‘all’ 2x2 tiles including ones that share squares with nearby 2x2 tiles or only distinct 2x2 tiles?

Princeton Vargas - 11 months, 1 week ago
Eric Nordstrom
Apr 22, 2019

The result of the following code is 7 \boxed{7} .

1
2
3
4
5
6
7
8
9
from sympy import symbols as sym
a = [[sym('a1'+str(j)) for j in range(1,9)]] + [[sym('a'+str(i)+'1')]+[
0]*7 for i in range(2,9)]

for i in range(1,8):
    for j in range(1,8):
        a[i][j] = 7 - a[i-1][j-1] - a[i-1][j] - a[i][j-1]

print(a[0][0] + a[0][7] + a[7][0] + a[7][7])

I think this code would benefit from comments. I've never used SymPy before, but here's my attempt:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
from sympy import symbols as sym  # SymPy is a Python library for symbolic mathematics. https://www.sympy.org

# Create the start of the board
# The following is built from several list comprehensions - a way of generating a list in one line of code.
board = [[sym('a1' + str(j)) for j in range(1, 9)]] + [  # Fills the top row with the symbols a11 through to a18. SymPy treats these like unknowns.
                   [sym('a' + str(i) + '1')]  # Fills the left column with symbols (unknowns) a21, a31, et cetera to a81.
                   + [0]*7 for i in range(2, 9)]  # Fills the rest of the board with zeros.

# Fill the board to comply with the restrictions set in the problem
for i in range(1,8):  # Iterate through the rows (except the top)
    for j in range(1,8):  # Iterate through the slots in that row (except the leftmost)
        board[i][j] = 7 - board[i-1][j-1] - board[i-1][j] - board[i][j-1]  # Fill the chosen slot with whatever is needed to make the 2x2 sum to 7

print(board[0][0] + board[0][7] + board[7][0] + board[7][7])  # Sum the corners of the board, and print it
# We can see that the unknowns cancel and leave us with just a 7

Jem Bennett - 2 years, 1 month ago

Log in to reply

Thanks. Guess I was lazy about that.

I had used it in the past, but for me it might as well have been a first time, too. I figured people could research about whatever they personally needed, and I could just answer questions in the comments.

By the way, I accidentally wrote one instance of "sym" as "symbols". I fixed it on mine.

Eric Nordstrom - 2 years, 1 month ago

Log in to reply

Changed this on mine too now - but https://live.sympy.org/ runs it correctly either way.

Jem Bennett - 2 years, 1 month ago

Log in to reply

@Jem Bennett It didn't when I tried it in the Brilliant coding environment, but it did in IPython.

Eric Nordstrom - 2 years, 1 month ago

@Jem Bennett Yeah, on Sympy Live it should run because they start you off with it already imported.

Eric Nordstrom - 2 years, 1 month ago

Great programming!

Lâm Lê - 1 year, 1 month ago
Tomáš Saatzer
Apr 23, 2019

There is given: "the sum of the numbers in EVERY 2x2 square is 7 7 " by that in every corner will the sum be 7 7 .

The corners don't really make up a 2x2 square though... :-/

Geoff Pilling - 2 years, 1 month ago

From the Chris Lewis solution, you can prove that any four tiles would add up to 7 7 . You can always use the same technique. That is, partition all 64 64 tiles to 16 16 of 7 7 each. Then say we remove 4 4 squares. All other 15 15 tiles will add up to 15 × 7 15 × 7 and if we subtract from the total 16 × 7 15 × 7 = 7 16 × 7 - 15 × 7 = 7 from that: any four squares would, in fact, add up to 7 7 .

Tomáš Saatzer - 2 years, 1 month ago

Log in to reply

"You can prove that any four tiles would add up to 7". This is clearly not true, unless all tiles have value 7 4 \frac{7}{4} . (If they are not equal, select the greatest 4 numbers and they will add to greater than 7...)

Your solution is only valid if the 60 squares left over can be tiled by 2x2 s. Eg the first 4 squares of the top row don't have to add to 7.

Alex Burgess - 2 years, 1 month ago

Log in to reply

Yeah, yeah... you are right, but you missed the line before it. That is: "From the Chris Lewis solution," I just referred to the solution. Essentially, if his is correct mine is as well otherwise both are wrong :)

Also, notice: "not necessarily distinct" so the 1 , 75 1,75 is a valid solution.

The initial solution was due to my English :) I thought that it means: the four in a corner (and "corners" is there just to say, it doesn´t matter in which one).

Tomáš Saatzer - 2 years, 1 month ago

Log in to reply

@Tomáš Saatzer That's not strictly true. You referred to the solution, but his solution doesn't show that ANY 4 tiles add up to 7. His only solves for the 4 corners. Your solution works for more combinations of 4 tiles, but only those that leave the rest of the grid tile-able with 2x2 squares. So both solutions are actually disjoint.

It's true it is 1 valid case, but not a "solution" as you have no choice in these values, you have to work in the most general case. Top left corner could be a 1, 5, pi, -101, so the solution has to work for all cases.

Ahh, true, that isn't amazingly clear, I understand where you're coming from.

Alex Burgess - 2 years, 1 month ago

Log in to reply

@Alex Burgess You are absolutely right. I read it once again, and I spotted where they differ. I thought that he is "connecting" the dark blue sections together, but that is not true. Thanks for the inside and for the discussion :)

Meaby a better solution, in general, is to think about it like: if the 2x2 square repeats all over the chessboard, in each corner will end up a different number of the four. So they have to add up to 7 7 . //this also works if you have a case in which if you connect tiles (that you want to add together) and every side is even.

Tomáš Saatzer - 2 years, 1 month ago

Log in to reply

@Tomáš Saatzer I do like the idea of "connecting" the sections together. Eg taking 4 chessboards and joining them at a corner makes the 4 corners form a 2x2 square.

Is this if you label the 4 squares in a 2x2 a,b,c,d, each corner is a different letter? This doesn't always work though, if you select random a,b,c,d from the same tessellation as different a's can take different values for example.

Alex Burgess - 2 years, 1 month ago

Log in to reply

@Alex Burgess It's a shame that I can't add a photo here. But if I understand it correctly then you say: the square can have in a's spot number d for example. Well, it doesn't meather because the whole rectangle is then shifted to the side so each spot in the rectangle is then occupied by a different number of the four.

Tomáš Saatzer - 2 years, 1 month ago

Starting with a 2x2 square, the sum of all four corners are 7 according to the rule. Imagine we put two 2x2 squares together, forming a 2x4 grid. The sum of all 8 digits in this 2x4 grid is 7+7 = 14. (i.e. a+b+c+d+e+f+g+h = 14)

a b c d
e f g h

Since a 2x2 square containing b, c, f and g also has the sum of 7, then b+c+f+g = 7. Hence, a+d+e+h = 7. (i.e. the sum of all four corners of a 2x4 grid is 7.)

Again, we put two 4x2 grids together, forming a 4x4 square. Also, a+b+c+d+e+f+g+h =14.

a b
c d
e f
g h

From the previous part, we now know that c+d+e+f = 7, and so can conclude that a+b+g+h = 7. Therefore, the sum of the four corners of the 4x4 square is 7.

Again, we connect two 4x4 squares together forming a 4x8 grid. Also, a+b+c+d+e+f+g+h = 14.

a b c d
e f g h

As the sum of the corners of a 2x4 grid is 7, then b+c+f+g = 7. Hence, a+d+e+h = 7. Finally, we connect two 4x8 grids together, forming an 8x8 square. Also, a+b+c+d+e+f+g+h = 14.

a b
c d
e f
g h

(By connecting two 2x4 grids into a 2x8 grid and use the similar method, we can conclude that the sum of all four corners Of a 2x8 grid is 7.) Since c+d+e+f = 7, then we get a+b+g+h = 7. Therefore, from a given rule, the sum of the corners of the 8x8 square is 7.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...