Permutations of a Set with Repetitions (Algorithm 242 [G6])
CACM October, 1964
Sag, T. W.
