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

G=(VG,EG,c)

be an undirected graph with

c(u,v)

being the capacity of the edge

(u,v)

respectively.

Denote the minimum capacity of an - cut by

λst

for each

s,t\inVG

.

Let

T=(VG,ET)

be a tree, and denote the set of edges in an - path by

Pst

for each

s,t\inVG

.Then is said to be a Gomory–Hu tree of, if for each

s,t\inVG

\lambda_ = \min_ c(S_e, T_e),where

Se,Te\subseteqVG

are the two connected components of

T\setminus\{e\}

, and thus

(Se,Te)

forms an - cut in .

c(Se,Te)

is the capacity of the

(Se,Te)

cut in .

Algorithm

Gomory–Hu Algorithm

Input: A weighted undirected graph

G=((VG,EG),c)

Output: A Gomory–Hu Tree

T=(VT,ET).

  1. Set

VT=\{VG\},ET=\empty.

  1. Choose some

X\inVT

with if such exists. Otherwise, go to step 6.
  1. For each connected component

C=(VC,EC)\inT\setminusX,

let S_C = \bigcup_ v_T.

Let

S=\{SC\midCisaconnectedcomponentinT\setminusX\}.

Contract the components to form

G'=((VG',EG'),c'),

where:\begin V_ &= X \cup S \\[2pt] E_ &= E_G|_ \cup \ \\[2pt] & \qquad \qquad \quad\! \cup \ \end

c':VG' x VG'\toR+

is the capacity function, defined as:\begin &\text\ (u,S_C) \in E_G|_: &&c'(u,S_C) = \!\!\! \sum_ \!\!\! c(u,v) \\[4pt] &\text\ (S_,S_) \in E_G|_: &&c'(S_,S_) = \!\!\!\!\!\!\! \sum_ \!\!\!\!\! c(u,v) \\[4pt] &\text: &&c'(u,v) = c(u,v)\end
  1. Choose two vertices and find a minimum cut in .

Set

A=

l(cup
SC\inA'\capS

SCr)\cup(A'\capX),

B=

l(cup
SC\inB'\capS

SCr)\cup(B'\capX).

  1. Set

VT=(VT\setminusX)\cup\{A\capX,B\capX\}.

For each

e=(X,Y)\inET

do:
  1. Set

e'=(A\capX,Y)

if

Y\subsetA,

otherwise set

e'=(B\capX,Y).

  1. Set

ET=(ET\setminus\{e\})\cup\{e'\}.

  1. Set

w(e')=w(e).

Set

ET=ET\cup\{(A\capX,B\capX)\}.

Set

w((A\capX,B\capX))=c'(A',B').

Go to step 2.

  1. Replace each

\{v\}\inVT

by and each

(\{u\},\{v\})\inET

by . Output .

Analysis

Using the submodular property of the capacity function, one hasc(X) + c(Y) \ge c(X \cap Y) + c(X \cup Y).Then it can be shown that the minimum cut in is also a minimum cut in for any .

To show that for all

(P,Q)\inET,

w(P,Q)=λpq

for some, throughout the algorithm, one makes use of the following Lemma,

For any in,

λik\gemin(λij,λjk).

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

  1. green circles are vertices of T.
  2. red and blue circles are the vertices in G'.
  3. grey vertices are the chosen s and t.
  4. red and blue coloring represents the s-t cut.
  5. dashed edges are the s-t cut-set.
  6. A is the set of vertices circled in red and B is the set of vertices circled in blue.

Notes and References

  1. 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 .
  2. 10.1137/0219009 . Gusfield . Dan . Very Simple Methods for All Pairs Network Flow Analysis . SIAM J. Comput. . 19 . 1 . 143–155 . 1990.
  3. Goldberg. A. V.. Tsioutsiouliklis, K.. Cut Tree Algorithms: An Experimental Study. Journal of Algorithms. 2001. 38. 1. 51–83. 10.1006/jagm.2000.1136 .
  4. 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.
  5. 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. .