Research and Advances

Permutation enumeration: four new permutation algorithms

Classical permutation enumeration algorithms encounter special cases requiring additional computation every nth permutation when generating the n! permutations on n marks. Four new algorithms have the attribute that special cases occur every n(n—1) permutations. Two of the algorithms produce the next permutation with a single exchange of two marks. The other two algorithms infrequently exchange more than two marks, but the rules for generating the next permutation are very simple. Performance tests which have counted execution of assignment statements, comparisons, arithmetic operations, and subscripted array references have shown superiority of the new algorithms compared to Boothroyd's implementation of M.B. Well's algorithm and Ehrlich's implementation of the Johnson-Trotter algorithm.

Advertisement

Author Archives

Shape the Future of Computing

ACM encourages its members to take a direct hand in shaping the future of the association. There are more ways than ever to get involved.

Get Involved