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?
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.
Cool solution, Chris! 😎
Good solution
There is an easier way to do it, but your method is elegant too.
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?
The result of the following code is 7 .
1 2 3 4 5 6 7 8 9 |
|
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 |
|
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.
Log in to reply
Changed this on mine too now - but https://live.sympy.org/ runs it correctly either way.
Log in to reply
@Jem Bennett – It didn't when I tried it in the Brilliant coding environment, but it did in IPython.
@Jem Bennett – Yeah, on Sympy Live it should run because they start you off with it already imported.
Great programming!
There is given: "the sum of the numbers in EVERY 2x2 square is 7 " by that in every corner will the sum be 7 .
The corners don't really make up a 2x2 square though... :-/
From the Chris Lewis solution, you can prove that any four tiles would add up to 7 . You can always use the same technique. That is, partition all 6 4 tiles to 1 6 of 7 each. Then say we remove 4 squares. All other 1 5 tiles will add up to 1 5 × 7 and if we subtract from the total 1 6 × 7 − 1 5 × 7 = 7 from that: any four squares would, in fact, add up to 7 .
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 4 7 . (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.
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 , 7 5 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).
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.
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 . //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.
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.
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.
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.
Problem Loading...
Note Loading...
Set Loading...
Call a 2 × 2 square a "tile". The whole chessboard can be partitioned into 1 6 tiles, so the total of all the numbers on the board is 1 6 ⋅ 7 = 1 1 2 .
Now colour the board as below:
The green section can be partitioned into 9 tiles; its total is 6 3 .
The dark blue sections together with the green section can be partitioned into 1 2 tiles, so its total is 8 4 ; so the total of the numbers in the dark blue sections is 8 4 − 6 3 = 2 1 . In the same way, the total for the light blue sections is also 2 1 .
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 1 1 2 − 6 3 − 2 1 − 2 1 = 7 .