Skip to main content

conditional - Set conditions at a permutation


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];


Comments