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
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Berstel, J., Perrin, D.: The origins of combinatorics on words. European Journal of Combinatorics 28, 996–1022 (2007)
de Bruijn, N.G.: A combinatorial problem. Koninkl. Nederl. Acad. Wetensch. Proc. Ser. A 49, 758–764 (1946)
Durocher, S., Li, P.C., Mondal, D., Ruskey, F., Williams, A.: Cool-lex order and k-ary Catalan structures. Journal of Discrete Algorithms (accepted)
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)
Fredericksen, H., Kessler, I.J.: An algorithm for generating necklaces of beads in two colors. Discrete Mathematics 61, 181–188 (1986)
Fredericksen, H., Maiorana, J.: Necklaces of beads in k colors and kary de Bruijn sequences. Discrete Mathematics 23(3), 207–210 (1978)
Gray, F.: Pulse code communication. U.S. Patent 2,632,058 (1947)
Knuth, D.E.: The Art of Computer Programming. Combinatorial Algorithms, Part 1, vol. 4. Addison-Wesley (2010)
Martin, M.: A problem in arrangements. Bull. Amer. Math. Soc. 40, 859–864 (1934)
Ruskey, F., Savage, C., Wang, T.: Generating necklaces. Journal of Algorithms 13, 414–430 (1992)
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)
Ruskey, F., Sawada, J., Williams, A.: De Bruijn sequences for fixed-weight binary strings. SIAM Discrete Math. (accepted, 2012)
Ruskey, F., Williams, A.: The coolest way to generate combinations. Discrete Mathematics 309(17), 5305–5320 (2009)
Flye Sainte-Marie, C.: Solution to question nr. 48. L’intermédiaire des Mathématiciens 1, 107–110 (1894)
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)
Sawada, J., Williams, A.: Efficient oracles for generating binary bubble languages. Electronic Journal of Combinatorics 19, P42 (2012)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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)