# Second Grade Homework Problem - Methodology

Ashamed to admit that I cannot aid my friend's niece with her second grade homework problem. So much for that college education, eh? Here's the problem.

Using only the natural numbers 1 through 9 without repeating any of them (natural because there cannot occur any rationals anywhere in this process, i.e. the first number cannot be prime, since otherwise there would be a fraction after the first operation), place the numbers in the boxes so that the following statement is true.

$\square \div \square \times \square + \square \times \square \times \square \div \square + \square \times \square = 100$

I am aware that I can use brute force to work this problem out, but this is going to be tedious at best, and might require a computer at worst. Furthermore, the problem doesn't specify anything about using the order of operations. On one hand, that would make sense, but on the other, this is a second grade problem in an American school, and I know that order of operations wasn't on my second grade curriculum.

In either case, does anyone know how to approach this in a somewhat elegant way? (Also apologies over tagging, someone please retag this appropriately if they think it isn't).

• Sorry if that wasn't clear, there can be no rational numbers at ANY point in this process. Jan 14, 2015 at 5:14
• This is largely an exploratory problem. There are hundreds of different solutions to the problem. A bit of experimentation, especially when building familiarity with numbers, their sizes, and the four basic arithmetic operations, can greatly facilitate learning. It's also good to learn early that math isn't all pure algorithm, known, but is largely an open playground. Jan 14, 2015 at 5:20
• Right, but I've been exploring for over an hour now, and I don't have anything yet. I don't see a way to proceed beyond limiting the guesswork by making observations as in the answer below. Jan 14, 2015 at 5:57
• 1) Natural numbers are rational numbers. What you mean is that they cannot be fractions which cannot be reduced to natural numbers. 2) It is false that hypothetically the first number could not be prime. What if the second number is 1? Jul 1, 2019 at 20:24

I do have a suggestion for an algorithm that would reduce the cases to try. If I understand correctly that there isn't an operator precedence, but all operations are simply done left to right, then last thing you do is a multiplication. But $100 = 2 \times 2 \times 5 \times 5$. So the last box can only be 1, 2, 4 or 5. And so forth (handwaving!), i.e. use backtracking. But it's better than brute force for sure.

Ok, here are a few steps...

Assume $x_9 = 5$, for the last unknown (which is highest available value given what I said above about the factorization of 100). Then you want $y_8 = 20$, where $y_8$ is the result of all operations up to $x_8$, inclusively. So assume $x_8 = 9$ (again, the highest available value). Now you want $y_7 = 11$. This is where it gets a bit more "intuitive", or rather where you can eliminate some more candidates. You want a quotient of $11 = y_6 / x_7$. Note that you have 3 numbers that you need to multiply to produce $y_6$. So it needs at least three different factors in its factorization including 1. And two of these factors have to be single-digit. What could work? $22/2$, $33/3$? No! Because $22/2$ has already "used up" 2 for the division, so now you can't have it as $11 \times 2 \times 1$ because 2 would be duplicated. Likewise for $33/3$. So let's go for $44/4$, i.e. set $x_7$ to 4. Since $44=22 \times 2\times 1$, set $x_6 = 2$ and set $x_5 = 1$. Now $y_4=22$. Since 9 is used up, set $x_4=8$ so $y_3=22-8=14$. Then set $x_3=7$ as the next available number. All you need now is $y_2=14/7=2$. And luckily we can get that with the two numbers left, 6 and 3 by their division.

This is not entirely computer-driven backtracking, but close enough I hope (for one paragraph that I had the patience to write). So whoever downvoted this answer better explain yourself now why you did that.

N.B. I have "cheated" a little bit above, in that I actually forgot when I got to the quotient business that until there I had picked the default value (i.e. when I have no immediate clue what to choose) as the highest available digit. For the quotient I used the lowest and got to a solution. So what happens if I use the highest? Neither $88/8$ nor $77/7$ lead to a solution, although showing this is more involved for $88/8$ (there are several branches to backtrack from), but for $77/7$ it is as easy as it was for $22/2$ or $33/3$. So next try $66/6$. This ultimately leads to a solution but you have more cases to try as $33 \times 2 \times 1$ does not yield a solution, but $22 \times 3 \times 1$ does so again because 8 is free and so is 7, yielding $(22-8)/7=2$ and we've used up 6 and 3 this time, but 4 and 2 are available and their quotient is again 2.

So here you have two solutions obtained this way.

