Abstract
We reinterpret classic Gray codes for binary strings, permutations, combinations, binary trees, and set partitions using a simple greedy algorithm. The algorithm begins with an initial object and an ordered list of operations, and then repeatedly creates a new object by applying the first possible operation to the most recently created object.
Access provided by Autonomous University of Puebla. Download to read the full chapter text
Chapter PDF
Similar content being viewed by others
References
Corbett, P.: Rotator graphs: An efficient topology for point-to-point multiprocessor networks. IEEE Trans. on Parallel and Distributed Systems 3, 622–626 (1992)
Duckworth, R., Stedman, F.: Tintinnalogia (1668)
Eades, P., McKay, B.: An algorithm for generating subsets of fixed size with a strong minimal change property. Inf. Proc. Letters 19, 131–133 (1984)
Gray, F.: Pulse code communication. U.S. Patent 2,632,058 (1947)
Kaye, R.: A Gray code for set partitions. Information Processing Letters 5(6), 171–173 (1976)
Knuth, D.E.: The Art of Computer Programming. Combinatorial Algorithms, Part 1, vol. 4. Addison-Wesley (2010)
Lucas, J.M., van Baronaigien, D.R., Ruskey, F.: On rotations and the generation of binary trees. Journal of Algorithms 15, 343–366 (1993)
Martin, M.H.: A problem in arrangements. Bull. Amer. Math. Soc. 40, 859–864 (1934)
Sawada, J., Williams, A.: Greedy pancake flipping. In: Latin-American Algorithms, Graphs and Optimization Symposium, LAGOS 2013 (accepted, 2013)
Siegel, J.: Interconnection Networks for Large-Scale Parallel Processing: Theory and Case Studies. McGraw-Hill (1990)
Stevens, B., Williams, A.: Hamilton cycles in restricted rotator graphs. In: Iliopoulos, C.S., Smyth, W.F. (eds.) IWOCA 2011. LNCS, vol. 7056, pp. 324–336. Springer, Heidelberg (2011)
Wikipedia. Rotary encoder, http://en.wikipedia.org/wiki/Rotary_encoder
Zaks, S.: A new algorithm for generation of permutations. BIT Numerical Mathematics 24(2), 196–204 (1984)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2013 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Williams, A. (2013). The Greedy Gray Code Algorithm. In: Dehne, F., Solis-Oba, R., Sack, JR. (eds) Algorithms and Data Structures. WADS 2013. Lecture Notes in Computer Science, vol 8037. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-40104-6_46
Download citation
DOI: https://doi.org/10.1007/978-3-642-40104-6_46
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-40103-9
Online ISBN: 978-3-642-40104-6
eBook Packages: Computer ScienceComputer Science (R0)