Gomory-Hu Tree | Set 1 (Introduction)
Last Updated :
23 Jul, 2025
Background :
In a flow network, an s-t cut is a cut that requires the source ‘s’ and the sink ‘t’ to be in different subsets, and it consists of edges going from the source’s side to the sink’s side. The capacity of an s-t cut is defined by the sum of capacity of each edge in the cut-set. (Source:
Wiki). Given a two vertices, s and t, we can
find minimum s-t cut using max flow algorithm.
Since there are total O(n
2) possible pairs, at first look it seems that there would be total O(n
2) total minimum s-t cut values. But when we use Gomory-Hu Tree, we would see that there are total n-1 different cut values [A Tree with n vertices has n-1 edges]
Popular graph problems that can be solved using Gomory-Hu Tree :
- Given a weighted and connected graph, find minimum s-t cut for all pairs of vertices. Or a problem like find minimum of all possible minimum s-t cuts.
- Minimum K-Cut problem : Find minimum weight set of edges whose removal would partition the graph to k connected components. This is a NP-Hard problem, Gomory-Hu Tree provides an approximate solution for this problem.
What is Gomory-Hu Tree?
A Gomory-Hu Tree is defined for a flow graph with edge capacity function c. The tree has same set of vertices as input graph and has n-1 (n is number of vertices) edges. Edge capacity function c' is defined using following properties:
Equivalent flow tree : For any pair of vertices s and t, the minimum s-t cut in graph is equal to the smallest capacity of the edges on the path between s and t in Tree.
Cut property : a minimum s-t cut in Tree is also a minimum cut in Graph.G
For example, consider the following Graph and Corresponding Gomory-Hu Tree.

Since there are n-1 edges in a tree with n nodes, we can conclude that there are at most n-1 different flow values in a flow network with n vertices.
We will be discussing construction of Tree in next post.
How to solve above problems using Gomory-Hu Tree is constructed?
The minimum weight edge in the tree is minimum of all s-t cuts.
We can solve the k-cut problem using below steps.
1) Construct Gomory-Hu Tree.
2) Remove k-1 minimum weight (or lightest) edges from the Tree.
3) Return union of components obtained by above removal of edges.
Below diagram illustrates above algorithm.

Note that the above solution may not always produce optimal result, but it is guaranteed to produce results within bounds of (2-2/k).
References:
https://www.corelab.ntua.gr/seminar/material/2008-2009/2008.10.20.Gomory-Hu%20trees%20and%20applications.slides.pdf
https://courses.grainger.illinois.edu/cs598csc/sp2009/lectures/lecture_7.pdf
https://cseweb.ucsd.edu/classes/fa06/cse202/Gomory-Hu%20Tree.pdf
Similar Reads
AA Trees | Set 1 (Introduction) AA trees are the variation of the red-black trees, a form of binary search tree. AA trees use the concept of levels to aid in balancing binary trees. The level of node (instead of colour) is used for balancing information. A link where child and parent's levels are same, is called a horizontal link,
3 min read
AA Trees | Set 1 (Introduction) AA trees are the variation of the red-black trees, a form of binary search tree. AA trees use the concept of levels to aid in balancing binary trees. The level of node (instead of colour) is used for balancing information. A link where child and parent's levels are same, is called a horizontal link,
3 min read
AA Trees | Set 1 (Introduction) AA trees are the variation of the red-black trees, a form of binary search tree. AA trees use the concept of levels to aid in balancing binary trees. The level of node (instead of colour) is used for balancing information. A link where child and parent's levels are same, is called a horizontal link,
3 min read
Introduction to Binary Tree Binary Tree is a non-linear and hierarchical data structure where each node has at most two children referred to as the left child and the right child. The topmost node in a binary tree is called the root, and the bottom-most nodes are called leaves. Introduction to Binary TreeRepresentation of Bina
15+ min read
Introduction of B-Tree A B-Tree is a specialized m-way tree designed to optimize data access, especially on disk-based storage systems. In a B-Tree of order m, each node can have up to m children and m-1 keys, allowing it to efficiently manage large datasets.The value of m is decided based on disk block and key sizes.One
8 min read
Introduction of Hu-Tucker algorithm Introduction of the Hu-Tucker algorithm :The Hu-Tucker algorithm helps to compress some order of blocks, assuming that you have a certain natural order for the following, then if the strings and the notes are taken into account, then taking them into account, they are sorted in numbers.The question
5 min read