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.
2 Comments - Last post 4 minutes ago by CelticBatman
548 Comments - Last post 7 minutes ago by MeguminShiro
1,485 Comments - Last post 8 minutes ago by MeguminShiro
7 Comments - Last post 9 minutes ago by CelticBatman
4 Comments - Last post 28 minutes ago by medion
2,164 Comments - Last post 55 minutes ago by Formidolosus
18 Comments - Last post 1 hour ago by Warriot
378 Comments - Last post 4 minutes ago by jesuswarjesus
12,323 Comments - Last post 39 minutes ago by Keepitup
186 Comments - Last post 1 hour ago by SErVER51
305 Comments - Last post 1 hour ago by Calibr3
1,877 Comments - Last post 1 hour ago by GraVe23
3,443 Comments - Last post 2 hours ago by tevemadar
158 Comments - Last post 2 hours ago by CaspianRoach
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.