Looking at the other answer, its computer-generated list does show that there are no solutions for the last digit set to 1 (but there are some for 2). I can't think off the top of my head how to quickly eliminate the last-digit-1 branch, so if you instead start by using the lowest available digit as the default value, you'll probably be in a world of frustration for quite a while. There are also only two solution for the last digit 2, while the rest of 30 solutions are for 4 or 5 as last digit. So maybe there is some room for rational improvement to my method... like somehow inferring that 4 or 5 as last digit could/would yield a lot more solutions than 1 or 2 do, but I can't say right now how to infer that without actually trying-cases/backtracking; a proof of that without using backtracking might involve Ramsey theory... which would obviously be way inaccessible for the 2nd grade.

• Whoever downvoted me here better put up a hand-crafted solution that doesn't rely on this idea. Jan 14, 2015 at 7:01

Assuming that the usual order of operations is to be ignored, there are precisely 32 solutions to your problem in which fractions do not appear in any intermediate step. Unfortunately, I have no idea how one might arrive at such a solution by hand; I produced these with an exhaustive computer search.

$$4\div2\times7+8\times1\times3\div6+9\times5=100$$ $$4\div2\times7+8\times3\times1\div6+9\times5=100$$ $$4\div2\times9+8\times1\times3\div6+7\times5=100$$ $$4\div2\times9+8\times3\times1\div6+7\times5=100$$ $$6\div2\times3+5\times1\times8\div7+9\times4=100$$ $$6\div2\times3+5\times8\times1\div7+9\times4=100$$ $$6\div2\times9+7\times1\times4\div8+3\times5=100$$ $$6\div2\times9+7\times4\times1\div8+3\times5=100$$ $$6\div3\times1+5\times2\times8\div7+9\times4=100$$ $$6\div3\times1+5\times8\times2\div7+9\times4=100$$ $$6\div3\times1+7\times2\times8\div9+4\times5=100$$ $$6\div3\times1+7\times8\times2\div9+4\times5=100$$ $$6\div3\times7+8\times1\times2\div4+9\times5=100$$ $$6\div3\times7+8\times2\times1\div4+9\times5=100$$ $$6\div3\times9+8\times1\times2\div4+7\times5=100$$ $$6\div3\times9+8\times2\times1\div4+7\times5=100$$ $$8\div2\times1+5\times3\times6\div9+7\times4=100$$ $$8\div2\times1+5\times6\times3\div9+7\times4=100$$ $$8\div2\times7+5\times1\times6\div9+3\times4=100$$ $$8\div2\times7+5\times6\times1\div9+3\times4=100$$ $$8\div4\times1+7\times3\times6\div9+2\times5=100$$ $$8\div4\times1+7\times6\times3\div9+2\times5=100$$ $$8\div4\times9+3\times1\times6\div7+2\times5=100$$ $$8\div4\times9+3\times6\times1\div7+2\times5=100$$ $$9\div3\times1+4\times2\times6\div7+8\times5=100$$ $$9\div3\times1+4\times6\times2\div7+8\times5=100$$ $$9\div3\times4+2\times1\times6\div7+8\times5=100$$ $$9\div3\times4+2\times6\times1\div7+8\times5=100$$ $$9\div3\times5+7\times1\times8\div4+6\times2=100$$ $$9\div3\times5+7\times8\times1\div4+6\times2=100$$ $$9\div3\times6+8\times1\times2\div4+7\times5=100$$ $$9\div3\times6+8\times2\times1\div4+7\times5=100$$

• I can confirm that there are $32$ solutions. Jan 14, 2015 at 6:30
• This is funny, because this is what we found using an excel program. Still don't know how to compute it by hand. Jan 14, 2015 at 6:55
• @AlfredYerger I don't think there is a fundamentally better way to solve this problem than a combination of experimentation and simplifying observations (e.g. Respawned Fluff's answer). Jan 14, 2015 at 7:01
• I can understand that. Going to wait to see. If there is a way to do it, it's probably not accessible to a seven year old anyway. Jan 14, 2015 at 7:05
• No, don't assume that the usual order of operations is to be ignored. Look for only solutions where the order of operations remains intact. Jul 1, 2019 at 20:28

As it is a second grade homework problem, I don't think the problem is stated with the intention to find all solutions.

Note, the problem does not ask to find all solutions. To me it seems more of being a stimulus to play with numbers and fundamental operations in order to increase experience and familiarity with basic arithmetic.

It's more a task to arise interest in playing with numbers, to train not giving up, even when many trials might fail and also to have fun and a good feeling when a solution could finally be found.

Since the solution is not unique there will most probably be different answers which could additionally stimulate discussions how specific solutions were found.