A 3rd grade math problem: fill in blanks with numbers to obtain a valid equation Even though this is a 3rd-grade math problem, people found it extremely hard. Any people have a solution, or algorithm is welcome. I'll try make a program base on the algorithm and see if it's correct. And, people are welcome to provide the best solution (least loop, recursion)
Enough said, here's the original: Fill in the blank the number from 1-9 to complete the equation. (probably distinct numbers each blank)

PS: Help me with tags. I'm not sure which tags should I use.
EDIT 1: After a few shortened, here's what I've got:
a + d - f + 12*e + 13*b/c + g*h/j = 87.

So, as you see, the priority does matter.
EDIT 2: Maybe my description is not clear enough, but I think it require to use every number 
Like this: an array from [1:9], each fill in the blank remove one component.
As Martigan point out, it's like: fill in the blanks using once and only once each number from 1 to 9. Simple math here: There are 9*8*7*6*5*4*3*2 = 362880 possibilitities. (You may correct this simple math if I'm wrong).
And b mod c should = 0 (as only integers appear.)
EDIT 3: I just asked my mom (who's an elementary teacher). She's confirmed that 3rd grade has studied about mathematic priority, so sorry Hagen von Eitzen. Your answer is half right, she'd give you an 7/10.
PS2: People, please share your wisdom and provide the math algorithm.
Sorry for my bad English. 
 A: There is 1 equation and 9 unknowns, the problem is we have an underdetermined system: http://en.wikipedia.org/wiki/Underdetermined_system.
The only relationship we know (in the typical phrasing of the question) is that they all belong to the set [1...9] and are mutually exclusive. While all solutions can be found using brute force (with a program), I don't believe there is a mathematical way to prove or derive the existence of any solutions since the placement of any number impacts the choices for the remaining numbers and the information is too limited. We know without brute forcing that the system has at most a limited number of solutions. We know from running programs (only after the fact) that the puzzle is consistent and has solutions.
a + d - f + 12*e + 13*b/c + g*h/j = 87
The values of a and d are interchangeable, as are g and h. It does not help us with the problem, but it does show that if at least 1 solution exists, then more than 1 solution must exist; specifically, if you find 1 it has 4 variants since some of the math is commutative. 
