| igraph Reference Manual |
|---|
int igraph_de_bruijn(igraph_t *graph, igraph_integer_t m, igraph_integer_t n);
A de Bruijn graph represents relationships between strings. An alphabet
of m letters are used and strings of length n are considered.
A vertex corresponds to every possible string and there is a directed edge
from vertex v to vertex w if the string of v can be transformed into
the string of w by removing its first letter and appending a letter to it.
Please note that the graph will have m to the power n vertices and
even more edges, so probably you don't want to supply too big numbers for
m and n.
De Bruijn graphs have some interesting properties, please see another source, eg. Wikipedia for details.
Arguments:
|
Pointer to an uninitialized graph object, the result will be stored here. |
|
Integer, the number of letters in the alphabet. |
|
Integer, the length of the strings. |
Returns:
Error code. |
See also:
Time complexity: O(|V|+|E|), the number of vertices plus the number of edges.
<< 1.15. igraph_atlas — Create a small graph from the “Graph Atlas”. |
1.17. igraph_kautz — Generate a Kautz graph. >> |