Constructive combinatorics
Determining the Hamilton-connectedness of certain vertex-transitive graphs
Discrete Mathematics
Journal of the ACM (JACM)
Some Hamilton Paths and a Minimal Change Algorithm
Journal of the ACM (JACM)
Rotator Graphs: An Efficient Topology for Point-to-Point Multiprocessor Networks
IEEE Transactions on Parallel and Distributed Systems
Simple Combinatorial Gray Codes Constructed by Reversing Sublists
ISAAC '93 Proceedings of the 4th International Symposium on Algorithms and Computation
Distance-2 Cyclic Chaining of Constant-Weight Codes
IEEE Transactions on Computers
Generating balanced parentheses and binary trees by prefix shifts
CATS '08 Proceedings of the fourteenth symposium on Computing: the Australasian theory - Volume 77
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
Gray codes for non-crossing partitions and dissections of a convex polygon
Discrete Applied Mathematics
Combinatorial algorithms for listing paths in minimal change order
CAAN'07 Proceedings of the 4th conference on Combinatorial and algorithmic aspects of networking
Binary bubble languages and cool-lex order
Journal of Combinatorial Theory Series A
Cool-lex order and k-ary Catalan structures
Journal of Discrete Algorithms
Hi-index | 0.00 |
We present a new Gray code for combinations that is practical and elegant. We represent combinations as bitstrings with s 0’s and t 1’s, and generate them with a remarkably simple rule: Identify the shortest prefix ending in 010 or 011 (or the entire bitstring if no such prefix exists) and then rotate (shift) it by one position to the right. Since the rotated portion of the string consists of at most four contiguous runs of 0’s and 1’s, each successive combination can be generated by transposing only one or two pairs of bits. This leads to a very efficient loopless implementation. The Gray code also has a simple and efficient ranking algorithm that closely resembles that of combinations in colex order. For this reason, we have given a nickname to our order: cool-lex!