Mathematical Thinking Solves an Operation Puzzle (Or Not)

(Archive problem of the week)

Having just written about sequence puzzles, which sometimes can be solved mathematically, and sometimes are just psychological tests, I want to show a different kind of puzzle that I ran across while searching for those. At first, it looks like mere guess-and-check; then we find it can be solved easily by mathematical reasoning; and then we look again …

Finding a strategy

Here is the question, from an 11-year-old writing in 2003:

Solving Number Sentences: A Strategy

I have been given a list of numbers without any plus or minus signs and I have to place the signs between the digits. Here are a few problems:

1  9  8  6  3  5  1  =  6
3  5  3  2  4  1  5  =  2
5  5  1  1  3  4  8  =  18

I can't figure out which sign goes where.

As we often do, I left the specific problems for Melissa to do, and made up my own to demonstrate with:

Hi, Melissa.

This may be meant as a way to make you practice adding and subtracting over and over until you find the answer. But if you step back and think about how numbers work, there is a nice little trick that can save a lot of time.

Let's take a slightly smaller example. Suppose we want to combine these numbers to make 4:

4 _ 2 _ 3 _ 7 _ 6 _ 4 = 4

Think about how we add and subtract. If we calculated this, for example,

4 + 2 - 3 + 7 - 6 + 4 = 8

we would be adding 4, 2, 7, and 4, and subtracting 3 and 6. It turns out that it doesn't matter what order you do that in; I actually calculated it as

4 + 2 + 7 + 4 - 3 - 6 = 8

doing all the subtractions last. And in fact, subtracting 3 and then 6 is the same as just adding 3+6 and subtracting that:

(4 + 2 + 7 + 4) - (3 + 6) = 8

So any combination of addition and subtraction really amounts to subtracting the sum of some of the numbers from the sum of the others.

Many students have seen this way of doing a list of additions and subtractions: Add the positives, add the negatives (that is, the numbers being subtracted), and then find the difference. This is useful particularly because subtraction is harder and more error-prone (when done mentally), and this way it is needed only once. But this idea becomes even more useful for this kind of problem:

Now, let's look at our numbers. The sum of ALL of them is

4 + 2 + 3 + 7 + 6 + 4 = 26

So we want to find a pair of numbers whose sum is 26 and whose difference is our goal, 4. There are several ways to do that; I'll let you think about how you might do it. (I have a great trick for that, too!) But the answer is that 15 + 11 = 26 and 15 - 11 = 4. So all we have to do is to find a group of numbers from this set that add up to 15, and then subtract the rest of them.

I see that 4 + 2 + 3 + 6 = 15; or, working from the middle, 7 + 4 + 4 = 15. So that gives me two answers (and there might be more):

4 + 2 + 3 - 7 + 6 - 4 = 4

4 - 2 - 3 + 7 - 6 + 4 = 4

See if you can solve your puzzles a little more easily this way. It does take a lot of thinking to invent the trick, or to understand it, but once you see it, you can solve these puzzles almost immediately. That's a good example of how thinking mathematically can save work: I've done all the work up front in finding a method, and now I can solve lots of similar puzzles without having to do a lot of trial and error!

I didn’t specify the “trick” I had to find the pair of numbers (in this case, 15 and 11); I wanted Melissa to have a chance to do some mathematical thinking of her own. A slightly different approach to the problem makes it very easy to explain. This is a form of the ancient method of “false position”, where we first make a mere guess (often an extreme one), and then think about what has to be changed to reach our goal.

We see that if we take all the signs to be positive, we get 4 + 2 + 3 + 7 + 6 + 4 = 26. We need to change some signs to reduce that to 4. If we change one sign, such as on the 2, it is as if we first subtracted the 2 (making it + 0), and then subtracted it again (making – 2). So changing one sign subtracts twice that number from the total.

How much do we need to subtract? 26 – 4 = 22. So we have to change the signs on some numbers that add up to 11, which will decrease the sum by 22. The way this problem is stated, we can’t change the sign on the first number, 4; but we can change 2, 3, and 6; or 7 and 4. (By going through all possibilities in an orderly way, we can be sure that, in fact, those are the only solutions. The problem didn’t say to find all the solutions; that’s a mathematician’s habit.)

Special cases

But it would be irresponsible to only show my own example; I often find that after doing a typical example, it turns out that the given problem is in some way atypical, and that is why the student asked about it. (We ask them to show their work and explain where they are having trouble, but they can’t really do that for a puzzle like this.)

Now, I just looked back at your actual problems, and found that there is an extra trick to them. Some problems can't be solved, and trial and error is completely wasted on them. When you use a method like mine, you can quickly see whether the problem can be solved or not. And once you realize that some problems of this type have no solutions, then you look for a quick test that will tell you which can and which can't. There is such a test in this case. And that is an even bigger advantage to thinking mathematically: you not only save work in solving a problem, but you can avoid doing _any_ work on a problem that can't be done!

