Adjacent interchange generation of combinations
Journal of Algorithms
Generating binary trees by transpositions
Journal of Algorithms
Generation of well-formed parenthesis strings in constant worst-case time
Journal of Algorithms
An Eades-McKay algorithm for well-formed parenthesis strings
Information Processing Letters
Journal of the ACM (JACM)
A loopless gray-code algorithm for listing k-ary trees
Journal of Algorithms
Efficient generation of the binary reflected gray code and its applications
Communications of the ACM
Algorithm 452: enumerating combinations of m out of n objects [G6]
Communications of the ACM
Simple Combinatorial Gray Codes Constructed by Reversing Sublists
ISAAC '93 Proceedings of the 4th International Symposium on Algorithms and Computation
A loopless algorithm for generating the permutations of a multiset
Theoretical Computer Science - Random generation of combinatorial objects and bijective combinatorics
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
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
Restricted compositions and permutations: From old to new Gray codes
Information Processing Letters
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 |
P. Chase and F. Ruskey each published a Gray code for length n binary strings with m occurrences of 1, coding m-combinations of n objects, which is two-close-that is, in passing from one binary string to its successor a single 1 exchanges positions with a 0 which is either adjacent to the 1 or separated from it by a single 0. If we impose the restriction that any suffix of a string contains at least k-1 times as many 0's as 1's, we obtain k-suffixes: suffixes of k-ary Dyck words. Combinations are retrieved as special case by setting k=1 and k-ary Dyck words are retrieved as a special case by imposing the additional condition that the entire string has exactly k-1 times as many 0's as 1's. We generalize Ruskey's Gray code to the first two-close Gray code for k-suffixes and we provide a loop-free implementation for k=2. For k=1 we use a simplified version of Chase's loop-free algorithm for generating his two-close Gray code for combinations. These results are optimal in the sense that there does not always exist a Gray code, either for combinations or Dyck words, in which the 1 and the 0 that exchange positions are adjacent.