Can you fill the cells with integers so that all the equalities must be true?

2 by 2 box of numbers arranged into equations, with sums/differences given. Top left plus top right equals 8. Bottom left minus bottom right equals 6. Top left plus bottom left equals 13. Top right plus bottom right equals 8.


A more mathematical approach
The answer is



Now first horizontal equation be: <1> + <2> = 8
But the second vertical equation is same: <2> + <4> = 8

So, let us give the 1st and 4th cells the same variable - x Also, let us give variable z too to 3rd cell.
The grid now becomes:

 x  +  y  =  8
 +     +
 z  -  x  =  6
13     8

So, we get three equations and three variables :-
$x + y = 8$ - (1)
$z - x = 6$ - (2)
$x + z = 13$ - (3)

Adding (2) and (3):
$2z + x - x = 19$
So, $2z = 19$
Thus, $z = 19/2$, which is not an integer.

So, all the cells cannot be filled by integers.



Assume the top-left is odd. Then top-right and bottom-right are odd, and bottom-left must be both odd and even, because TL (odd) + BL = 13, so BL is even, but BL - BR (odd) = 6, so BL must also be odd.

Therefore the top-left is not odd.

However, the same argument applies for TL being even, so this has no solution.

  • 1
    $\begingroup$ Exactly. In other words, the system of equations has no solution in integers because it has no solution modulo 2. $\endgroup$ May 20 at 17:16

With a bit of lateral thinking, this puzzle does have a solution (several, really):

First off, use @A_username’s insight to realize that the numbers cannot be in a base in which the parity of the 13 is different from the parity of the 8 and 6. Odd number bases would allow it to have the same parity, so we need to assume the numbers are in such a base. Since the digit “8” appears in the puzzle the smallest such base is 9, which we will use (though any larger odd base will also work, it will just lead to a different answer).

Using @CoolCoder’s equations, we can now rewrite them as follows:

$$x + y = 8_9 = 8_{10}$$ $$z - x = 6_9 = 6_{10}$$ $$x + z = 13_9 = 12_{10}$$

$$2z = 20_9 = 18_{10}$$ $$z = 10_9 = 9_{10}$$

Plugging this value for $z$ back into the second equation gives us (from this point on, all numbers are single digit, so we’re dropping the base indicator as it doesn’t matter):

$$9 - x = 6 \Rightarrow x = 3$$

Which can in turn be used in the first equation to yield:

$$3 + y = 8 \Rightarrow y = 5$$

  • $\begingroup$ Hi, 2z = 16 base 10 = 17 base 9, so z will be 8 base 10 = 8 base 9. Also, the original question seems to have been modified. $\endgroup$ May 20 at 19:26
  • $\begingroup$ @KalyanRaghu Actually, I don’t think the question edits changed the grid, but I did make a transcription error when working out part of the problem. I think I’ve fixed that now. $\endgroup$ May 21 at 1:53

Let's assume the integers are $x,y,z$ and $-w$. All four equatins summed up gives $2x+2y+2z+2w=8+6+13+8$ or $2(x+y+z+w)=35$. Left side is even, right side is odd, so no integer solution exists.
(see correction below from Jaap Scherphuis to $2x+2y+2z+w-w=8+6+13+8$)

  • 1
    $\begingroup$ Actually the $w$ is cancelled cause it is added in one equation and subtracted in another. I understand you negated it, but that does not achieve anything and is simply unnecessary. Your conclusion still holds regardless of the cancellation. $\endgroup$ May 20 at 13:39
  • $\begingroup$ @Jaap Scherphuis : Yes, but should conclude it as at the beginning of CollCoder's solution. (Right about negation, here just in case if some further requirement of positivity appears.) $\endgroup$
    – z100
    May 20 at 13:49
  • $\begingroup$ I don't understand what you mean by your comment. What I'm saying is that your final equation is incorrect. It should be $2(x+y+z)=35$, without any $w$ in it. From this correct equation you can still draw the conclusion that there are no integer solutions to the puzzle. $\endgroup$ May 20 at 13:58
  • $\begingroup$ Just that you should first conclude that $w$ is really cancelled - first two rows in accepted solution. No need to explicitly find any variable. $\endgroup$
    – z100
    May 20 at 14:12
  • 2
    $\begingroup$ There is no need to conclude anything about $w$. Just adding the four equations exactly as you do in your answer, even with the negation of $w$, will give when you do it correctly $(x+y)+(z-(-w))+(x+z)+(y+(-w))=8+6+13+8$, which simplifies to $2(x+y+z)=35$ which has no integer solution. You do not get the equation you wrote regardless of whether you negate $w$ or not. $\endgroup$ May 20 at 14:21

Short answer:

No, you can not use only integers to solve the problem.

Long answer:

Let a = top-left, b = top-right, c = bottom-left, d = bottom-right. Since a + b = 8 and b + d = 8, a = d. With this, we can use subsitution: a + c = 13 -> a = 13 - c -> c - (13 - c) = 6 -> 2c = 19 -> c = 9.5. Therefore, the puzzle cannot be solved with only integers.

The solution to the problem:

a = 3.5, b = 4.5, c = 9.5, d = 3.5

  • $\begingroup$ Your b is too small. $\endgroup$
    – PM 2Ring
    May 21 at 1:22

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