Abstract
For any integer n ≥ 1 a middle levels Gray code is a cyclic listing of all bitstrings of length 2n + 1 that have either n or n + 1 entries equal to 1 such that any two consecutive bitstrings in the list differ in exactly one bit. The question whether such a Gray code exists for every n ≥ 1 has been the subject of intensive research during the last 30 years, and has been answered affirmatively only recently [T. Mütze. Proof of the middle levels conjecture. arXiv:1404.4442, 2014]. In this work we provide the first efficient algorithm to compute a middle levels Gray code. For a given bitstring, our algorithm computes the next ℓ bitstrings in the Gray code in time \(\mathcal{O}(n\ell(1+\frac{n}{\ell}))\), which is \(\mathcal{O}(n)\) on average per bitstring provided that ℓ = Ω(n).
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Currently. http://www.as.inf.ethz.ch/muetze and http://people.inf.ethz.ch/njerri
Bitner, J., Ehrlich, G., Reingold, E.: Efficient generation of the binary reflected gray code and its applications. Commun. ACM 19(9), 517–521 (1976)
Buck, M., Wiedemann, D.: Gray codes with restricted density. Discrete Math. 48(2-3), 163–171 (1984)
Chen, Y.: The Chung–Feller theorem revisited. Discrete Math. 308(7), 1328–1329 (2008)
Cummins, R.: Hamilton circuits in tree graphs. IEEE Trans. Circuit Theory 13(1), 82–90 (1966)
Duffus, D., Kierstead, H., Snevily, H.: An explicit 1-factorization in the middle of the Boolean lattice. J. Combin. Theory Ser. A 65(2), 334–342 (1994)
Eades, P., McKay, B.: An algorithm for generating subsets of fixed size with a strong minimal change property. Inf. Process. Lett. 19(3), 131–133 (1984)
Felsner, S., Trotter, W.: Colorings of diagrams of interval orders and α-sequences of sets. Discrete Math. 144(1–3), 23–31 (1995)
Havel, I.: Semipaths in directed cubes. In: Graphs and Other Combinatorial Topics (Prague, 1982). Teubner-Texte Math., vol. 59, pp. 101–108. Teubner, Leipzig (1983)
Johnson, R.: Long cycles in the middle two layers of the discrete cube. J. Combin. Theory Ser. A 105(2), 255–271 (2004)
Johnson, S.: Generation of permutations by adjacent transposition. Math. Comp. 17, 282–285 (1963)
Kierstead, H., Trotter, W.: Explicit matchings in the middle levels of the Boolean lattice. Order 5(2), 163–171 (1988)
Knuth, D.: The Art of Computer Programming, vol. 4A. Addison-Wesley (2011)
Lucas, J., van Baronaigien, D.R., Ruskey, F.: On rotations and the generation of binary trees. J. Algorithms 15(3), 343–366 (1993)
Mütze, T.: Proof of the middle levels conjecture, arXiv:1404.4442, August 2014
Mütze, T., Nummenpalo, J.: Efficient computation of middle levels Gray codes, arXiv:1506.07898, June 2015
Mütze, T., Weber, F.: Construction of 2-factors in the middle layer of the discrete cube. J. Combin. Theory Ser. A 119(8), 1832–1855 (2012)
Ruskey, F.: Adjacent interchange generation of combinations. J. Algorithms 9(2), 162–180 (1988)
Savage, C.: A survey of combinatorial Gray codes. SIAM Rev. 39(4), 605–629 (1997)
Savage, C., Winkler, P.: Monotone Gray codes and the middle levels problem. J. Combin. Theory Ser. A 70(2), 230–248 (1995)
Shields, I., Shields, B., Savage, C.: An update on the middle levels problem. Discrete Math. 309(17), 5271–5277 (2009)
Shimada, M., Amano, K.: A note on the middle levels conjecture, arXiv:0912.4564, September 2011
Trotter, H.: Algorithm 115: Perm. Commun. ACM 5(8), 434–435 (1962)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2015 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Mütze, T., Nummenpalo, J. (2015). Efficient Computation of Middle Levels Gray Codes. In: Bansal, N., Finocchi, I. (eds) Algorithms - ESA 2015. Lecture Notes in Computer Science(), vol 9294. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-662-48350-3_76
Download citation
DOI: https://doi.org/10.1007/978-3-662-48350-3_76
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-662-48349-7
Online ISBN: 978-3-662-48350-3
eBook Packages: Computer ScienceComputer Science (R0)