#1
|
|||
|
|||
Number Puzzle
1 2 3 4 5 6 7 8 9 = 100
By inserting one + sign and two - signs, there is a way to make this a true equation. Example: 1234 +5 -67 -89 = 100. Of course, this is the wrong answer. What is the correct answer? And... Is there a logical way to solve this, or is it just trial and error? |
#2
|
|||
|
|||
Re: Number Puzzle
Answer in white:
<font color="white"> 123-45-67+89 Took me about thirty seconds and three tries with Excel. I immediately knew that the numbers would have to be distributed fairly evenly, most likely with a three digit number and three two-digit numbers (any four digit addend would make the result obviously impossible). I also quickly figured out that 123 would have to be the three digit number, because anything higher than that would produce far too high of a result, then just trial-and-errored where the plus should go.</font> This was just heuristical, not logical reasoning. I think I'd be in a lot of trouble with a larger array of numbers. I wouldn't know how to go about solving this type of problem logically. |
#3
|
|||
|
|||
Re: Number Puzzle
A starting point is to observe that the last digit is zero. This rather tightly constrains the possible places to put the + and - signs... you need to select four digits, such that the two "plus" digits and the two "minus" digits either have the same sum or differ by 10. Further, the smallest digit must be in the "plus" pair, and 9 must be one of the digits. We also can exclude any case with a 4-digit number, since this can only be counterbalanced by two 3-digit numbers, leaving no fourth number at all.
So, two cases: either 9 is in the plus pair, or the minus pair. +1+9 can go with [-2-8, -3-7, or] -4-6. +2+9 can go with [-3-8,] -4-7 or -5-6. +3+9 can go with [-4-8 or] -5-7. [+4+9 can go with -5-8 or -6-7.] [+5+9 can go with -6-8, and +6+9 with -7-8.] +1-9 can go with [-2+8 / +2-8, -3+7 / +3-7, or] -4+6 / +4-6. +2-9 can go with [38, ] -4+7 / +4-7, or -5+6/+5-6. +3-9 can go with [48 or] -5+7 / -7+5. That already has us down to only 13 of the 168 naive possibilities. If we had a string of 20 digits, this type of reasoning would still get you down to a couple dozen test cases from among thousands of naive possibilities. |
#4
|
|||
|
|||
Re: Number Puzzle
[ QUOTE ]
Is there a logical way to solve this, or is it just trial and error? [/ QUOTE ] Ok, I'll try to give a logical explanation: 1) There is no 4-digit number involved Since you need to use 3 signs(+,-,-), you can't use 2 4-digit numbers. If you use 1 4-digit number, you can't use 2 3-digit numbers (only 5 digits remaining). Since the minimum 4-digit number is 1234 and 1234-100=1134 >>> the maximum combination of the remaining 5 digits, we're done with this case. 2) Now I have 3 cases 2a) First number is 1 2b) First number is 12 2c) First number is 123 2a) You need +,-,- so that 23456789 = 99 You need exactly 2 3-digit numbers, lets call them A and B, and C to the 2-digit, so A and B must be different sign, but the minimum /A-B/ > 300 >> C+99 2b) You need +,-,- so that 3456789 = 88 You need at least one 3-digit number, if 2 3-digit numbers, same argument as 2a /A-B/>300, if only one 3-digit 345 > 67+89+88 2c) You need +,-,- so that 456789 + 23 = 0 You can't have a 3-digit since 456>>7+89+23 So, your only chance is to have 3 2-digit numbers 45,67,89. Any 2 of them the sum is greater than 100, so your only choice is to take the 89 with the 23 and since 45+67=89+23 this completes the problem and proves there is a unique solution. |
|
|