We design an algorithm that generates multiset permutati- ons in O(1) time from permutation to permutations, using only data structures of arrays. The previous O(1) time algorithm used pointers, causing O(n) time to access an element in a permutation, where n is the size of permutations. The central idea in our algorithm is tree traversal. We associate permutations with the leaves of a tree. By traversing this tree, going up and down and making changes when necessary, we spend O(1) time from permutation to permutation. Permutations are generated in a one-dimensional array.
CITATION STYLE
Takaoka, T. (1999). An o(1) time algorithm for generating multiset permutations. In Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) (Vol. 1741, pp. 237–246). Springer Verlag. https://doi.org/10.1007/3-540-46632-0_25
Mendeley helps you to discover research relevant for your work.