ArticleslgStudy

computer science

Gomory–Hu tree

Gomory–Hu tree 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 Gomory–Hu tree rather than just read about it. In short: In combinatorial optimization, the Gomory–Hu tree of an undirected graph with capacities is a weighted tree that represents the minimum s-t cuts for all s-t pairs in the graph. The Gomory–Hu tree can be constructed in |V| − 1 maximum flow computations.

Gomory–Hu tree — main illustration
Gomory–Hu tree — illustration

Key takeaways

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

Reference excerpt

In combinatorial optimization, the Gomory–Hu tree of an undirected graph with capacities is a weighted tree that represents the minimum s-t cuts for all s-t pairs in the graph. The Gomory–Hu tree can be constructed in |V| − 1 maximum flow computations. It is named for Ralph E. Gomory and T. C. Hu.

Definition Let G = ( V G , E G , c ) {\displaystyle G=(V_{G},E_{G},c)} be an undirected graph with c ( u , v ) {\displaystyle c(u,v)} being the capacity of the edge ( u , v ) {\displaystyle (u,v)} respectively.

Denote the minimum capacity of an s-t cut by λ s t {\displaystyle \lambda _{st}} for each s , t ∈ V G {\displaystyle s,t\in V_{G}} . Let T = ( V G , E T ) {\displaystyle T=(V_{G},E_{T})} be a tree, and denote the set of edges in an s-t path by P s t {\displaystyle P_{st}} for each s , t ∈ V G {\displaystyle s,t\in V_{G}} . Then T is said to be a Gomory–Hu tree of G, if for each s , t ∈ V G {\displaystyle s,t\in V_{G}}

λ s t = min e ∈ P s t c ( S e , T e ) , {\displaystyle \lambda _{st}=\min _{e\in P_{st}}c(S_{e},T_{e}),}

where

S e , T e ⊆ V G {\displaystyle S_{e},T_{e}\subseteq V_{G}} are the two connected components of T ∖ { e } {\displaystyle T\setminus \{e\}} , and thus ( S e , T e ) {\displaystyle (S_{e},T_{e})} forms an s-t cut in G.

c ( S e , T e ) {\displaystyle c(S_{e},T_{e})} is the capacity of the ( S e , T e ) {\displaystyle (S_{e},T_{e})} cut in G.

Algorithm Gomory–Hu Algorithm

Input: A weighted undirected graph G = ( ( V G , E G ) , c ) {\displaystyle G=((V_{G},E_{G}),c)}

Output: A Gomory–Hu Tree T = ( V T , E T ) . {\displaystyle T=(V_{T},E_{T}).}

Set V T = { V G } , E T = ∅ . {\displaystyle V_{T}=\{V_{G}\},\ E_{T}=\emptyset .}

Choose some X ∈ V T {\displaystyle X\in V_{T}} with |X| ≥ 2 if such X exists. Otherwise, go to step 6. For each connected component C = ( V C , E C ) ∈ T ∖ X , {\displaystyle C=(V_{C},E_{C})\in T\setminus X,} let S C = ⋃ v T ∈ V C v T . {\textstyle S_{C}=\bigcup _{v_{T}\in V_{C}}v_{T}.}

Let S = { S C ∣ C is a connected component in T ∖ X } . {\displaystyle S=\{S_{C}\mid C{\text{ is a connected component in }}T\setminus X\}.}

… excerpt ends here. Continue reading the full article.

Illustrations

Gomory–Hu tree illustration
Gomory–Hu tree illustration
Gomory–Hu tree illustration
Gomory–Hu tree illustration
Gomory–Hu tree illustration

Worked examples

Example 1 — a first encounter with Gomory–Hu tree

Start with the simplest possible case. Write down what Gomory–Hu tree 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 Gomory–Hu tree 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 Gomory–Hu tree 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 Gomory–Hu tree

In research
Gomory–Hu tree 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 Gomory–Hu tree 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
Gomory–Hu tree is common in secondary-school and first-year university syllabi. It links to neighbouring topics Combinatorial optimization, Graph algorithms, Network flow problem, so understanding it makes those chapters shorter.
In everyday life
Look for Gomory–Hu tree 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 “Gomory–Hu tree” →

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Gomory–Hu tree in 20 minutes

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

Frequently asked questions

What is Gomory–Hu tree in simple terms?

In combinatorial optimization, the Gomory–Hu tree of an undirected graph with capacities is a weighted tree that represents the minimum s-t cuts for all s-t pairs in the graph. The Gomory–Hu tree can be constructed in |V| − 1 maximum flow computations.

Why does Gomory–Hu tree 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 Gomory–Hu tree?

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 Gomory–Hu tree.

Tags

  • Combinatorial optimization
  • Graph algorithms
  • Network flow problem

Keep exploring