Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Given the sequence 123456789:

You can insert three operations ($+$,$-$,$\times$,$/$) into this sequence to make the equation = 100.

My question is: is there a way to solve this without brute force?

(I tried to represent it as a graph but I'm unsure where to go from there.)

share|cite|improve this question
With brute force: $123-45-67+89 = 100$ and no other solutions. – Mikko Korhonen Jan 16 '12 at 20:08
Right, but my question isn't so much what is the solution as much as what is the process. – sdasdadas Jan 16 '12 at 20:11
It might be a good starting point. Are we allowed to use parantheses or should we just go with standard order of operations? – Mikko Korhonen Jan 16 '12 at 22:06
Standard order will probably be easier so that's completely fine. – sdasdadas Jan 16 '12 at 23:04
Reasonable heuristics will help. You will have at least one three digit number and unless you have a second the others will be two digits. 123 is the only three digit number that is close, which forces the rest to be 45, 67, 89. Then divide and multiply are out. You need two minus and one plus to have any hope. Now brute force the three possibilities. – Ross Millikan Jan 17 '12 at 3:09
up vote 11 down vote accepted

The strategy I would use is the following:

Goal is to get $100$ as sum. Among the digits $123456789$, pick and choose the sum close to $100$, such as $89$. Therefore I would attempt to get a value of $11$ from $1234567$ using different combinations.

When you start working on a smaller sum now (sort of like divide and conquer), you may get the desired result. (Of course there is no specific algorithm).

In order to get $11$, I have

$$(1\times 23)-4+5-6-7 = 11$$

$$(1-2+3-4+5)\times 6 -7= 11$$

$$123-45-67 = 11$$


$$(1\times 23)-4+5-6-7+89 = 100$$

$$(1-2+3-4+5)\times 6 - 7+89=100$$


${\bf{Adding}}$ ${\bf{more}}$ to it: If we look at $78+9 = 87$ and instead of $89$, we seek the remaining $13$ to be derived from $123456$, and one way to get that is




share|cite|improve this answer

protected by Asaf Karagila May 29 '15 at 11:03

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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