So look for a reason why some of these might not have solutions.

Again, I left it to Melissa to find that quick test. It turns out that the three problems she gave us are all unsolvable! Probably she had solved several others, but these were the ones she had trouble with. She never wrote back to let us know whether she had discovered this, or found the quick test.

Three years later, a tutor, looking for interesting problems to give a student in Africa, wrote to us (unarchived), complaining about this problem:

... It was far too difficult because there was no way to solve it.

In a spreadsheet I have put all the 128 possibilities. I can send you this simple spreadsheet if you want. Not one of them resulted in a 6.

The range of possible outcomes consisted of all the odd numbers from 1 to 33 (and their negatives of course if you switch + and -).

Anyway, the example given by Melissa is wrong.

Was the problem “wrong”? Or might the discovery that it can’t be solved be, in fact, a sort of solution? I responded:

I wonder whether you read the entire answer. Toward the bottom I pointed out that "some" of the problems Melissa gave had no answers, so it is no surprise that you didn't find one in that case. But I suggested a strategy that makes it possible to determine, with very little work, whether such a problem can be solved. You don't need to make a spreadsheet. Interestingly, in this case "unsolvable" is actually not "difficult" (for someone with sufficient background), because it can easily be shown to be impossible, saving all that work.

The key I mentioned is that if the sum of the given numbers is odd, it is impossible to get an even result no matter how you arrange + and - operations. Since 1+9+8+6+3+5+1=33, there is no way to split the numbers into two groups that are both even or both odd.

Since, in fact, all three of the submitted problems are unsolvable, my suspicion was, and is, that they were meant to lead her to this discovery. So in that sense, while they are probably unsuitable for your intended use, I think they are perfectly good problems!

Revealing the trick

The following year, a mother wrote to say that her five-year-old daughter loved these problems, but she couldn’t figure out my trick for deciding when they couldn’t be solved. I wrote back with more information:

When I tried actually solving Melissa's own problems rather than my example, I realized that they all fail a simple test. Here they are:

1  9  8  6  3  5  1  =  6
3  5  3  2  4  1  5  =  2
5  5  1  1  3  4  8  =  18

Look back at my method, which was to try to divide the numbers into two groups whose sum is the sum of the numbers, and whose difference is the desired value. So what is the sum in each case?

sum  difference
33      6
23      2
27     18

In each case, the sum is odd and the difference is even. But that is impossible! One way to see that is to take a sum and turn it into a difference; here's the example I gave:

15 + 11 = 26
15 - 11 = 4

In changing + 11 into - 11, I subtracted 11 twice (once by taking out the +11 term, and again by adding in a -11 term); so the difference between the sum and the difference was 22, which is even, and this always has to be true. So if the sum is even, the difference must also be even, and if the sum is odd, the difference must also be odd.

In her problems, the sums are odd and the differences are even, which can never happen. So there is no solution.

This can also be approached with algebra, which I avoided in the answer you're referring to. Taking the first of her problems, we want two numbers a and b so that

a + b = 33
a - b = 6

2a = 39

a = 39/2

This is not a whole number, so we can't get it by adding any of the given numbers, and there is no solution.

It sounds like you have a fun challenge on your hands! I don't think I'd tell your daughter either version of this trick, but let her have fun trying these things and see how long it takes her to discover it on her own. If she is familiar with odd and even, there's a good chance she'll notice the pattern and catch on to what's going wrong when a problem has no solution. (Of course, there are other possible reasons a problem might have no solution.)

Please keep in touch -- I'd love to help with any questions she has or hear about discoveries she makes. It may interest you to know that we homeschool my kids, and the oldest (whom I worked with more than I've been able to with the others) is a top student at his university. When he was little I found I couldn't teach him much math; he resisted being told how to do anything, but would go off on his own and figure it out himself (usually finding that my suggestions were right, after all). With kids like that, it just takes a little encouragement and some resources to point him (or her) to. We're happy to be one of those resources.

Let me add one more thing. As I mentioned here, there can be other reasons a puzzle of this type can’t be solved. To give a very simple example, consider the problem 1 _ 2 _ 3 = 4. Here the sum is 6 and the goal is 4, so we need to change the signs of a set of numbers whose sum is (6 – 4)/2 = 1. The only way to do this is to change the sign of the 1; but as the problem is stated, we are not working with signed numbers, but with addition and subtraction of positive numbers. So this one can’t be done.

For another example, consider 1 _ 1 _ 8 _ 9 = 7. We need to change numbers that total (19 – 7)/2 = 6. But it happens that we can’t get any sum between 2 and 8, just because of the particular numbers present; so we can’t solve this one.

There are other situations that might occur as well. It is the fact that all three of Melissa’s problems fail in the same way that suggests this was meant to lead to recognition of my test, and was not an accident.

This site uses Akismet to reduce spam. Learn how your comment data is processed.