So, the program has to print all possible permutations of a set A with elements {x, y, z, w, u, t}, with length of 3, which accomplish this condition: 'u' must not appear after 't'. I know how to find all possible permutations like this:
A = {x, y, z, w, u, t};
Permutations[A, {3}]
But i can't figure it out how to print only the permutations where 'u' doesn't appear after 't'. Any help ?
Use
DeleteCases
.