An algorithm for generating necklaces of beads in two colors
Discrete Mathematics
Journal of Algorithms
The origins of combinatorics on words
European Journal of Combinatorics
De Bruijn sequences for the binary strings with maximum density
WALCOM'11 Proceedings of the 5th international conference on WALCOM: algorithms and computation
The Art of Computer Programming: Combinatorial Algorithms, Part 1
The Art of Computer Programming: Combinatorial Algorithms, Part 1
Binary bubble languages and cool-lex order
Journal of Combinatorial Theory Series A
Cool-lex order and k-ary Catalan structures
Journal of Discrete Algorithms
Hi-index | 0.00 |
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.