Note that these powerful algorithms by Gregor don't solve the teresa problem (are related) as they permit repetitions of elements in excess of the original number of same, e.g. xyz doesn't actually permute to xxx when defining permutation in the usual way. Kirby