de Bruijn sequence

k is the language (0..k-1). n is the length of the string.
The de Bruijn sequence is the shortest way one can combine all the k^n possible combinations (strings)
if one is allowed to overlap the different combinations.
The total length of the sequence is k^n+n-1 (the +n-1 part is for the "around the corner" cases).

For more information about de Bruijn sequences, see
Back to my homepage
Created by Hakan Kjellerstrand hakank@gmail.com