Gomory–Hu tree explained
In combinatorial optimization, the Gomory–Hu tree[1] 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 maximum flow computations. It is named for Ralph E. Gomory and T. C. Hu.
Definition
Let
be an undirected graph with
being the capacity of the edge
respectively.
Denote the minimum capacity of an - cut by
for each
.
Let
be a tree, and denote the set of edges in an - path by
for each
.Then is said to be a
Gomory–Hu tree of, if for each
where
are the two connected components of
, and thus
forms an - cut in .
is the capacity of the
cut in .
Algorithm
Gomory–Hu Algorithm
Input: A weighted undirected graph
Output: A Gomory–Hu Tree
- Set
- Choose some
with if such exists. Otherwise, go to step 6.
- For each connected component
let
Let
S=\{SC\midCisaconnectedcomponentinT\setminusX\}.
Contract the components to form
where:
is the capacity function, defined as:
- Choose two vertices and find a minimum cut in .
Set
- Set
VT=(VT\setminusX)\cup\{A\capX,B\capX\}.
For each
do:
- Set
if
otherwise set
- Set
ET=(ET\setminus\{e\})\cup\{e'\}.
- Set
Set
ET=ET\cup\{(A\capX, B\capX)\}.
Set
w((A\capX,B\capX))=c'(A',B').
Go to step 2.
- Replace each
by and each
by . Output .
Analysis
Using the submodular property of the capacity function, one hasThen it can be shown that the minimum cut in is also a minimum cut in for any .
To show that for all
for some, throughout the algorithm, one makes use of the following Lemma,
For any in,
The Lemma can be used again repeatedly to show that the output satisfies the properties of a Gomory–Hu Tree.
Example
The following is a simulation of the Gomory–Hu's algorithm, where
- green circles are vertices of T.
- red and blue circles are the vertices in G'.
- grey vertices are the chosen s and t.
- red and blue coloring represents the s-t cut.
- dashed edges are the s-t cut-set.
- A is the set of vertices circled in red and B is the set of vertices circled in blue.
Notes and References
- Gomory . R. E. . Ralph E. Gomory . Hu . T. C. . T. C. Hu . Multi-terminal network flows . Journal of the Society for Industrial and Applied Mathematics . 9 . 4. 551–570 . 1961 . 10.1137/0109047 .
- 10.1137/0219009 . Gusfield . Dan . Very Simple Methods for All Pairs Network Flow Analysis . SIAM J. Comput. . 19 . 1 . 143–155 . 1990.
- Goldberg. A. V.. Tsioutsiouliklis, K.. Cut Tree Algorithms: An Experimental Study. Journal of Algorithms. 2001. 38. 1. 51–83. 10.1006/jagm.2000.1136 .
- Cohen . Jaime . Rodrigues . Luiz A. . Silva . Fabiano . Carmo . Renato . Guedes . André Luiz Pires . Duarte . Jr., Elias P. . Xiang . Yang . Cuzzocrea . Alfredo . Hobbs . Michael . Zhou . Wanlei . Parallel implementations of Gusfield's cut tree algorithm . 10.1007/978-3-642-24650-0_22 . 258–269 . Springer . Lecture Notes in Computer Science . Algorithms and Architectures for Parallel Processing – 11th International Conference, ICA3PP, Melbourne, Australia, October 24–26, 2011, Proceedings, Part I . 7016 . 2011.
- Hartvigsen . D. . Mardon . R. . 10.1137/S0895480190177042 . 3 . SIAM J. Discrete Math. . 403–418 . The all-pairs min cut problem and the minimum cycle basis problem on planar graphs . 7 . 1994. .