ArticleslgStudy

computer science

DSatur

DSatur 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 DSatur rather than just read about it. In short: DSatur is a graph colouring algorithm put forward by Daniel Brélaz in 1979. Similarly to the greedy colouring algorithm, DSatur colours the vertices of a graph one after another, adding a previously unused colour when needed.

DSatur — main illustration
DSatur — illustration

Key takeaways

  • DSatur 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 DSatur to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of DSatur from memory before moving on to harder problems.

Reference excerpt

DSatur is a graph colouring algorithm put forward by Daniel Brélaz in 1979. Similarly to the greedy colouring algorithm, DSatur colours the vertices of a graph one after another, adding a previously unused colour when needed. Once a new vertex has been coloured, the algorithm determines which of the remaining uncoloured vertices has the highest number of colours in its neighbourhood and colours this vertex next. Brélaz defines this number as the degree of saturation of a given vertex. The contraction of the term "degree of saturation" forms the name of the algorithm. DSatur is a heuristic graph colouring algorithm, yet produces exact results for bipartite, cycle, and wheel graphs. DSatur has also been referred to as saturation LF in the literature.

Pseudocode Let the "degree of saturation" of a vertex be the number of different colours being used by its neighbors. Given a simple, undirected graph G compromising a vertex set V and edge set E, the algorithm assigns colors to all of the vertices using color labels 1,2,3,.... The algorithm operates as follows:

Let v be the uncolored vertex in G with the highest degree of saturation. In cases of ties, choose the vertex among these with the largest degree in the subgraph induced by the uncolored vertices. Assign v to the lowest color label not being used by any of its neighbors. If all vertices have been colored, then end; otherwise return to Step 1. Step 2 of this algorithm assigns colors to vertices using the same scheme as the greedy colouring algorithm. The main differences between the two approaches arises in Step 1 above, where vertices seen to be the most "constrained" are coloured first.

Example

Consider the graph G=(V,E) shown on the right. This is a wheel graph and will therefore be optimally colored by the DSatur algorithm. Executing the algorithm results in the vertices being selected and colored as follows. (In this example, where ties occur in both of DSatur's heuristics, the vertex with lowest lexicographic labelling among these is chosen.)

Vertex g (color 1) Vertex a (color 2) Vertex b (color 3) Vertex c (color 2) Vertex d (color 3) Vertex e (color 2) Vertex f (color 3) This gives the final three-colored solution 𝒮={{g},{a,c,e},{b,d,f}}.

Performance The worst-case complexity of DSatur is O(n2), where n is the number of vertices in the graph. This is because the process of selecting the next vertex to colour takes O(n) time, and this process is carried out n times. The algorithm can also be implemented using a binary heap to store saturation degrees, operating in O((n+m)log⁡n), or O(m+nlog⁡n) using Fibonacci heap, where m is the number of edges in the graph. This produces much faster runs with sparse graphs. DSatur is known to be exact for bipartite graphs, as well as for cycle and wheel graphs. In an empirical comparison by Lewis in 2021, DSatur produced significantly better vertex colourings than the greedy algorithm on random graphs with edge probability p=0.5, while in turn producing significantly worse colourings than the recursive largest first algorithm.

References

External links GCol An open-source python library for graph coloring featuring DSatur. High-Performance Graph Colouring Algorithms Suite of graph colouring algorithms (implemented in C++) used in the book A Guide to Graph Colouring: Algorithms and Applications (Springer International Publishers, 2021). C++ implementation of the DSatur Algorithm, presented as part of the article The DSatur Algorithm for Graph Coloring, Geeks for Geeks (2021)

Worked examples

Example 1 — a first encounter with DSatur

Start with the simplest possible case. Write down what DSatur 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 DSatur 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 DSatur 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 DSatur

In research
DSatur 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 DSatur 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
DSatur is common in secondary-school and first-year university syllabi. It links to neighbouring topics 1979 in computing, Graph algorithms, Graph coloring, so understanding it makes those chapters shorter.
In everyday life
Look for DSatur 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 “DSatur” →

How to study DSatur in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what DSatur 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 DSatur out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is DSatur in simple terms?

DSatur is a graph colouring algorithm put forward by Daniel Brélaz in 1979. Similarly to the greedy colouring algorithm, DSatur colours the vertices of a graph one after another, adding a previously unused colour when needed.

Why does DSatur 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 DSatur?

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 DSatur.

Tags

  • 1979 in computing
  • Graph algorithms
  • Graph coloring

Keep exploring