I could probably make a quick script to brute force it, but do you only need the solution? And what's it for? It doesn't look like anything meaningful will come out of those equations or those numbers.
EDIT: Unfortunately it's going to get a bit more complicated when you need every single solution. I'll have to withdraw my offer. I'd still be able to make it but it'd take more time than I can spare.
Comment has been collapsed.
but do you only need the solution
What do you mean?
Gothemasticator answered below 1 possible combination for each, so I'll take the first for example, 0+1+3+4=8 is the same for me as 1+0+3+4=8 or 4+1+0+3=8. It's not every single combinations possible but only those with different numbers (it can be 2 differents or all of them).
Comment has been collapsed.
A+B+C+D=8
0+1+3+4=8
A+B+C+D+E=-7
0+1+3+4+(-15)=-7
A+B+C+D+E=-21
(-8)+8+(-12)+12+(-21)=-21
A+B+C+D+E+F=18
(-8)+8+(-12)+12+17+1=18
Is it more difficult than I am making it? That pool of numbers with it's positive-negative pairs makes this easy.
Comment has been collapsed.
Do you need all the permutations?
I mean 0 + 1 + 3 + 4 = 8 and 4 + 3 + 1 + 0 = 8 should differ or not?
Comment has been collapsed.
That's for A + B + C + D = 8.
-27 + -14 + 20 + 29 = 8
-27 + -2 + 8 + 29 = 8
-27 + -2 + 17 + 20 = 8
-27 + 2 + 4 + 29 = 8
-27 + 3 + 12 + 20 = 8
-27 + 4 + 11 + 20 = 8
-21 + -12 + 12 + 29 = 8
-21 + -8 + 8 + 29 = 8
-21 + -8 + 17 + 20 = 8
-21 + -3 + 3 + 29 = 8
-21 + -3 + 12 + 20 = 8
-21 + -3 + 3 + 29 = 8
-21 + -3 + 12 + 20 = 8
-21 + -2 + 2 + 29 = 8
-21 + -2 + 11 + 20 = 8
-21 + 0 + 12 + 17 = 8
-21 + 1 + 8 + 20 = 8
-21 + 1 + 11 + 17 = 8
-21 + 4 + 8 + 17 = 8
-16 + -16 + 11 + 29 = 8
-16 + -8 + 3 + 29 = 8
-16 + -8 + 12 + 20 = 8
-16 + -7 + 2 + 29 = 8
-16 + -7 + 11 + 20 = 8
-16 + -7 + 2 + 29 = 8
-16 + -7 + 11 + 20 = 8
-16 + -3 + -2 + 29 = 8
-16 + -3 + -2 + 29 = 8
-16 + 0 + 4 + 20 = 8
-16 + 1 + 3 + 20 = 8
-16 + 1 + 11 + 12 = 8
-16 + 3 + 4 + 17 = 8
-16 + 4 + 8 + 12 = 8
-16 + -8 + 3 + 29 = 8
-16 + -8 + 12 + 20 = 8
-16 + -7 + 2 + 29 = 8
-16 + -7 + 11 + 20 = 8
-16 + -7 + 2 + 29 = 8
-16 + -7 + 11 + 20 = 8
-16 + -3 + -2 + 29 = 8
-16 + -3 + -2 + 29 = 8
-16 + 0 + 4 + 20 = 8
-16 + 1 + 3 + 20 = 8
-16 + 1 + 11 + 12 = 8
-16 + 3 + 4 + 17 = 8
-16 + 4 + 8 + 12 = 8
-15 + -14 + 8 + 29 = 8
-15 + -14 + 17 + 20 = 8
-15 + -8 + 2 + 29 = 8
-15 + -8 + 11 + 20 = 8
-15 + -7 + 1 + 29 = 8
-15 + -7 + 1 + 29 = 8
-15 + -3 + -3 + 29 = 8
-15 + -2 + 8 + 17 = 8
-15 + 0 + 3 + 20 = 8
-15 + 0 + 11 + 12 = 8
-15 + 1 + 2 + 20 = 8
-15 + 2 + 4 + 17 = 8
-15 + 3 + 8 + 12 = 8
-15 + 4 + 8 + 11 = 8
-15 + -14 + 8 + 29 = 8
-15 + -14 + 17 + 20 = 8
-15 + -8 + 2 + 29 = 8
-15 + -8 + 11 + 20 = 8
-15 + -7 + 1 + 29 = 8
-15 + -7 + 1 + 29 = 8
-15 + -3 + -3 + 29 = 8
-15 + -2 + 8 + 17 = 8
-15 + 0 + 3 + 20 = 8
-15 + 0 + 11 + 12 = 8
-15 + 1 + 2 + 20 = 8
-15 + 2 + 4 + 17 = 8
-15 + 3 + 8 + 12 = 8
-15 + 4 + 8 + 11 = 8
-14 + -8 + 1 + 29 = 8
-14 + -7 + 0 + 29 = 8
-14 + -7 + 12 + 17 = 8
-14 + -7 + 0 + 29 = 8
-14 + -7 + 12 + 17 = 8
-14 + -3 + 8 + 17 = 8
-14 + -3 + 8 + 17 = 8
-14 + -2 + 4 + 20 = 8
-14 + 0 + 2 + 20 = 8
-14 + 1 + 4 + 17 = 8
-14 + 2 + 3 + 17 = 8
-14 + 2 + 8 + 12 = 8
-14 + 3 + 8 + 11 = 8
-12 + -8 + 8 + 20 = 8
-12 + -8 + 11 + 17 = 8
-12 + -7 + -2 + 29 = 8
-12 + -7 + -2 + 29 = 8
-12 + -3 + 3 + 20 = 8
-12 + -3 + 11 + 12 = 8
-12 + -3 + 3 + 20 = 8
-12 + -3 + 11 + 12 = 8
-12 + -2 + 2 + 20 = 8
-12 + 0 + 3 + 17 = 8
-12 + 0 + 8 + 12 = 8
-12 + 1 + 2 + 17 = 8
-12 + 1 + 8 + 11 = 8
-8 + -7 + 3 + 20 = 8
-8 + -7 + 11 + 12 = 8
-8 + -7 + 3 + 20 = 8
-8 + -7 + 11 + 12 = 8
-8 + -3 + 2 + 17 = 8
-8 + -3 + 8 + 11 = 8
-8 + -3 + 2 + 17 = 8
-8 + -3 + 8 + 11 = 8
-8 + -2 + 1 + 17 = 8
-8 + 0 + 4 + 12 = 8
-8 + 1 + 3 + 12 = 8
-8 + 1 + 4 + 11 = 8
-8 + 2 + 3 + 11 = 8
-7 + -7 + 2 + 20 = 8
-7 + -3 + -2 + 20 = 8
-7 + -3 + 1 + 17 = 8
-7 + -3 + -2 + 20 = 8
-7 + -3 + 1 + 17 = 8
-7 + -2 + 0 + 17 = 8
-7 + 0 + 3 + 12 = 8
-7 + 0 + 4 + 11 = 8
-7 + 1 + 2 + 12 = 8
-7 + 1 + 3 + 11 = 8
-7 + 3 + 4 + 8 = 8
-7 + -3 + -2 + 20 = 8
-7 + -3 + 1 + 17 = 8
-7 + -3 + -2 + 20 = 8
-7 + -3 + 1 + 17 = 8
-7 + -2 + 0 + 17 = 8
-7 + 0 + 3 + 12 = 8
-7 + 0 + 4 + 11 = 8
-7 + 1 + 2 + 12 = 8
-7 + 1 + 3 + 11 = 8
-7 + 3 + 4 + 8 = 8
-3 + -3 + 2 + 12 = 8
-3 + -3 + 3 + 11 = 8
-3 + -2 + 1 + 12 = 8
-3 + -2 + 2 + 11 = 8
-3 + 0 + 3 + 8 = 8
-3 + 1 + 2 + 8 = 8
-3 + -2 + 1 + 12 = 8
-3 + -2 + 2 + 11 = 8
-3 + 0 + 3 + 8 = 8
-3 + 1 + 2 + 8 = 8
-2 + 0 + 2 + 8 = 8
0 + 1 + 3 + 4 = 8
Comment has been collapsed.
A + B + C + D + E = -7 -> https://pastebin.com/GspcU5ke
A + B + C + D + E = -21 -> https://pastebin.com/dQ2JdKV0
A + B + C + D + E + F = -18 -> https://pastebin.com/hXzUErmf
Comment has been collapsed.
24 Comments - Last post 10 minutes ago by Mondongo98
124 Comments - Last post 14 minutes ago by SeaGoblin
17 Comments - Last post 1 hour ago by Kappaking
28 Comments - Last post 1 hour ago by Happyleaf
99 Comments - Last post 3 hours ago by thephilosopher555
2,528 Comments - Last post 4 hours ago by js93583
13 Comments - Last post 5 hours ago by WastedYears
57 Comments - Last post 1 minute ago by Noodles91
4,791 Comments - Last post 3 minutes ago by Daimao666
27 Comments - Last post 4 minutes ago by Daimao666
37 Comments - Last post 4 minutes ago by Daimao666
60 Comments - Last post 4 minutes ago by Daimao666
12 Comments - Last post 6 minutes ago by Daimao666
19 Comments - Last post 8 minutes ago by Nickbread
I know nothing about coding and I'm pretty sure this can be easily done with some script or stuff like that.
My problem is that I would like to find all the combinations possible for this:
A+B+C+D=8
A+B+C+D+E= -7
A+B+C+D+E= -21
A+B+C+D+E+F= -18
ABCDEF are numbers from this pool: -27;-21;-16;-16;-15;-15;-14;-12;-8;-7;-7;-3;-3;-2;0;1;2;3;4;8;11;12;17;20;29.
They can be used only once for each equations and the equations are independent. (for example: "0" can be used in the 4 equations but only 1 time in each combination)
I already did by hand the combinations for 4 other equations but it takes hours and I probably missed some of them.
I hope I explained the problem well enough, ask me questions if not, so If anyone can help me with this, that would be awesome!
Edit: the pool of numbers is the same for each time, you can re-use a number in different combination.
Edit2: problem solved, thanks CrafterKolyan!!
Comment has been collapsed.