Generating binary trees by transpositions
Journal of Algorithms
A loopless algorithm for generating binary tree sequences
Information Processing Letters
On rotations and the generation of binary trees
Journal of Algorithms
On the loopless generation of binary tree sequences
Information Processing Letters
An Eades-McKay algorithm for well-formed parenthesis strings
Information Processing Letters
Simple Combinatorial Gray Codes Constructed by Reversing Sublists
ISAAC '93 Proceedings of the 4th International Symposium on Algorithms and Computation
The Art of Computer Programming, Volume 4, Fascicle 3: Generating All Combinations and Partitions
The Art of Computer Programming, Volume 4, Fascicle 3: Generating All Combinations and Partitions
The Art of Computer Programming, Volume 4, Fascicle 4: Generating All Trees--History of Combinatorial Generation (Art of Computer Programming)
Combinatorial generation by fusing loopless algorithms
CATS '06 Proceedings of the 12th Computing: The Australasian Theroy Symposium - Volume 51
A loop-free two-close Gray-code algorithm for listing k-ary Dyck words
Journal of Discrete Algorithms
Generating gray codes in o(1) worst-case time per word
DMTCS'03 Proceedings of the 4th international conference on Discrete mathematics and theoretical computer science
Generating combinations by prefix shifts
COCOON'05 Proceedings of the 11th annual international conference on Computing and Combinatorics
Loopless generation of multiset permutations using a constant number of variables by prefix shifts
SODA '09 Proceedings of the twentieth Annual ACM-SIAM Symposium on Discrete Algorithms
Binary bubble languages and cool-lex order
Journal of Combinatorial Theory Series A
Ranking and loopless generation of k-ary dyck words in cool-lex order
IWOCA'11 Proceedings of the 22nd international conference on Combinatorial Algorithms
Cool-lex order and k-ary Catalan structures
Journal of Discrete Algorithms
Hi-index | 0.00 |
We show that the set Bn of balanced parenthesis strings with n left and n right parentheses can be generated by prefix shifts. If b1, b2, ..., b2n is a member of Bn, then the k-th prefix shift is the string b1, bk, b2, ..., bk-1, bk+1, ..., b2n. Prefix shift algorithms are also known for combinations, and permutations of a multiset; the combination algorithm appears in fascicles of Knuth vol 4. We show that the algorithm is closely related to the combination algorithm, and like it, has a loopless implementation, and a ranking algorithm that uses O(n) arithmetic operations. Additionally, the algorithm can be directly translated to generate all binary trees by a loopless implementation that makes a constant number of pointer changes for each successively generated tree.