IWOCA 2009: Combinatorial Algorithms pp 183-193 | Cite as

Gray Code Compression

  • Darko Dimitrov
  • Tomáš Dvořák
  • Petr Gregor
  • Riste Škrekovski
Part of the Lecture Notes in Computer Science book series (LNCS, volume 5874)

Abstract

An n-bit (cyclic) Gray code is a (cyclic) sequence of all n-bit strings such that consecutive strings differ in a single bit. We describe an algorithm which for every positive integer n constructs an n-bit cyclic Gray code whose graph of transitions is the d-dimensional hypercube Q d if n = 2 d , or a subgraph of Q d if 2 d − 1 < n < 2 d . This allows to compress sequences that follow this code so that only \({\it \Theta}(\log\log n)\) bits per n-bit string are needed. The algorithm generates the transitional sequence of the code in a constant amortized time per one transition.

Keywords

Discrete Math Data Compression Hamiltonian Cycle Hamiltonian Path Gray Code 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Bultena, B., Ruskey, F.: Transition restricted Gray codes. Electron. J. Combin. 3, #R11 (1996)Google Scholar
  2. 2.
    Ernvall, J., Katajainen, J., Penttonen, M.: NP-completeness of the Hamming salesman problem  BIT 25, 289–292 (1985)Google Scholar
  3. 3.
    Knuth, D.E.: The Art of Computer Programming. Fascicle 2: Generating All Tuples and Permutations, vol. 4. Addison-Wesley Professional, Reading (2005)Google Scholar
  4. 4.
    Pinar, A., Tao, T., Ferhatosmanoglu, H.: Compressing bitmap indices by data reorganization. In: Proc. 21st Int. Conf. Data Engineering (ICDE 2005), pp. 310–321. IEEE Computer Society, Los Alamitos (2005)CrossRefGoogle Scholar
  5. 5.
    Richards, D.: Data compression and Gray-code sorting. Inform. Process. Lett. 22, 201–205 (1986)MATHCrossRefMathSciNetGoogle Scholar
  6. 6.
    Salomon, D.: Data Compression: The Complete Reference, 4th edn. Springer, Berlin (2006)Google Scholar
  7. 7.
    Savage, C.: A survey of combinatorial Gray codes. SIAM Rev. 39, 605–629 (1997)MATHCrossRefMathSciNetGoogle Scholar
  8. 8.
    Slater, P.J.: Open problem. In: Proc. 10th Southeastern Conf. on Combinatorics, Graph Theory, and Computing, Congress. Utilitas Math., Winnipeg, vol. XXIV, pp. 918–919 (1979)Google Scholar
  9. 9.
    Slater, P.J.: Research Problems 109 and 110. Discrete Math. 76, 293–294 (1989)MATHCrossRefMathSciNetGoogle Scholar
  10. 10.
    Suparta, I.N., van Zanten, A.J.: A construction of Gray codes inducing complete graphs. Discrete Math. 308, 4124–4132 (2008)MATHCrossRefMathSciNetGoogle Scholar
  11. 11.
    Wilmer, E.L., Ernst, M.D.: Graphs induced by Gray codes. Discrete Math. 257, 585–598 (2002)MATHCrossRefMathSciNetGoogle Scholar
  12. 12.
    Wu, K., Otoo, E.J., Shoshani, A.: Optimizing bitmap indices with efficient compression. ACM Trans. Database Syst. 31, 1–38 (2006)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2009

Authors and Affiliations

  • Darko Dimitrov
    • 1
  • Tomáš Dvořák
    • 2
  • Petr Gregor
    • 2
  • Riste Škrekovski
    • 3
  1. 1.Institut für InformatikFreie UniversitätBerlinGermany
  2. 2.Faculty of Mathematics and PhysicsCharles UniversityPragueCzech Republic
  3. 3.Department of MathematicsUniversity of LjubljanaLjubljanaSlovenia

Personalised recommendations