© 1984 by British Computer Society
| ||||||||||||||||||||||||||||||||||||||||||||||||||
Short Notes
Permutation Backtracking in Lexicographic Order
Department of Mathematics, University of Salford, Salford, UK
An algorithm is presented for the lexicographic generation of permutations, which readily lends itself to the conduction of a backtrack search in the space of permutations of a set of items. The method is similar to that employed in an algorithm of Rohl, but achieves lexicographic order at no extra cost by storing unused items throughout in a linked linear list. Following the specification of the permutation generation algorithm itself, its application to backtracking is illustrated with reference to the n-queens problem, and some figures are given to compare its efficiency with that of related algorithms.
Received October 1982.
* Department of Mathematics, University of Salford, Salford M5 4WT, UK