# Add parentheses to make this true

Add parentheses to the following to make a true equation:

$10-9\times8-7\times6-5\times4-3\times2-2\times1=1$

• As the OP stated in one of the deleted comments...the source of this is: imgur.com/a/24nJE. But one typo made the puzzle way better (at least not trivial). It's from a 4th grade math book. In case you are wondering what the other 2 problems on the image mean, I cannot make out the first one completely. But the second one says "It's Michael's birthday. He meets with 12 of his friends and each one shakes hands with each other. How many handshakes are in total?" – Marius May 16 '17 at 15:08
• Are we allowed to turn a minus sign into a negative sign? For example, turn 6-5*4 into 6(-5*4)? – Mat May 16 '17 at 18:33
• Also, one might turn 10... into 1(0... – user1502 May 17 '17 at 1:57
• I found another online source of the original document that shows the entire page. The first problem reads, in full, "Pe terenul de joacă sunt de 5 ori mai multe fete decât băieți. Câți copii sunt pe teren?" which Google translate tells me is Romanian for "On the playground there are 5 times more girls than boys. How many children are on the field?", which is also unanswerable. – shoover May 17 '17 at 4:15
• @Mat No, because all mathematical signs are * or -. In 6(-5*4) you are adding new * sign between 6 and the ( which is obviously not allowed. We need to add only brackets. – Marin Takanov May 18 '17 at 12:32

No matter how you place the parentheses, the result will never be 1, because it is always even.

How I found the solution:

Let's take a look at the equation mod 2:
$0+1\times0+1\times0+1\times0+1\times0+0\times1=1$
We start with $0\times1=1$ which is clearly false. Then either $1\times$ or $0+$ is added to the left of the equation. Both of these will never modify the expression to their right, no matter when they are executed.
This means we can continue this chain as often as we like and the result will always stay even.

• The proof fails, since overlooks things like (0+0)*1. Also more exotic placements. – user1502 May 17 '17 at 1:55
• Agreed that the proof is not nearly rigorous enough. But I believe the conclusion holds, even if the proof is sketchy. – ffao May 17 '17 at 1:58
• @Hurkyl I think the proof works fine, just badly explained. A 0+ or 1* does not change the parity of the term/factor on the right, regardless of whether that term/factor is a bracketed expression or a single number. There cannot be a bracket between the two characters of 0+ or 1*. However the brackets are located, you can remove occurrences of 0+ or 1* since they don't matter, and remove unnecessary brackets, and you will end up with 0*1, the last term of the unbracketed expression. e.g. (0+0)*1 = (0)*1 = 0*1. This version of the proof is in opposite direction to the above. – Jaap Scherphuis May 17 '17 at 4:24
• Addendum: The proof does not allow for the loopholes that Mat and Hurkyl pointed out in comments on the main post: inserting a bracket between a number and a minus sign (e.g turning 6-5*4 into 6(-5*4) ) or in between digits (i.e. turning 10... into 1(0... ). – Jaap Scherphuis May 17 '17 at 4:56
• @JaapScherphuis Splitting the digits of 10 just turns the 10- to a 1*0- for which the proof still holds. The other one switches a 0-1*0 to a 0*1*0 which can indeed change parity, but only from odd to even. So even without those restrictions, there won't be any solution. – w l May 17 '17 at 6:33

To take things from a literal computational perspective:

$10-9\times8-7\times6-5\times4-3\times2-2\times(1=1)$
Because $(1=1) == true$ in many languages such as Wolfram Alpha
http://www.wolframalpha.com/input/?i=10-9*8-7*6-5*4-3*2-2*(1%3D1)

Important to note that truthy values can be very lenient:

So $-2 \times true - 130$ still evaluates to $true$ (in fact any value $\ne 0$ would)
So this is "True" in the computational sense rather than the mathematical sense

• An interesting idea - but = != == – Shadow May 17 '17 at 4:54
• Yeah, as a programmer that was annoying me, but many languages of a symbolic processing / computational algebra nature do indeed interpret = as == (hence the wolfram alpha reference) @shadow, even though it makes my head hurt hahah – Liam Daly May 17 '17 at 4:57
• SQL does it too :( – Shadow May 17 '17 at 5:21

Since w l's proof doesn't really work, I used a simple python program to iterate through all possible placements, and the answer is:

There is no solution

And the program is a simple recursion:

import itertools

def recurse(part):
res = set()
for i in range(1, len(part), 2):
left = part[:i]
right = part[i + 1:]
left = recurse(left) if len(left) > 1 else left
right = recurse(right) if len(right) > 1 else right
for x, y in itertools.product(left, right):
res.add(x - y if part[i] == '-' else x * y)
return res

1 in recurse([10, '-', 9, '*', 8, '-', 7, '*', 6, '-', 5, '*', 4, '-', 3, '*', 2, '-', 2, '*', 1])


To verify that it works without the typo, you can run:

1 in recurse([10, '-', 9, '*', 8, '-', 7, '*', 6, '-', 5, '*', 4, '-', 3, '*', 2, '-', 1])

• What exactly does not work in my proof? The explanation might not be perfect, but the basic idea works. Your program could also easily verify that all results are even. – w l May 17 '17 at 5:52
• Does your program include multiple encapsulation? Something in the vein of ((8-7)*6-5)*4? Having multiple brackets in a row, differently put? – Weckar E. May 18 '17 at 10:56
• @WeckarE. Yes it includes all possible placements. You can check that the # of solutions if not using a set are the Catalan numbers. – simonzack May 18 '17 at 21:35
• @wl I guess you're right it could be made to work using mod 2 and some argument. – simonzack May 18 '17 at 21:36

That's the best I have so far.

Since there is no base specified, until I find an other solution, I'm going to use the loophole of computing everything in base 11.
$10-(9\times8-7\times6-5\times4-3\times(2-2\times1))_{11}$ =
$11-(9\times8-7\times6-5\times4-3\times(2-2\times1))_{10}$ =
$11 - (72 - 42 - 20 - 0)$ =
$11 - 10 = 1$

• I think you forgot to switch base – Anon May 16 '17 at 13:20

I was wondering if the transformation of

$10-9\times8-7\times6-5\times4-3\times2-2\times1 = 1$
into
$10-9\times8-7\times6-5\times4-3\times2-2\times1 - 1 = 0$ is acceptable

Because if so, the answer could be

$1(0(-9\times8-7\times6-5\times4-3\times2-2\times1)(-1)) = 0$

Easy, this is true for

$x=\frac9{142}$, without any parentheses at all.

Explanation:

$10−9\times8−7\times6−5\times4−3\times2−2\times1=1$
is the same as $10 - 9x8 - 7x6-5x4-3x2-2x1 = 1$
which is the same as $10 - 142x = 1$,
which is true for $x = 9/142$. See it on Wolfram Alpha!

Of course,

this only works if you treat the $\times$ sign as an actual $x$, and not as a multiplication...

• How can you put a variable x anywhere in the equation and not everywhere? Basically, you are replacing * with * x * – Techidiot May 18 '17 at 15:27
• The trick is that I am treating the symbol x not as a multiplication sign, but as a variable, which itself is multiplied to the surrounding numbers. – Philipp May 18 '17 at 15:29
• But, you still have the multiplication sign right? So, you are not replacing multiplication, but adding a variable right? – Techidiot May 18 '17 at 15:34
• I can see why this is misleading. @GentlePurpleRain edited my answer, so that now the main point is lost. I will revert it. – Philipp May 18 '17 at 15:43
• I made another edit, which I think makes it more clear. If you don't like it, feel free to revert. – GentlePurpleRain May 18 '17 at 15:49

I found all 16 797 possible solutions, but none of them are equal to 1.

Since pastebin doesn't allowed me to add all answers in one bin, I had to split them in two bins.
The first 8000 - https://pastebin.com/YE0FqQpm
The rest 8797 - https://pastebin.com/GuVvv1QF

I'll give another solution, related to the answer given by Marcus

Using base 15.
$(10-(9\times8-7\times6-(5\times4-3\times2)-2\times1))_{15}$ =
$(10-(4\text{C}-2\text{C}-(15-6)-2))_{15}$ =
$(10-(20-\text{E}-2))_{15}$ =
$(10-(11 - 2))_{15}$ =
$(10-\text{E})_{15}$ =
$1_{15}$

1 (0-9×8-7×6-5×4-3×(2-2))×1=1

Never specified whether I can break up numbers

• Your parentheses are not balanced and the result is 0, not 1. – w l May 18 '17 at 13:35
• Fixed it (I think I did) – preston May 18 '17 at 14:31
• Your latest version amounts to "1 * (0-9*8-7*6-5*4-3*(2-2)) * 1" which equals $-134$. Are you actually evaluating the answers you're posting? – Rubio May 18 '17 at 16:36
• I am not good at this – preston May 18 '17 at 16:39
• If you're not sure what you are doing, you don't have to leave a new answer. – n_plum May 18 '17 at 21:39

After focusing a while, I think I have found the answer.
According to me the parenthesis would be added in following sequence:

(10-9) * (8-7) * (6-5) * (4-3) * (2-1)=1
As
1) 10-9=1:- (1) * (8-7) * (6-5) * (4-3) * (2-1)=1
2) 8-7=1:- (1) * (1) * (6-5) * (4-3) * (2-1)=1
3) 6-5=1:- (1) * (1) * (1) * (4-3) * (2-1)=1
4) 4-3=1:- (1) * (1) * (1) * (1) * (2-1)=1
5) 2-1=1:- (1) * (1) * (1) * (1) * (1)=1

Hence,

1 * 1 * 1 * 1 * 1=1

• There are two 2s in the original problem, not just one. – Jaap Scherphuis May 16 '17 at 15:41
• Oops i didn't noticed that thanx @JaapScherphuis for letting me know – nAutAxH AhmAd May 16 '17 at 15:44

It would look something like the following (see explanation because the last couple of steps depend on pen and paper)

([(10-9*8-7*6-5*4-3)*(2-2)]) * (1)=1

Reasoning:

1) Put a parenthesis around (2-2) so it becomes zero and zeros out everything to it's left.

2) So you have this without the final pairs of parenthesis:
0*1=1

3) Draw the final pairs of parentheses so they intersect with the multiplication sign's bottom four points, leaving a straight line
(0)*(1) = 1

4) Which, without the parentheses, is
0 | 1 = 1

5) Since "|" is the bitwise OR and 1 normally represents TRUE, this is a true expression

• Can you explain the "devolves to" part? – Deusovi May 17 '17 at 1:51
• @Deusovi when the parentheses drop away, that's what you've got left. – Dark Matter May 17 '17 at 1:55
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}