How can I create an expression that uses numbers 1 - 7 to equal 100? Sorry to post what is probably a very pedestrian question here (it's actually from my son's homework; he's eight), but it's driving us crazy and I really want to know how I'm meant to approach it.
We need to write an expression that uses the numbers 1, 2, 3, 4, 5, 6 and 7, in that order, to give an answer of 100. We can use multiplication, division, addition and subtraction operators, and brackets.
Is there a technique here or is brute force the correct approach. I'm a software developer and I can't even work out how to write a program to solve this.
 A: Another way:
$$-1\cdot 2-3+(4+5+6)\cdot 7$$
A: Let's try something a little simpler.
The first step is to get a feel for things. What happens if we add up all the numbers 1+2+...+7? We get 28, which is too small. How do we get a bigger number? Subtracting or dividing will just make it smaller. So we have to multiply. We need it about 4 times bigger (3 x 28 = 84, 4 x 28 = 112). Well that is a bit misleading because the 4 will not be multiplying itself, it is more like 4*24. But let's get on and try 4.
There are two obvious ways of getting multiplication by 4. The first is (1+2+3) 4+5+6+7=42 - too small. [Bother cannot figure out how to turn off the italics!] The other is (1+2+3)+4(5+6+7) = 78. Still too small. So this is slightly trickier than it looks. 
If we go to 5*(6+7) it will be too big. 
Pause. 6*7=42. And (3*4*5)=60. So that would get us close. To 102 in fact. Could we get the -2 from the 1,2,3? That bit I leave to you.
But you may still complain that I pulled 6*7 and 3*4*5 out of thin air. Well, not completely. My thought process was as follows:
I need something bigger. 6*7=42. Oh, but then 3*4*5=60. 
That does not look like a particularly logical progression. It isn't logical, but it is natural. 6,7 just shrieks 42. That is hardwired into my brain. 3,4,5 certainly whispers 60, maybe even speaks it. 
There are for me two lessons from this. (1) you need to rote learn things. No progress is possible until your brain is stocked with useful facts. They have to be in your brain. Because you need really fast retrieval. If you have to mess around working out 6*7=42, it is much harder. (2) You need some organised playing around. By far the best books on that are the old Polya ones. An 8 year old could probably cope with his short book.
A: If you want a general solution you can just bruteforce it. My naive approach was to print out all possible strings and eval them.
I've put up the source code to do this and like tasks at my Github repository: https://github.com/cairo140/operations
I had to invent a notationally odd superplus and superminus. Basically, x.superplus(y) is equivalent to (x+y) so that 1*2.superplus(3)*4 is 1*(2+3)*4. I believe that between allowing a - to be put ahead of the leading 1 and using superplus and superminus, you can account for all possible permutations ordinarily available through parentheses. I haven't convinced myself of this fact yet, but counterexamples are welcome.
These are all the possible solutions to get 100. Both the examples posted at this time are included in the result set. At the moment, unfortunately there can be redundant solutions.
100=-1+2.superplus(3)*4*5-6+7
100=1+2.superplus(3)*4*5+6-7
100=-1*2+3*4*5+6*7 # did's solution
100=-1+2*3*4+5.superplus(6)*7
100=-1*2-3+4.superplus(5).superplus(6)*7
100=1-2*3+4.superplus(5).superplus(6)*7
100=-1*2.superplus(3)+4.superplus(5).superplus(6)*7 # Argon's solution
100=1*2.superplus(3)*4*5+6/7
100=1*2.superplus(3)*4*5-6/7
100=1+2.superplus(3)*4*5+6.superminus(7)
100=-1+2.superplus(3)*4*5-6.superminus(7)
100=-1*2.superplus(3)*4*5*6.superminus(7)
100=-1*2.superplus(3)*4*5/6.superminus(7)

Some other examples (e.g., at least one way to use 1 2 3 4 5 6 7 to get each number up to 100) are available at the Github repository.
A: The answer to this question is as follows, 1+2+34+56+7=100. We have now used all of the numbers required to equal 100.
A: $$-1\cdot2+3\cdot4\cdot5+6\cdot7$$
There is no general method that I am aware of.
A: This explanation is perfect. I think the teacher's objective behind giving the question at eight year old level must have been to make them think this way. The fact $6 \times 7 = 42$ should immediately hit you. That is when you will be able to like .. well, I need one or more products that add or subtract close to $100$, and I need the rest of the numbers to make up the difference.
Beautiful exercise in thinking.
