This Article 
 Bibliographic References 
 Add to: 
Generating De Bruijn Sequences: An Efficient Implementation
February 1997 (vol. 46 no. 2)
pp. 198-200

Abstract—This paper presents a concise and efficient implementation of a method of producing De Bruijn sequences. The implementation is based on a recursive method due to Lempel [5]. We provide code for a function that for each pair of integers n≥ 2 and 0 ≤x < 2n−2 returns a unique De Bruijn sequence of order-n. The implementation requires only O(2n) bit operations

[1] E.R. Berlekamp, Algebraic Coding Theory.Laguna Hills, Calif.: Aegean Park Press, 1984.
[2] G.E. Blelloch, "NESL: A Nested Data-Parallel Language," Technical Report CMU-CS-92-103, School of Computer Science, Carnegie Mellon Univ., Jan. 1992.
[3] H. Fredrickson, "A Survey of Full Cycle Algorithms," SIAM Review, vol. 24, pp. 195-221, 1982.
[4] S.W. Golomb, Shift Register Sequences. Aegean Park Press, 1982.
[5] A. Lempel, "On a Homomorphism of the De Bruijn Graph and Its Applications to the Design of Feedback Shift Registers," IEEE Trans. Computers, vol. 19, no. 12, pp. 1,204-1,209, Dec. 1970.
[6] A. Ralston, "De Bruijn Sequences—A Model Example of the Interaction of Discrete Mathematics and Computer Science," Am. Math. Monthly, vol. 55, no. 3, pp. 131-143, May 1982.

Index Terms:
Shift register sequences, De Bruijn graphs, computational complexity, recursive algorithms, NESL programming language.
F.s. Annexstein, "Generating De Bruijn Sequences: An Efficient Implementation," IEEE Transactions on Computers, vol. 46, no. 2, pp. 198-200, Feb. 1997, doi:10.1109/12.565596
Usage of this product signifies your acceptance of the Terms of Use.