Suppose I have five quantities:
A1 = 4; A2 = 2 + 4b; A3 = a + 6 b; A4 = 10 b; A5 = 4 a
I want to make as many systems of equations as I can from these five quantities without repeat the system.
For example:
If I have 5 equation A1,A2,A3, A4 and A5: I will have 10 systems (no more):
Start with A1:
Solve[A1 == A2 && A2 == A3, {a, b}] (Here A1=A2=A3)
Solve[A1 == A2 && A2 == A4, {a, b}] (Here A1=A2=A4)
Solve[A1 == A2 && A2 == A5, {a, b}] (Here A1=A2=A5)
Solve[A1 == A3 && A3 == A4, {a, b}] (Here A1=A3=A4)
Solve[A1 == A3 && A3 == A5, {a, b}] (Here A1=A3=A5)
Solve[A1 == A4 && A4 == A5, {a, b}] (Here A1=A4=A5)
Start with A2:
Solve[A2 == A3 && A3 == A4, {a, b}]
Solve[A2 == A3 && A3 == A5, {a, b}]
Solve[A2 == A4 && A4 == A5, {a, b}]
Start with A3:
Solve[A3 == A4 && A4 == A5, {a, b}]
If n=6 for example I will have 20 systems. If n=7 I will have 35 systems. and so on.
Note that If I start with A4=A5=A6 the number of A must get bigger and not smaller this A4=A3=A1 is wrong choice here because I started with A4 the one after must be A5 and so on.
What is the best code to find all the systems if I know (n). I think I need like a loop for that.
Thank you
Solve[eqs[[i]] == eqs[[j]] && eqs[[j]] == eqs[[k]], {i, n - 2}, {j, i + 1, n - 1}, {k, j + 1, n}] ~Flatten~ 3 // Column
– Ateq Alsaadi Feb 17 '17 at 13:37Solve. – Mr.Wizard Feb 17 '17 at 13:45