The Grandmama de Bruijn Sequence for Binary Strings
A de Bruijn sequence is a binary string of length \(2^n\) which, when viewed cyclically, contains every binary string of length n exactly once as a substring. Knuth refers to the lexicographically least de Bruijn sequence for each n as the “granddaddy” and Fredricksen et al. showed that it can be constructed by concatenating the aperiodic prefixes of the binary necklaces of length n in lexicographic order. In this paper we prove that the granddaddy has a lexicographic partner. The “grandmama” sequence is constructed by instead concatenating the aperiodic prefixes in co-lexicographic order. We explain how our sequence differs from the previous sequence and why it had not previously been discovered.
Keywordsde Bruijn sequence Lexicographic order Necklace Lyndon word FKM construction Ford sequence
- 4.Ford, L.R.: A cyclic arrangement of \(m\)-tuples. Report No. P-1071, RAND Corp., Santa Monica (1957)Google Scholar
- 8.Knuth, D.E.: The Art of Computer Programming. Combinatorial Algorithms, vol. 4A. Addison-Wesley Professional, Boston (2011)Google Scholar
- 17.Sawada, J., Williams, A., Wong, D., Generalizing the classic greedy, necklace constructions for de Bruijn sequences, universal cycles. Electron. J. Comb., 23(1) (2016). Paper #1.24Google Scholar
- 18.Stein, S.K.: Mathematics: The Man-Made Universe, 3rd edn. W. H. Freeman and Company, San Francisco (1994)Google Scholar