# code to build systems of equations

here is the question: How many equation systems can I build from five equations?

the code works good but miss some equations for example if we have A1,A2,A3,A4 the code will give us

 {A1 == A2 && A2 == A3},
{A1 == A2 && A2 == A4},
{A1 == A3 && A3 == A4},
{A2 == A3 && A3 == A4}


there are some systems lost like:

{A1 == A2 && A3 == A4},
{A1 == A3 && A2 == A4},
{A1 == A4 && A2 == A3}


Can anyone help me and fix the code so we can find all systems.

Thank you

• Is this what you want? And @@ Equal @@@ ## & /@ Nest[Subsets[#, {2}] &, {A1, A2, A3, A4}, 2] – halirutan Feb 3 '18 at 7:39
• @halirutan Thanks for your answer. How can I find the solution for every system. I will defined Ai as equation of a and b. – Ateq Alsaadi Feb 3 '18 at 8:19