Generating De Bruijn sequences: an efficient implementation
Fred S. Annexstein · IEEE Transactions on Computers · 1997
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 A. Lempel (1970). We provide code for a function that for each pair of integers n/spl ges/2 and 0/spl les/x<2/sup n-2/ returns a unique De Bruijn sequence of order-n. The implementation requires only O(2/sup n/) bit operations.