I need to find all permutations of 3 elements from {a,b,c,d,e}
with this condition: These must include element d
maximum once, and a must be before c
. I'm using the following code and I don't know how to set the condition. Anyone help :)
Permutations[list, {3}];
perm[a_, b_, c_, d_, e_] := Module[{perm},
list = {a, b, c, d, e};
k = Tuples[list, 3];
perm];
{a,b,c,d,e}
contains only oned
, then there is no way it can ever have more than oned
in all existing permutations. Can you clear what exactly you mean? $\endgroup$