ArticleslgStudy

computer science

Edmonds' algorithm

Edmonds' algorithm 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 Edmonds' algorithm rather than just read about it. In short: In graph theory, Edmonds' algorithm or Chu–Liu/Edmonds' algorithm is an algorithm for finding a spanning arborescence of minimum weight (sometimes called an optimum branching). It is the directed analog of the minimum spanning tree problem.

Key takeaways

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

Reference excerpt

In graph theory, Edmonds' algorithm or Chu–Liu/Edmonds' algorithm is an algorithm for finding a spanning arborescence of minimum weight (sometimes called an optimum branching). It is the directed analog of the minimum spanning tree problem. The algorithm was proposed independently first by Yoeng-Jin Chu and Tseng-Hong Liu (1965) and then by Jack Edmonds (1967).

Algorithm

Description The algorithm takes as input a directed graph D=⟨V,E⟩ where V is the set of nodes and E is the set of directed edges, a distinguished vertex r∈V called the root, and a real-valued weight w(e) for each edge e∈E. It returns a spanning arborescence A rooted at r of minimum weight, where the weight of an arborescence is defined to be the sum of its edge weights, w(A)=∑e∈Aw(e). The algorithm has a recursive description. Let f(D,r,w) denote the function which returns a spanning arborescence rooted at r of minimum weight. We first remove any edge from E whose destination is r. We may also replace any set of parallel edges (edges between the same pair of vertices in the same direction) by a single edge with weight equal to the minimum of the weights of these parallel edges. Now, for each node v other than the root, find the edge incoming to v of lowest weight (with ties broken arbitrarily). Denote the source of this edge by π(v). If the set of edges P={(π(v),v)∣v∈V∖{r}} does not contain any cycles, then f(D,r,w)=P. Otherwise, P contains at least one cycle. Arbitrarily choose one of these cycles and call it C. We now define a new weighted directed graph D′=⟨V′,E′⟩ in which the cycle C is "contracted" into one node as follows: The nodes of V′ are the nodes of V not in C plus a new node denoted vC.

If (u,v) is an edge in E with u∉C and v∈C (an edge coming into the cycle), then include in E′ a new edge e=(u,vC), and define w′(e)=w(u,v)−w(π(v),v). If (u,v) is an edge in E with u∈C and v∉C (an edge going away from the cycle), then include in E′ a new edge e=(vC,v), and define w′(e)=w(u,v). If (u,v) is an edge in E with u∉C and v∉C (an edge unrelated to the cycle), then include in E′ a new edge e=(u,v), and define w′(e)=w(u,v). For each edge in E′, we remember which edge in E it corresponds to. Now find a minimum spanning arborescence A′ of D′ using a call to f(D′,r,w′). Since A′ is a spanning arborescence, each vertex has exactly one incoming edge. Let (u,vC) be the unique incoming edge to vC in A′. This edge corresponds to an edge (u,v)∈E with v∈C. Remove the edge (π(v),v) from C, breaking the cycle. Mark each remaining edge in C. For each edge in A′, mark its corresponding edge in E. Now we define f(D,r,w) to be the set of marked edges, which form a minimum spanning arborescence. Observe that f(D,r,w) is defined in terms of f(D′,r,w′), with D′ having strictly fewer vertices than D. Finding f(D,r,w) for a single-vertex graph is trivial (it is just D itself), so the recursive algorithm is guaranteed to terminate.

Running time The running time of this algorithm is O(EV). A faster implementation of the algorithm due to Robert Tarjan runs in time O(Elog⁡V) for sparse graphs and O(V2) for dense graphs. This is as fast as Prim's algorithm for an undirected minimum spanning tree. In 1986, Gabow, Galil, Spencer, and Tarjan produced a faster implementation, with running time O(E+Vlog⁡V).

References

Chu, Yeong-Jin; Liu, Tseng-Hong (1965), "On the Shortest Arborescence of a Directed Graph" (PDF), Scientia Sinica, XIV (10): 1396–1400 Edmonds, J. (1967), "Optimum Branchings", Journal of Research of the National Bureau of Standards Section B, 71B (4): 233–240, doi:10.6028/jres.071b.032 Tarjan, R. E. (1977), "Finding Optimum Branchings", Networks, 7: 25–35, doi:10.1002/net.3230070103 Camerini, P.M.; Fratta, L.; Maffioli, F. (1979), "A note on finding optimum branchings", Networks, 9 (4): 309–312, doi:10.1002/net.3230090403 Gibbons, Alan (1985), Algorithmic Graph Theory, Cambridge University press, ISBN 0-521-28881-9 Gabow, H. N.; Galil, Z.; Spencer, T.; Tarjan, R. E. (1986), "Efficient algorithms for finding minimum spanning trees in undirected and directed graphs", Combinatorica, 6 (2): 109–122, doi:10.1007/bf02579168, S2CID 35618095 Buslov, V. (2023), "Algorithm for Sequential Construction of Spanning Minimal Directed Forests", Journal of Mathematical Sciences, 275: 117–129, doi:10.1007/s10958-023-06666-w

External links Edmonds's algorithm ( edmonds-alg ) – An implementation of Edmonds's algorithm written in C++ and licensed under the MIT License. This source is using Tarjan's implementation for the dense graph. NetworkX, a python library distributed under BSD, has an implementation of Edmonds' Algorithm. (spanning-forest-builder 0.0.2) – Library for constructing oriented forests of minimum weight.

Worked examples

Example 1 — a first encounter with Edmonds' algorithm

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

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

How to study Edmonds' algorithm in 20 minutes

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

Frequently asked questions

What is Edmonds' algorithm in simple terms?

In graph theory, Edmonds' algorithm or Chu–Liu/Edmonds' algorithm is an algorithm for finding a spanning arborescence of minimum weight (sometimes called an optimum branching). It is the directed analog of the minimum spanning tree problem.

Why does Edmonds' algorithm 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 Edmonds' algorithm?

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 Edmonds' algorithm.

Tags

  • Graph algorithms

Keep exploring