\HeaderA{graph.de.bruijn}{De Bruijn graphs.}{graph.de.bruijn}
\keyword{graphs}{graph.de.bruijn}
\begin{Description}\relax
De Bruijn graphs are labeled graphs representing the
overlap of strings.
\end{Description}
\begin{Usage}
\begin{verbatim}
graph.de.bruijn(m,n)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{m}] Integer scalar, the size of the alphabet. See details below.
\item[\code{n}] Integer scalar, the length of the labels. See details below.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
A de Bruijn graph represents relationships between strings. An alphabet
of \code{m} letters are used and strings of length \code{n} are considered. 
A vertex corresponds to every possible string and there is a directed edge
from vertex \code{v} to vertex \code{w} if the string of \code{v} can
be transformed into the string of \code{w} by removing its first letter
and appending a letter to it.

Please note that the graph will have \code{m} to the power \code{n}
vertices and even more edges, so probably you don't want to supply too
big numbers for \code{m} and \code{n}.

De Bruijn graphs have some interesting properties, please see another source,
eg. Wikipedia for details.
\end{Details}
\begin{Value}
A graph object.
\end{Value}
\begin{Author}\relax
Gabor Csardi \textless{}csardi@rmki.kfki.hu\textgreater{}
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{graph.kautz}{graph.kautz}}, \code{\LinkA{line.graph}{line.graph}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
# de Bruijn graphs can be created recursively by line graphs as well 
g <- graph.de.bruijn(2,1)
graph.de.bruijn(2,2)
line.graph(g)
\end{ExampleCode}
\end{Examples}

