- Permutations without repetition
(in Italian: simple dispositions)
Permutations[{a, b, c, d}, {3}]
or
Select[Tuples[{{a, b, c, d}, {a, b, c, d}, {a, b, c, d}}], DuplicateFreeQ]
- Permutations with repetition
(in Italian: dispositions with repetition)
Tuples[{a, b, c, d}, 3]
or
Tuples[{{a, b, c, d}, {a, b, c, d}, {a, b, c, d}}]
- Combinations without repetition
(in Italian: simple combinations)
DeleteDuplicates[Map[Sort, Permutations[{a, b, c, d}, {3}]]]
or
DeleteDuplicates[Map[Sort, Select[Tuples[{{a, b, c, d}, {a, b, c, d}, {a, b, c, d}}], DuplicateFreeQ]]]
- Combinations with repetition
(in Italian: combinations with repetition)
DeleteDuplicates[Map[Sort, Tuples[{a, b, c, d}, 3]]]
or
DeleteDuplicates[Map[Sort, Tuples[{{a, b, c, d}, {a, b, c, d}, {a, b, c, d}}]]]
- Permutations of n distinct elements
(in Italian: idem)
Permutations[{a, b, c, d}, {4}]
or
Select[Tuples[{{a, b, c, d}, {a, b, c, d}, {a, b, c, d}, {a, b, c, d}}], DuplicateFreeQ]
- Permutations of n elements with a element repeating twice
(in Italian: idem)
Permutations[{a, b, c, c}, {4}] =
= {{a, b, c, c}, {a, c, b, c}, {a, c, c, b}, {b, a, c, c}, {b, c, a, c}, {b, c, c, a},
{c, a, b, c}, {c, a, c, b}, {c, b, a, c}, {c, b, c, a}, {c, c, a, b}, {c, c, b, a}}
or
?????????
Can you tell me a way to duplicate this command with the use of "Tuples[matrix]"?
Thank you!
Select[Tuples[{{a, b, c, d}, {a, b, c, d}, {a, b, c, d}, {a, b, c, d}}], DuplicateFreeQ] /. d -> c
$\endgroup$ – Feyre Feb 7 '17 at 18:30x = {a, b, c, c}; DeleteDuplicates@Select[Tuples[{x, x, x, x}], Sort[#] == Sort[x] &]
$\endgroup$ – Simon Woods Feb 7 '17 at 21:57