Abstract
We present three related results about simple combinatorial Gray codes constructed recursively by reversing certain sublists. First, we show a bijection between the list of compositions of Knuth and the list of combinations of Eades and McKay. Secondly, we provide a short description of a list of combinations satisfying a more restrictive closeness criteria of Chase. Finally, we develop a new, simply described, Gray code list of the partitions of a set into a fixed number of blocks, as represented by restricted growth sequences. In each case the recursive definition of the list is easily translatable into an algorithm for generating the list in time proportional to the number of elements in the list; i.e., each object is produced in O(1) amortized time by the algorithm.
Research supported in part by the Natural Sciences and Engineering Research Council of Canada under Grant A3379.
Preview
Unable to display preview. Download preview PDF.
References
M. Buck and D. Wiedemann, Gray Codes with Restricted Density, Discrete Mathematics, 48 (1984) 163–171.
P.J. Chase, Combination Generation and Graylex Ordering, Congressus Numerantium, 69 (1989) 215–242.
P. Eades, M. Hickey and R. Read, Some Hamilton Paths and a Minimal Change Algorithm, Journal of the ACM, 31 (1984) 19–29.
P. Eades and B. McKay, An Algorithm for Generating Subsets of Fixed Size with a Strong Minimal Change Property, Information Processing Letters, 19 (1984) 131–133.
G. Ehrlich, Loopless Algorithms for Generating Permutations, Combinations and Other Combinatorial Configurations, Journal of the ACM, 20 (1973) 500–513.
J.A. Fill and E.M. Reingold, Solutions Manual for Combinatorial Algorithms: Theory and Practice, Prentice-Hall, 1977.
S.C. Milne, Restricted Growth Functions, Rank Row Matchings of Partition Lattices, and q-Stirling Numbers, Advances in Mathematics, 43 (1982) 173–196.
E.M. Reingold, J. Nievergelt and N. Deo, Combinatorial Algorithms, Prentice-Hall, Inc., Englewood Cliffs, New Jersey, 1977.
F. Ruskey and A. Proskurowski, Generating Binary Trees by Transpositions, J. Algorithms, 11 (1990) 68–84.
C.S. Savage, Gray Code Sequences of Partitions, J. Algorithms, 10 (1989) 577–595.
Herbert S. Wilf, Combinatorial Algorithms: An Update, SIAM CBMS-55, 1989.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1993 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Ruskey, F. (1993). Simple combinatorial Gray codes constructed by reversing sublists. In: Ng, K.W., Raghavan, P., Balasubramanian, N.V., Chin, F.Y.L. (eds) Algorithms and Computation. ISAAC 1993. Lecture Notes in Computer Science, vol 762. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-57568-5_250
Download citation
DOI: https://doi.org/10.1007/3-540-57568-5_250
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-57568-9
Online ISBN: 978-3-540-48233-8
eBook Packages: Springer Book Archive