Generating t-ary trees in A-order
Information Processing Letters
Journal of the ACM (JACM)
Communications of the ACM
On generating k-ary trees in computer representation
Information Processing Letters
Ranking and unranking permutations in linear time
Information Processing Letters
The Art of Computer Programming, Volume 4, Fascicle 4: Generating All Trees--History of Combinatorial Generation (Art of Computer Programming)
A loop-free two-close Gray-code algorithm for listing k-ary Dyck words
Journal of Discrete Algorithms
Generating balanced parentheses and binary trees by prefix shifts
CATS '08 Proceedings of the fourteenth symposium on Computing: the Australasian theory - Volume 77
Linear-time ranking of permutations
ESA'07 Proceedings of the 15th annual European conference on Algorithms
Loopless Generation of Non-regular Trees with a Prescribed Branching Sequence1
The Computer Journal
O(1)-time unsorting by prefix-reversals in a boustrophedon linked list
FUN'10 Proceedings of the 5th international conference on Fun with algorithms
The Art of Computer Programming: Combinatorial Algorithms, Part 1
The Art of Computer Programming: Combinatorial Algorithms, Part 1
Binary bubble languages and cool-lex order
Journal of Combinatorial Theory Series A
Generating combinations by prefix shifts
COCOON'05 Proceedings of the 11th annual international conference on Computing and Combinatorics
Enumerative Combinatorics: Volume 1
Enumerative Combinatorics: Volume 1
Ranking and loopless generation of k-ary dyck words in cool-lex order
IWOCA'11 Proceedings of the 22nd international conference on Combinatorial Algorithms
Ranking and unranking of non-regular trees with a prescribed branching sequence
Mathematical and Computer Modelling: An International Journal
The coolest order of binary strings
FUN'12 Proceedings of the 6th international conference on Fun with Algorithms
Hi-index | 0.00 |
For any given k, the sequence of k-ary Catalan numbers, C"t","k=1kt+1(ktt), enumerates a number of combinatorial objects, including k-ary Dyck words of length n=kt and k-ary trees with t internal nodes. We show that these objects can be efficiently ordered using the same variation of lexicographic order known as cool-lex order. In particular, we provide loopless algorithms that generate each successive object in O(1) time. The algorithms are also efficient in terms of memory, with the k-ary Dyck word algorithm using O(1) additional index variables, and the k-ary tree algorithm using O(t) additional pointers and index variables. We also show how to efficiently rank and unrank k-ary Dyck words in cool-lex order using O(kt) arithmetic operations, subject to an initial precomputation. Our results are based on the cool-lex successor rule for sets of binary strings that are bubble languages. However, we must complement and reverse 1/k-ary Dyck words to obtain the stated efficiency.