I have this command that prints all combination without repetition:
Grid[DeleteDuplicates[Map[Sort, Tuples[{a, b, c, d}, 3]]]]
As a matter of fact the output is:
a a a
a a b
a a c
a a d
a b b
a b c
a b d
a c c
a c d
a d d
b b b
b b c
b b d
b c c
b c d
b d d
c c c
c c d
c d d
d d d
How can I delete the vectors wich have two o more 'b','c','d' ?
{a,b,c,d}
, where any ofb,c,d
appear maximum once, there can be a simpler solution. E. g.Map[PadLeft[#, 3, a]&, Subsets[{b, c, d}]]
$\endgroup$