0
$\begingroup$

I asked the question before but I forgot my login information:

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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.