# de Bruijn digraph

The vertices of the *de Bruijn digraph* $B(n,m)$ are all possible words of length $m-1$ chosen from an alphabet of size $n$.

$B(n,m)$ has ${n}^{m}$ edges consisting of each possible word of length $m$ from an alphabet of size $n$. The edge ${a}_{1}{a}_{2}\mathrm{\dots}{a}_{n}$ connects the vertex ${a}_{1}{a}_{2}\mathrm{\dots}{a}_{n-1}$ to the vertex ${a}_{2}{a}_{3}\mathrm{\dots}{a}_{n}$.

For example, $B(2,4)$ could be drawn as: