# Generate the de Bruijn sequence of length 4 on the binary alphabet
# {0,1}
sBruijn(4)
# or equivalently
sBruijn(4,2)
# Generate the de Bruijn sequence of length 2 over the alphabet {0,1,2}
sBruijn(2,3)
# Generate the de Bruijn sequence of length 2 over the alphabet {1,2,3}
sBruijn(2,3,1)
# Generate the de Bruijn sequence of length 2 over the alphabet {1,2,3}
# with a block separator.
sBruijn(2,3,1,TRUE)
Run the code above in your browser using DataLab