ArticleslgStudy

computer science

De Bruijn graph

De Bruijn graph is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand De Bruijn graph rather than just read about it. In short: In graph theory, an n-dimensional De Bruijn graph of m symbols is a directed graph representing overlaps between sequences of symbols. It has mn vertices, consisting of all possible length-n sequences of the given symbols; the same symbol may appear multiple times in a sequence.

De Bruijn graph — main illustration
De Bruijn graph — illustration

Key takeaways

  • De Bruijn graph belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect De Bruijn graph to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of De Bruijn graph from memory before moving on to harder problems.

Reference excerpt

In graph theory, an n-dimensional De Bruijn graph of m symbols is a directed graph representing overlaps between sequences of symbols. It has mn vertices, consisting of all possible length-n sequences of the given symbols; the same symbol may appear multiple times in a sequence. For a set of m symbols S = {s1, …, sm}, the set of vertices is:

V=Sn={(s1,…,s1,s1),(s1,…,s1,s2),…,(s1,…,s1,sm),(s1,…,s2,s1),…,(sm,…,sm,sm)}. If one of the vertices can be expressed as another vertex by shifting all its symbols by one place to the left and adding a new symbol at the end of this vertex, then the latter has a directed edge to the former vertex. Thus the set of arcs (that is, directed edges) is

E={((t1,t2,…,tn),(t2,…,tn,sj)):ti∈S,1≤i≤n,1≤j≤m}. Although De Bruijn graphs are named after Nicolaas Govert de Bruijn, they were invented independently by both de Bruijn and I. J. Good. Much earlier, Camille Flye Sainte-Marie implicitly used their properties.

Properties If n = 1, then the condition for any two vertices forming an edge holds vacuously, and hence all the vertices are connected, forming a total of m2 edges. Each vertex has exactly m incoming and m outgoing edges. Each n-dimensional De Bruijn graph is the line digraph of the (n − 1)-dimensional De Bruijn graph with the same set of symbols. Each De Bruijn graph is Eulerian and Hamiltonian. The Euler cycles and Hamiltonian cycles of these graphs (equivalent to each other via the line graph construction) are De Bruijn sequences. The line graph construction of the three smallest binary De Bruijn graphs is depicted below. As can be seen in the illustration, each vertex of the n-dimensional De Bruijn graph corresponds to an edge of the (n − 1)-dimensional De Bruijn graph, and each edge in the n-dimensional De Bruijn graph corresponds to a two-edge path in the (n − 1)-dimensional De Bruijn graph.

Dynamical systems Binary De Bruijn graphs can be drawn in such a way that they resemble objects from the theory of dynamical systems, such as the Lorenz attractor:

This analogy can be made rigorous: the n-dimensional m-symbol De Bruijn graph is a model of the Bernoulli map

x↦mx mod 1. The Bernoulli map (also called the 2x mod 1 map for m = 2) is an ergodic dynamical system, which can be understood to be a single shift of a m-adic number. The trajectories of this dynamical system correspond to walks in the De Bruijn graph, where the correspondence is given by mapping each real x in the interval [0,1) to the vertex corresponding to the first n digits in the base-m representation of x. Equivalently, walks in the De Bruijn graph correspond to trajectories in a one-sided subshift of finite type.

Embeddings resembling this one can be used to show that the binary De Bruijn graphs have queue number 2 and that they have book thickness at most 5.

Uses Some grid network topologies are De Bruijn graphs. The distributed hash table protocol Koorde uses a De Bruijn graph. In bioinformatics, De Bruijn graphs are used for de novo assembly of sequencing reads into a genome. Instead of the complete De Bruijn graphs described above that contain all possible k-mers, de novo sequence assemblers make use of De Bruijn subgraphs that contain only the k-mers observed in a sequencing dataset. In time series forecasting, De Bruijn graphs have been adapted to encode temporal patterns by mapping discrete subsequences (n-grams) of observations to graph nodes. This enables the modeling of sequential dependencies in symbolic or discretized time series data. Multivariate De Bruijn graphs extend this idea by jointly encoding patterns across multiple correlated variables, allowing for the representation of complex inter-variable temporal dynamics in multivariate time series.

See also De Bruijn torus Hamming graph Kautz graph

References

External links Tutorial on using De Bruijn Graphs in Bioinformatics by Homolog.us De Bruijn Graph algorithm tutorial by Kurban Intelligence Lab

Illustrations

De Bruijn graph illustration
De Bruijn graph illustration
De Bruijn graph: Directed graphs of two B(2,3) de Bruijn sequences and a B(2,4) sequence. In B(2,3), each vertex is visited once, whereas in B(2,4), each edge is traversed once.
Directed graphs of two B(2,3) de Bruijn sequences and a B(2,4) sequence. In B(2,3), each vertex is visited once, whereas in B(2,4), each edge is traversed once.

Worked examples

Example 1 — a first encounter with De Bruijn graph

Start with the simplest possible case. Write down what De Bruijn graph claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to De Bruijn graph before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about De Bruijn graph ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of De Bruijn graph

In research
De Bruijn graph appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses De Bruijn graph in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
De Bruijn graph is common in secondary-school and first-year university syllabi. It links to neighbouring topics Automata (computation), Directed graphs, Dynamical systems, so understanding it makes those chapters shorter.
In everyday life
Look for De Bruijn graph outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “De Bruijn graph” →

How to study De Bruijn graph in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what De Bruijn graph means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain De Bruijn graph out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is De Bruijn graph in simple terms?

In graph theory, an n-dimensional De Bruijn graph of m symbols is a directed graph representing overlaps between sequences of symbols. It has mn vertices, consisting of all possible length-n sequences of the given symbols; the same symbol may appear multiple times in a sequence.

Why does De Bruijn graph matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study De Bruijn graph?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on De Bruijn graph.

Tags

  • Automata (computation)
  • Directed graphs
  • Dynamical systems
  • Parametric families of graphs

Keep exploring