Graph Theory37 sections · 1633 units
Open in Course

De Bruijn Sequence - Core idea

Build De Bruijn graph and find Euler circuit.

Core idea: Construct the De Bruijn graph and find an Euler circuit.

Graph construction:

  • 2n12^{n-1} vertices (each is an (n1)(n-1)-bit string)
  • 2n2^n edges (each is an nn-bit string)
  • Edge from vertex vv to vertex uu if vv's last (n2)(n-2) bits equal uu's first (n2)(n-2) bits

Why Euler circuit exists: Each vertex has in-degree == out-degree =2= 2 (can append 00 or 11).

The Euler circuit visits all 2n2^n edges, giving all nn-bit strings.