Skip to main content

The Greedy Gray Code Algorithm

  • Conference paper

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 8037))

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.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Corbett, P.: Rotator graphs: An efficient topology for point-to-point multiprocessor networks. IEEE Trans. on Parallel and Distributed Systems 3, 622–626 (1992)

    Article  Google Scholar 

  2. Duckworth, R., Stedman, F.: Tintinnalogia (1668)

    Google Scholar 

  3. 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)

    Article  MathSciNet  MATH  Google Scholar 

  4. Gray, F.: Pulse code communication. U.S. Patent 2,632,058 (1947)

    Google Scholar 

  5. Kaye, R.: A Gray code for set partitions. Information Processing Letters 5(6), 171–173 (1976)

    Article  MathSciNet  MATH  Google Scholar 

  6. Knuth, D.E.: The Art of Computer Programming. Combinatorial Algorithms, Part 1, vol. 4. Addison-Wesley (2010)

    Google Scholar 

  7. Lucas, J.M., van Baronaigien, D.R., Ruskey, F.: On rotations and the generation of binary trees. Journal of Algorithms 15, 343–366 (1993)

    Article  MathSciNet  MATH  Google Scholar 

  8. Martin, M.H.: A problem in arrangements. Bull. Amer. Math. Soc. 40, 859–864 (1934)

    Article  MathSciNet  Google Scholar 

  9. Sawada, J., Williams, A.: Greedy pancake flipping. In: Latin-American Algorithms, Graphs and Optimization Symposium, LAGOS 2013 (accepted, 2013)

    Google Scholar 

  10. Siegel, J.: Interconnection Networks for Large-Scale Parallel Processing: Theory and Case Studies. McGraw-Hill (1990)

    Google Scholar 

  11. 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)

    Chapter  Google Scholar 

  12. Wikipedia. Rotary encoder, http://en.wikipedia.org/wiki/Rotary_encoder

  13. Zaks, S.: A new algorithm for generation of permutations. BIT Numerical Mathematics 24(2), 196–204 (1984)

    Article  MathSciNet  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics