□ × □ = □ □ + □ = □ □ − □ = □
Can we fill in each of the squares with a distinct digit such that all of the three equations are true?
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.
Thanks for explaining why this solution is essentially unique.
For problems like this, we look for the biggest constraint, hoping that would greatly limit the cases. In this case, the multiplication statement is extremely restrictive, and we only have 2 × 3 = 6 and 2 × 4 = 8 to test out.
The original post stated to use the digits 0-9. To include 0, it is not possible to solve. Also, that makes 10 digits in 9 boxes.
Log in to reply
I had the same thought as well. I didn't consider that 0-9 would be 10 numbers, so I just thought about how 0 wouldn't work for any of them and said "No". I thought I figured out the trick and felt smart haha.
excellent work!!
How did you made the grey shaded box?
Log in to reply
Start and end a "code block" using three single back-quotes: ``` . Anything placed between these will be printed verbatim.
Log in to reply
Great job!!
Thanks for explaining it! I got lucky as the first combination I tried was correct. Thanks for giving the proper explanation.
You forgot the zero.
Log in to reply
Not really. I argued near the beginning (first bullet point) that the zero cannot be part of the solution. The problem (either in its original formulation or in its current statement) does not say that all digits must be used.
Very detailed answer, excellent explanation. Wording of problem was vague, however. For example, does distinct mean the same as unique?
Relevant wiki: Arithmetic Puzzles - Operator Search
Placing a 0 in the addition or subtraction leaves the other two numbers as the same, and placing a 0 in the multiplication means that there must be another 0 as well.
Therefore the digits 1-9 must be used. One such combination is:
2 × 3 = 6
1 + 7 = 8
9 − 5 = 4
Is it the only way to solve this problem?
Log in to reply
Yes, it is the only way.
Log in to reply
@genis dude But @A.j. Bussman showed an another way.
Log in to reply
@Munem Shahriar – See Arjen's solution which explains why those 2 solutions are essentially the same.
So, it depends on what you define as "the only way to solve". IE is 2 × 3 = 6 different from 3 × 2 = 6 ?
Log in to reply
@Calvin Lin – 4 + 5 = 9 is different from 1 + 7 = 8 .
However, I meant to ask ''Is it the only way?''.
Log in to reply
@Munem Shahriar – See Arjen's solution which explains why those 2 solutions are essentially the same.
Specifically, he said "I think of the subtraction as an alternative of writing an addition; we also have the freedom to rearrange factors and terms, and to swap the additions. Making use of this symmetry, ... there are 2 × 2 × 2 × 2 = 1 6 ways that a solution can be rearranged". In particular, 4 + 5 = 9 , 8 − 7 = 1 is not considered different from 9 − 4 = 5 , 1 + 7 = 8 , because they represent the same sums 4 + 5 = 9 , 1 + 7 = 8 . So, if we're counting "up to symmetry", then there is essentially one solution.
Well, there are only 9! combinations, a brute force search will solve the problem in a giffy
I think the question is not well formulated and is not very clear.
Log in to reply
What are your concerns about it? What doesn't feel clear to you?
Now that I'm here instead of looking at the email, my perception of the problem has changed. I had realized that zero can't be used at all, but from the email I misunderstood that zero had to be used - hence the answer is (would have been, using my false rationalization) no. :P
Was anyone else led into the direction that this is a trick question, as "0-9" are ten digits and there are only 9 spaces to fill, therefore it is technically not possible to fill them with the digits "0-9"?
Log in to reply
That was exactly what I thought. The question should be redrafted in order to avoid this misunderstanding.
Log in to reply
How would you suggest rephrasing it? I'm happy to remove the "(0 to 9)" if you think that would solve the issue.
Log in to reply
@Calvin Lin – Calvin, thank you for your answer. I suggest the following: "Can we fill in each of the squares with a distinct digit, from 1 to 9, such that all of the three equations are true?"
Log in to reply
@David Gómez – The intention of the problem creator ( see the comment thread here ) is that the solver accounts for 0 (albeit momentarily). As such, I think that removing "(0 to 9)" helps to preserve his intention while removing the ambiguity.
Can we fill in each of the squares with a distinct digit such that all of the three equations are true?
Note to self: In this similar problem , it was explicitly stated that "Note: Since there are only 8 boxes, two digits will be left over.", so it seems like the ambiguity did confuse people.
I agree. I quickly concluded that 0 couldn't be part of the solution so it couldn't have all the digits 0-9. The problem would have been better if it had asked for each of the digits 1-9 since it only had 9 slots
Relevant wiki: Arithmetic Puzzles - Operator Search
2 × 3 = 6
4 + 5 = 9
8 - 1 = 7
The question asked if you could fill in the squares with digits 0 to 9 which could lead one to think that the digits 0 and 9 are the only 2 required digits and choosing 7 out of the other 8.
2 × 3 = 6
4 + 5 = 9
8 − 7 = 1
The only solutions for the multiplication are 2x4=8 or 2x3=6 all others would result in the repeated use of a number (ie. 1x7=7) or a double digit solution (ie. 3x4=12)
So we have used either three evens (2,4,8) or two evens and one odd (2,6,3). We therefore have to fit in either five or four more odd numbers.
Next, look at the possible additions and subtractions, thinking about evens and odds:
odd+odd= even, odd+even=odd or even+even=even
odd-odd= even, odd-even=odd or even-even=even
No way to fit in 5 more odd numbers, so multiplication has to be 2x3=6
We're then left with 1,4,5,7,8,9. From this point it's quite simple to spot a few possible outcomes, including: 4+5=9 and 8-7=1
Good. After your first two lines I'd say i) no zeroes because any zero means a repeated number in the equation it is in. ii) we can re-arrange equation 3 from x-y=z into y+z=x, a 2nd addition equation. iii) The sum of the terms in equation2 (&3) must be even (LHS=RHS so LHS+RHS is even) iv) the sum of all 9 numbers is 45 (odd) , so sum of first equation terms is odd so using your first lines, we have 2 x 3 =6 v) The sum of RHSs of the other two equations (rearranging the third as a sum) is 45 - 11 =34 so RHS1 +RHS2 = 17 (so 8 & 9)
so 2x3=6, + =8, & + =9 using 1,4,5,7 to fill the _s (easy). Rearrange a plus equation to get one of the two alternate answers
All that's required is to find a solution that works. We can remove 0 from the available numbers, since it's use would result in digits doubling up in any of these equations.
1st term: A x B = C Result 2 x 3 = 6
A or B cannot be 1 since C would then equal the other. If A is 2, then B can only be either 3 or 4. Any other B would make C too large. If A x B = C is 2 x 3 = 6 , the available pool becomes 1,4,5,7,8,9. If A x B = C is 2 x 4 = 8 , the available pool becomes 1,3,5,6,7,9. The remaining terms require at least 2 even numbers to fill their squares. Therefore 1st term must be 2 x 3 = 6
2nd term: 1, 4, 5, 7, 8, 9 available.
D + E = F Result 1 + 7 = 8
F must be larger than D and E, so we will work from 9 downwards.
If F=9, D and E can only be 8 and 1, leaving 4, 5, 7. This does not allow Term 3.
If F=8, D and E can only be 7 and 1, leaving 4, 5, 9. This allows Term 3 to be fulfilled.
3rd term: G − H = I Result 9 − 4 = 5
The question was asking for DISTINCT digits though. So you need to pick nine numbers from the set {0,1,2,3,4,5,6,7,8,9}
This is wrong. The digits should be distinct.
Yes, here is an example: 2 x 3 = 6, 1 + 7 = 8, 9 – 4 = 5.
2 x 3 = 6 , 4+5 = 9, 8-1=7
0 cannot appear in the multiication, because it would have to appear twice. It cannot appear in the addition nor in the subtraction, because either the result is negative or the other two digits (non zero) are the same. Thus the set of numbers is [1,9] and we have to use them all as there are 9 blanks.
Now think of all possible ways two 1-digit numbers can multiply to get another 1-digit number. 1 as a factor is immediately excluded as that requires the other two numbers to be equal. 1 cannot be the result for obvious reasons.
We're left with: 2 2=4 3 3=9 (rejected) 2 3=6 2 4=8
As well as the same multiplications with swapped factors. Notice that in one of the possibilities there is one odd digit, whereas in the other there is none.
Between 1 and 9 there are 5 odd digits, and because we have to use them all there are 5 blanks to be filled with an odd digit.
A quick look at the last two equalities reveal that there can be either 0 or 2 odd digits in each equality. That means in total 0, 2 or 4 (at most 5) odd digits in the last two equalities which leaves at least one in the multiplication. That implies that the multiplication must be 2*3=6.
Sum and difference must each contain one even digit and two odd digits.
Let the sum and difference be
a+b=c x-y=z or y+z=x
It is now sufficient to find two triples of numbers l+m=n in {1, 4, 5, 7, 8, 9}
Example of 2 triples: (1,7,8) (4,5,9)
Therefore we can pick a=1 b=7 c=8 y=4 z=5 x=9 Which is by no means the only solution.
Therefore we have
2*3=6 1+7=8 9-4=5
The only 2 numbers possible through multiplication are 6 and 8, beacause 1 is 1×1 and a digit is used more than once. 2, 3, 5, and 7 are prime, so it would that number times 1, and a digit would be repeated. 4 is 4×1 or 2×2, so digits would be repeated. 9 is 9×1 or 3×3, so again digits would be repeated. This leaves us with 6, which could be 2×3, or 8, which is 4×2. If we use 8, the digits left are 1,3,5,6,7,and 9. 9 can only be used in an equation with 6 and 3, so the digits left are 1,5, and 7. They cannot be used in any equation. This means we have to use 2, 3, and 6 in the multiplication row. This leaves 1,4,5,7,8, and 9. Now we can see that 7 can only be used in an equation with 8 and 1. This finally leaves the digits 4, 5, and 9. These can be used to equal eachother, so it is possible.
Note the 3rd equation is x - y = z, which can be re-written x = y + z. So it is of the same form as 2nd equation. Well the smallest number that MUST be in the equation with the multiplication in it is 2. This is because 0 cannot either be one of the numbers to multiply or the answer because of course zero multiplied by anything is zero. So there would have to be two zeros in this set of numbers, and we need them to be distinct. And for exactly the same reason 1 cannot be one of the numbers multiplied, since this equation would have the second number and the answer as the same number. So 2 is one of the numbers to be multiplied. (Because 3 x 4 = 12 which is too big - not a digit.) So this full equation can either be 2 x 3 = 6 OR 2 x 4 = 8. Now note that zero cannot be in either of the 'adding' equations either, because the other number and the answer would be the same. SO ZERO IS NOT GOING TO FIGURE IN THESE NUMBERS, SO 1,2,3,4,5,6,7,8,9 ARE THE NUMBERS THAT WE MUST ATTEMPT TO PUT INTO THESE 3 EQUATIONS. Remember that the two equations can both be written with a 'plus' as the function. So the addition of these 3 digits must be even, [since if x + y = z then ((x + y) + z) must be equal to (z + z) which is 2z - even. The addition of all the positive numbers is 45, so the six without 2,4 and 8 is 31 which is not even! So this is not included in the answer. So the equation with the multiplication is 2 x 3 = 6. And the other six numbers are 1, 4, 5, 7, 8, 9. The largest number of 9 must be an 'answer'. That can be achieved either by 1 + 8 = 9 or 4 + 5 = 9. In the first case we have 4, 5, 7 and 4 + 5 is not equal to 7. Though in the 2nd case of 4 + 5 = 9 the numbers not yet used are 1, 7 & 8. And now 1 + 7 = 8. Or as it can be written 8 - 1 = 7. THIS IS THE ONLY 'ESSENTIALLY DIFFERENT' possibility, but with the 2nd & 3rd equations the equation including a subtraction could be changed. So that those equations become 9 - 1 = 8 and 1 + 7 = 8. Regards, David
The quiz should be posted in a more precise/detailed way. Indeed, in the original text of the question the fact that you mention 0 through 9 the digit that must be used is misleading since it is not immediately clear whether you can exclude the digit 0. Therefore, it's enough that you use 0 one time in any of the equations to justify the answer "No, we cannot" which in turn you declare it incorrect.
L. Nanni, Italy
Adding the constraint that each row must be either an ascending or descending sequence, there is only one solution: 2x3=6 4+5=9 8-7=1
slightly deductive and slightly trial and error solution here - looking at the first equation.
We can't use 0 or 1 and keep the distinct digit rule intact. Now looking at the other extreme 9, 8, 7, 6, 5 will all yield double digit solutions not a distinct digit.
so we are left with 2 , 3 , 4 .
possibilities are 2 × 3 , 2 × 4 . Now I switch over to trial and error with only 2 possibilities there much less work involved.
I personally started with the lower number so:
2 × 3 = 6
then I look at the subtraction, the only way to use the 9 and infer the last equation based on what is left. Still cannot use 0 without breaking the distinct digit rule again, so looking at the rest in a trial and error format.
9 − 1 = 8 = > 4 , 5 , 7 are left - no solution
9 − 4 = 5 = > 1 , 7 , 8 are left - possible solution 1 + 7 = 8
no requirement to continue, as we now have the answer - yes it is possible.
Solving through exhaustion using Python
def main():
boxMulti = [(2,3,6) , (2,4,8)]
digits = set(range(1,10))
for x in boxMulti:
rem_digits = digits - set(x) # remaining unique digits left for add / subtract
for add_1 in list(rem_digits):
for add_2 in list(rem_digits - set([add_1])):
if (add_1 + add_2) in rem_digits:
rem_digitsCopy = rem_digits - set([add_1,add_2, add_1+add_2])
for minus_1 in list(rem_digitsCopy):
for minus_2 in list(rem_digitsCopy - set([minus_1])):
if minus_2 >minus_1:
if (minus_2 - minus_1) in rem_digitsCopy:
print('X:',x)
print('+:',add_1,add_2)
print('-:',minus_2,minus_1)
return
if name == " main ": main()
The key here for me is to start with the most limiting factor: multiplication. From 0-9, 0 cannot be used as you'd end up with 0, the same for 1 as you'd end up with the other number. Due to 9 being the highest integer, only 2, 3, and 4 can be used for multiplication in some combination. 4 * 3 = 12, so that's out. One need only consider worlds where 2 * 3 = 6 or 4 * 2 = 8 are used. A bit of trial and error and you'll find that 2 * 3 = 6 has a solution, but 4 * 2 = 8 does not. Namely,
2 x 3 = 6, 9 - 4 = 5, 7 + 1 = 8
We can't use 0, since doing so would force a number to be used twice. Therefore each of the integers from 1 to 9 inclusive occurs exactly once.
Any true equation consisting of additions and subtractions of integers will have even parity - either both sides of the equation are odd, or both sides are even. Being odd is equivalent to containing an odd number of odd integers, and being even is equivalent to containing an even number of odd integers. Since we have a total of 5 odd numbers, the multiplication must have odd parity. There is only one distinct way of achieving this with distinct integers from 1 to 9: 2 × 3 = 6 .
To fill in the other two equations, first note that a − b = c ⇔ b + c = a . So we can simplify the problem by treating them as two additions. We have left the numbers 1, 4, 5, 7, 8 and 9. The sum of these is 34. The sum of the LHSs of the two equations must be the same as that of the RHSs, and therefore is 17. The only way to get this is by using 8 and 9 as the RHSs. And we can use the remaining numbers in the LHSs to satisfy the equations: 1 + 7 = 8 and 4 + 5 = 9 . Translating this back to the original forms, we have: 2 × 3 = 6 1 + 7 = 8 9 − 5 = 4
We can not use 0, as that will necessitate a repeated digit in whichever equation it is in. We can write the subtraction as an addition, thus giving a multiplication and two additions to find. The multiplication can only be 2x3=6 or 2x4=8. So 9 must be the sum of one of the additions. With 2x4 it can only be 3+6=9, leaving 1,5,7 which do not fit an addition. With 2x3 it can be 1+8=9, leaving 4,5,7 which doesn’t work, or 4+5=9 which gives 1+7=8. Thus all solutions are of this form. Either addition can be made into a subtraction in two ways, so altogether there are four different solutions.
Problem Loading...
Note Loading...
Set Loading...
Relevant wiki: Arithmetic Puzzles - Operator Search
I think of the subtraction as an alternative of writing an addition; we also have the freedom to rearrange factors and terms, and to swap the additions. Making use of this symmetry, we look for a solution of ⎩ ⎪ ⎨ ⎪ ⎧ f × f ′ = P t 1 + t 1 ′ = S 1 t 2 + t 2 ′ = S 2 with f < f ′ ; t 1 < t 1 ′ , t 2 < t 2 ′ ; S 1 < S 2 . Each solution to this can be rearranged to 16 different solutions of the original problem (see below).
No digit may be used more than one. This implies
the digit zero cannot occur in the solution; this leaves us with one each of 1 … 9 ;
f = 1 .
Note that t 1 + t 1 ′ + S 1 = 2 S 1 is even, etc. Thus the digit sum in the additions is even, which implies f + f ′ + P is odd. This requires that at least one of f , f ′ is odd. But if f ≥ 3 then f ′ ≥ 4 and P ≥ 1 2 will be too large. This leaves us with f = 2 and f ′ odd; we see that f ′ < 5 and so f × f ′ = P ⟹ 2 × 3 = 6 .
The sum of the remaining digits is 4 5 − 2 − 3 − 6 = 3 4 . Note that 3 4 = t 1 + t 1 ′ + S 1 + t 2 + t 2 ′ + S 2 = 2 S 1 + 2 S 2 = 2 ( S 1 + S 2 ) ∴ S 1 + S 2 = 1 7 . There is only one way of accomplishing this: S 1 = 8 and S 2 = 9 . An odd sum is obtained by adding an odd term and an even term; thus the only remaining even digit, 4, must be part of the second addition: { t 1 + t 1 ′ = 8 4 + t 2 ′ = 9 It is now easy to conclude t 2 ′ = 5 , t 1 = 1 and t 1 ′ = 7 .
Thus we have shown that there is essentially one solution to this problem, namely ⎩ ⎪ ⎨ ⎪ ⎧ 2 × 3 = 6 1 + 7 = 8 4 + 5 = 9
Exhaustive list of solutions