DeBruijnSequence
DeBruijnSequence[list,n]
gives a de Bruijn sequence on the elements in list taken n at a time.
DeBruijnSequence[k,n]
gives a de Bruijn sequence on the elements 0,…,k-1.
DeBruijnSequence["string",n]
gives a de Bruijn sequence on the characters in "string".
Examples
open allclose allBasic Examples (3)
Applications (1)
Properties & Relations (8)
A de Bruijn sequence of order 1 on a list is the list itself:
DeBruijnSequence keeps duplicate elements in the list:
The ordering of the input list determines the ordering of the de Bruijn sequence:
For an ordered list, the first de Bruijn sequence in lexicographic order is returned:
DeBruijnSequence[k,n] returns a list of length :
The subsequences of length n in DeBruijnSequence[k,n] form all possible n-tuples on the elements 0,…,k-1:
Construct a binary de Bruijn sequence of order 4:
Construct all contiguous subsequences of length 4 with offset 1, and cycling through the end:
These subsequences can be obtained from an Eulerian cycle of a {k,n-1} de Bruijn graph:
For a given edge of the cycle, a subsequence is obtained by joining the digits of the name of the starting vertex to the last digit of the name of the ending vertex:
Construct a binary de Bruijn sequence of order 3:
Construct all contiguous subsequences of length 3 with offset 1, and cycling through the end:
These subsequences can be obtained from a Hamiltonian cycle of a {k,n} de Bruijn graph:
For a given edge of the cycle, a subsequence is obtained from the digits of the name of the starting vertex:
Use ShiftRegisterSequence to generate a binary de Bruijn sequence:
Check that the subsequences of length n form all possible n-tuples on the elements and :
Text
Wolfram Research (2018), DeBruijnSequence, Wolfram Language function, https://reference.wolfram.com/language/ref/DeBruijnSequence.html.
CMS
Wolfram Language. 2018. "DeBruijnSequence." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/DeBruijnSequence.html.
APA
Wolfram Language. (2018). DeBruijnSequence. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DeBruijnSequence.html