Skip to main content

The Coolest Order of Binary Strings

  • Conference paper
Book cover Fun with Algorithms (FUN 2012)

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

Included in the following conference series:

Abstract

Pick a binary string of length n and remove its first bit b. Now insert b after the first remaining 10, or insert \(\overline{b}\) at the end if there is no remaining 10. Do it again. And again. Keep going! Eventually, you will cycle through all 2n of the binary strings of length n. For example, are the binary strings of length n = 4, where 1 = and 0 = Che bello! And if you only want strings with weight (number of 1s) between ℓ and u? Just insert b instead of \(\overline{b}\) when the result would have too many 1s or too few 1s. For example, are the strings with n = 4, ℓ = 0 and u = 2. Strabello! This generalizes ‘cool-lex’ order by Ruskey and Williams (The coolest way to generate combinations, Discrete Mathematics). We use it to construct de Bruijn sequences for (i) ℓ = 0 and any u (maximum specified weight), (ii) any ℓ and u = n (minimum specified weight), and (iii) odd u − ℓ (even size weight range). For example, all binary strings with n = 6, ℓ = 1, and u = 4 appear once (cyclically) in

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

Access this chapter

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

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Berstel, J., Perrin, D.: The origins of combinatorics on words. European Journal of Combinatorics 28, 996–1022 (2007)

    Article  MathSciNet  MATH  Google Scholar 

  2. de Bruijn, N.G.: A combinatorial problem. Koninkl. Nederl. Acad. Wetensch. Proc. Ser. A 49, 758–764 (1946)

    MATH  Google Scholar 

  3. Durocher, S., Li, P.C., Mondal, D., Ruskey, F., Williams, A.: Cool-lex order and k-ary Catalan structures. Journal of Discrete Algorithms (accepted)

    Google Scholar 

  4. Eades, P., McKay, B.: An algorithm for generating subsets of fixed size with a strong minimal change property. Inform. Process. Letters 19, 131–133 (1984)

    Article  MathSciNet  MATH  Google Scholar 

  5. Fredericksen, H., Kessler, I.J.: An algorithm for generating necklaces of beads in two colors. Discrete Mathematics 61, 181–188 (1986)

    Article  MathSciNet  Google Scholar 

  6. Fredericksen, H., Maiorana, J.: Necklaces of beads in k colors and kary de Bruijn sequences. Discrete Mathematics 23(3), 207–210 (1978)

    Article  MathSciNet  Google Scholar 

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

    Google Scholar 

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

    Google Scholar 

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

    Article  MathSciNet  Google Scholar 

  10. Ruskey, F., Savage, C., Wang, T.: Generating necklaces. Journal of Algorithms 13, 414–430 (1992)

    Article  MathSciNet  MATH  Google Scholar 

  11. Ruskey, F., Sawada, J., Williams, A.: Binary bubble languages and cool-lex Gray codes. Journal of Combinatorial Theory, Series A 119(1), 155–169 (2012)

    Article  MathSciNet  MATH  Google Scholar 

  12. Ruskey, F., Sawada, J., Williams, A.: De Bruijn sequences for fixed-weight binary strings. SIAM Discrete Math. (accepted, 2012)

    Google Scholar 

  13. Ruskey, F., Williams, A.: The coolest way to generate combinations. Discrete Mathematics 309(17), 5305–5320 (2009)

    Article  MathSciNet  MATH  Google Scholar 

  14. Flye Sainte-Marie, C.: Solution to question nr. 48. L’intermédiaire des Mathématiciens 1, 107–110 (1894)

    Google Scholar 

  15. Sawada, J., Stevens, B., Williams, A.: De Bruijn Sequences for the Binary Strings with Maximum Density. In: Katoh, N., Kumar, A. (eds.) WALCOM 2011. LNCS, vol. 6552, pp. 182–190. Springer, Heidelberg (2011)

    Chapter  Google Scholar 

  16. Sawada, J., Williams, A.: Efficient oracles for generating binary bubble languages. Electronic Journal of Combinatorics 19, P42 (2012)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2012 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Stevens, B., Williams, A. (2012). The Coolest Order of Binary Strings. In: Kranakis, E., Krizanc, D., Luccio, F. (eds) Fun with Algorithms. FUN 2012. Lecture Notes in Computer Science, vol 7288. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-30347-0_32

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-30347-0_32

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-30346-3

  • Online ISBN: 978-3-642-30347-0

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics