0% found this document useful (0 votes)
562 views9 pages

A Note On Goldberg and Rao Algorithm For The Maximum Flow Problem

The document summarizes Goldberg and Rao's algorithm for solving the maximum flow problem. It begins with an abstract briefly describing the algorithm. It then provides a 1 paragraph introduction to the maximum flow problem and previous algorithms. The body of the document includes: - Definitions of flows, residual capacities, and blocking flows. - A proof of the max-flow min-cut theorem. - An overview of Goldberg and Rao's algorithm, which uses the concept of admissible graphs and length functions to improve the running time bound compared to previous algorithms. - Details of the length function and proofs of lemmas used in Goldberg and Rao's analysis.

Uploaded by

thangmle
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
562 views9 pages

A Note On Goldberg and Rao Algorithm For The Maximum Flow Problem

The document summarizes Goldberg and Rao's algorithm for solving the maximum flow problem. It begins with an abstract briefly describing the algorithm. It then provides a 1 paragraph introduction to the maximum flow problem and previous algorithms. The body of the document includes: - Definitions of flows, residual capacities, and blocking flows. - A proof of the max-flow min-cut theorem. - An overview of Goldberg and Rao's algorithm, which uses the concept of admissible graphs and length functions to improve the running time bound compared to previous algorithms. - Details of the length function and proofs of lemmas used in Goldberg and Rao's analysis.

Uploaded by

thangmle
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

A Note on Goldberg and Rao Algorithm

For The Maximum Flow Problem


Thang M. Le
[email protected]

Abstract
This paper is devoted to Goldberg & Rao algorithm [9]. Based on the rather old blocking flow method,
the algorithm takes a new approach to the maximum flow problem by means of the length function. The
result is the maximum flow problem on general graphs acquires important characters of the problem on
unit capacity graphs leading to the better upper bound of where
is the number of edges, is the number of vertices and is the maximum arc capacity. The new upper
bound breaks the natural barrier of the max-flow problem and closes the gap between integral
capacity graphs and unit capacity graphs. Established in 1998, the new upper bound has lasted for more
than a decade and is the absolute running time for algorithms which operate based on the blocking flow
method. Assessing its outstanding performance, we carefully study the algorithm and express various
discussions to its approach.

1. Introduction
Finding the maximum flow in a network is a classical combinatorial problem. The topic was first studied
in 1951 by Dantzig [3] to solve the transportation problem during World War II using the network
simplex method which achieves . In 1956, Ford & Fulkerson [7] extensively studied the
problem and discovered its primal-dual Max-flow-Min-Cut theorem. In the same effort, they presented
the augmenting path method which achieves pseudo-polynomial running time. In 1970, Dinitz
[4] developed an algorithm (refer to [5] for the English version). The idea is to use augmenting
path and maintain the layered network at each phase. Karzanov [13] took a different approach which is
later known as the blocking flow method to find the maximum flow. Karzanov’s algorithm runs in .
In 1988, Goldberg & Tarjan [10] developed a better algorithm called push-relabel (a.k.a push-relabel
method) which achieves . The augmenting path method, the blocking flow method and
the push-relabel method are important building blocks of G-R algorithm. For a complete survey of the
maximum flow problem and its algorithms, refer to [1, 2, 14, 15].

Since its publication, the push-relabel algorithm stayed on top of other algorithms as the most efficient
algorithm for the maximum flow problem. On the other hand, finding the maximum flow on unit capacity
graphs is more efficient. Even and Tarjan [6] reported Dinitz’s algorithm achieves
on these graphs. The running time gap of the max-flow problem on the two different categories
remained open until Goldberg & Rao [9] announced their groundbreaking algorithm which closed the gap
and established the better upper bound of . Our study on
Goldberg & Rao (G-R) algorithm is organized as follow: we briefly go through some definitions and
important theorems of the maximum flow problem in Section 2. Section 3 discusses G-R algorithm in
detail. For a better understanding purpose, we give more clarifications to existing proofs when in need.
We then conclude and overlook the future of the algorithm for the max-flow problem in Section 4.

1
2. The Maximum Flow Problem
Flows in networks [8] is formally described as follow: Given a network with vertex s is the
source and vertex t is the sink, suppose each arc associates with it a non-negative real number
, we call is the capacity of the arc . A valid flow is defined as a function which
satisfies these two equations:
 Capacity constraint:
 Flow conservation: ∑ ∑

An arc is saturated with respect to a flow if . Based on this definition, we


define residual capacity of an arc , , with respect to flow to be
. An arc is a residual arc if . A graph contains only residual arcs is a
residual graph. A flow is blocking if every path from source s to sink t, s-t, of the flow has at least one
saturated arc.

Theorem 2.1 (Max-flow Min-cut) For any network the maximal flow value from s to t is equal to the
minimal cut capacity of all cuts separating s and t
Proof: We are going to prove by contradiction. Let is a maximal flow value, is a minimal cut-set.
Let denote a capacity of flow and denotes a capacity of minimal cut-set . Hence,
is the maximal flow value and is the minimal cut capacity.
 let us remove all arcs in from the graph. Since u , there must
exist a flow from s to t with capacity . Hence, s and t are still
connected. This contradicts the definition of a cut-set.
 since is maximal flow, each path s-t of the flow has at least one saturated
arc. On each path s-t of the flow , let remove a saturated arc. The result is s and t is
disconnected. Otherwise, there would exist a path of unsaturated arcs from s to t. Thus, this path
would represent a valid flow which contradicts is the maximal flow. By definition of a cut-
set, these saturated arcs form a valid cut-set separating s from t. Hence, we have ( )
. This contradicts is the minimal cut capacity.
s
3 4 Min cut
1 b
a 3

3 3
2

c d
4 3

t
Figure 1. Max-flow Min-cut

Corollary 2.2 A flow is maximal if and only if there is no flow augmenting path with respect to
Proof: Ford & Fulkerson [8]

Lemma 2.3 Augmenting along a complete blocking flow increases the distance between s and t
Proof: Dinitz [4] gave a proof to this lemma in the framework of layered networks. Also, refer to [12] for
an alternative proof.

2
3. Goldberg & Rao Algorithm
G-R algorithm is designed to run on a directed acyclic graph with integral capacity function
where is the maximal capacity of any arc . Within the context of this paper,
we use the term “general graphs” to refer to graphs defined above. The blocking flow method was first
studied by Karzanov [13] under the method of preflows. The idea is to reduce the maximum flow problem
to a problem of finding a set of blocking flows in a given graph. The blocking flow method is a method to
find the maximum flow value by means of finding a set of blocking flows in a given graph. An algorithm
adopting the blocking flow method to solve the maximum flow problem generally has its runtime under
this form where:

 : is the number of times required to run the blocking flow algorithm. Many blocking
flow algorithms for the max-flow problem define a phase as a blocking flow which has all paths
of the same length. By Corollary 2.2, is bounded by on general graphs. However,
on unit capacity graphs, the problem enjoys a better bound of [6]. Later,
Golberg and Rao [9] successfully closed this gap and established the new bound of
on general graphs.

 : the cost of finding a blocking flow in a residual graph and


maintaining the residual graph in each phase. In Dinitz’s algorithm, this cost is bounded by
. In Karzanov’s algorithm, it requires . Push-relabel algorithm also has its running
time no more than [10]. With the use of “smart” data structure by mean of dynamic tree
[16], the cost of push-relabel was redefined to be [10, 11].

Unlike other algorithms, G-R algorithm does not find blocking flows in residual graphs. Instead, the
algorithm defines an admissible graph which is a sub-graph of the residual graph and runs blocking flow
algorithm on the admissible graph to find a blocking flow. Admissible graphs combined with the use of
length function posses some nice properties which help to achieve the improvement on in
general graphs as stated above. In what follows, we will closely study relations of G-R algorithm on
general graphs and Dinitz’s algorithm on unit capacity graph by comparing the time bound analysis of the
two algorithms. Learning these relations will help to understand how the gap was closed and various
leverages of G-R algorithm.

3.1. Length Functions

G-R algorithm defines the length function and reduced cost as follow:

Definition 3.1 Let a function and a distance labeling function . We say is a


distance labeling with respect to if and for any arc ,

Definition 3.2 A reduced cost of is defined by

Lemma 3.1 Let be a path from i to t, then where is the


distance with respect to from i to t.
Proof: immediately follows Definition 3.2

Lemma 3.2 Given a flow , a length , and a distance label , such that , the residual flow

value is at most for

3
Proof: Let be the maximum flow, then represents residual flow. We need to prove
∑ for .
Let be a valid path retrieved from the residual flow. Let . Let be a saturated arc on path
. Then, . By Lemma 2.3, we have . Hence, below inequality holds:
∑ ∑
Do the same for other paths in the residual flow. Finally, we add all inequalities side by side. We then
obtain: ∑ for .

Among different length functions, binary length function yields the best upper. This will be clarified in
the analysis of G-R algorithm. Specifically, the binary length function used in G-R algorithm is defined as
follow:

In addition, an arc is special if and . We define the new function ̅


which is equal to zero on the special arcs and equal to on all other arcs.
The following scrutiny is important to the correctness of G-R algorithm. The algorithm claims the use of
the binary length function as described above does not break the property of Lemma 2.3. First, we give a
definition of admissible arcs as follow:

Definition 3.3 Given a flow , a length function , and a distance labeling , a residual arc is
admissible if
A set of all admissible arcs is denoted by and the induced admissible graph is denoted by
. We now prove the execution of a blocking flow algorithm on the graph
increases the distance s and t. Let consider and be the flow and length function immediately before
augmenting flow in and and are the flow and the length function immediately after.

Lemma 3.3 is a distance labeling with respect to


Proof: By Lemma 3.1:
where is the path from i to t.
and where is the path from j to t.
By Definition 3.2, the reduced cost of is . This allows us to replace
with . Thus, we have:

.
We now examine these cases:
 :
 :
 : this happens only arc is not admissible, hence, by Definition 3.3,
. This implies

In all cases, we obtain . By Definition 3.1, is a distance with respect to

Corollary 3.4

4
Proof: By Lemma 3.1 and Lemma 3.3
We now prove Theorem 3.5 which is a stronger version of Lemma 3.3.

Theorem 3.5 Let is a blocking flow in . Then is strictly less than .


Proof: refer to [9] for a complete proof.

Theorem 3.5 takes an important role in the correctness as well as the fundamental improvement on the
running time for G-R algorithm. By choosing a proper binary length function based on some threshold,
the algorithm achieves some advantages as follow:
 Blocking flow algorithm runs on an admissible graph which is a sub-graph of the residual graph.
However, the use of the binary length function leaves cycles of zero-length arcs in admissible
graphs. Soon we will see that cycles of zero length arcs are not allowed in G-R algorithm and
must be contracted altogether.

 By Lemma 3.2, the residual flow value . Zero-length arcs help to achieve the best
upper bound, which endorses the binary length function is a better choice among other length
functions.

3.2. Analysis of G-R Algorithm

The algorithm is compressed within six steps but encapsulates an appealing method which shows the
relations in term of running time analysis of the max-flow problem on general graphs and the problem on
unit capacity graphs. Before stating the steps of the algorithm, we define canonical cut as follow: for
, let and let . Then, represents a canonical cut.
Below are the steps of the algorithm:
Stage:
1. Compute ̅ ̅ where ̅ ̅ is a canonical cut which has the smallest residual capacity. If
̅ ̅ , terminate the stage, update F and the current cut
Update steps:
2. Compute ̅
3. Contract strongly connected components of ̅ ̅ induced by zero length arcs
4. In the resulting graph, find a blocking flow or a flow of value .
5. Augment the current flow and update the flow in the original graph
6. Compute and
The execution of G-R algorithm is divided into stages. While the original paper uses the word “phase” in
step1, we choose to use the word “stage” here to distinguish from which is mentioned above. A
stage involves update steps from step2 to step6. Once the algorithm finds the smallest canonical cut
which has residual capacity less than half of the current bounded value , this marks the end of a stage
and new stage starts with the updated bounded value. As soon as the bound value on the stage falls below
one and since all arcs have integral capacity values, the algorithm terminates and the current flow is a
maximal flow. In order to end one stage and go to a next stage, the algorithm necessarily performs update
steps in a number of iterations. Each iteration finds a valid blocking flow in the admissible graph, hence,
decreases the residual flow value. We will soon see the number of iterations required to end a stage is
bounded. Due to the contraction happens in admissible graphs, the algorithm must assure the blocking
flow is feasible in the original graph by limiting to at most capacity of the blocking flow and returning
the difference from the sink t to the source s. G-R algorithm has the running time bound for each step as
follow:

5
 Computing ̅̅̅ ̅̅̅ for all requires . We can loosely give an upper
bound for step1 to be . Since each arc has capacity strictly less than , the maximum
capacity of a canonical cut on residual graphs is at most . Each phase reduces this capacity by
half. Hence, total number of executions of step1 is . However, we will show later that
with a careful analysis, we can achieve a better upper bound which is .
 Step2 and Step6, each runs in linear time using Dial’s algorithm.
 With the special data structure described, step3 can be bounded with .
 Step4 uses the best known blocking flow algorithm which runs in [11]. In
addition, returning the extra flow to the source takes .
 Step5 which requires augmenting the current flow and updates the flow in the original graph in
linear time.
Next, we show the two important time bounds on G-R algorithm. We also demonstrate the analysis used
in G-R algorithm on general graphs can be applied to Dinitz’s algorithm on unit capacity graphs to
achieve similar results.

Lemma 4.2.a Dinitz’s algorithm on unit capacity graphs – Let be a capacity of all arcs, and let be
a current distance of s and t, the residual flow value is at most
Proof: By Lemma 2.3, each flow in residual graph has its length at least . Since all arcs have the same
capacity, each arc can only be in one flow. There are total arcs. Hence, there are at most flows.
Each arc has capacity. Since the graph is acyclic, the capacity of a flow is also . Therefore, the
residual flow value

Lemma 4.2.b G-R algorithm on general graphs - For a 0-1 length function on the residual graph
̅ ̅

Proof: Using the analysis in Lemma 4.2.a, however, we obtain the upper bound for ̅ ̅ where ̅ ̅
is a canonical cut instead of the upper bound for the residual flow value as in Lemma 4.2.a. By Theorem
3.5, a blocking flow of residual graph has at least of arcs. Since is 0-1 length function, each arc
can only cross one of the canonical cut. Hence, there are at most number of paths crossing a
canonical cut. is the maximum residual capacity of any 1-length arc, therefore, each path can carry at
most . There are at most paths crossing a canonical cut. Hence: ̅ ̅

Lemma 4.3.a Dinitz’s algorithm on unit capacity graphs - Let be a capacity of all arcs, and let be
a distance of s and t, the residual flow value is at most ( )
Proof: Let be the set of vertices at distance from where . is a canonical cut. Since the
graph is acyclic and each arc has capacity , therefore, for any valid :

There are total of values of . Since the graph is acyclic, ∑ . Hence, there are at most
values of such that .Thus, there are at least ⌈ ⌉ values of where . By
pigeonhole principle, there exists a pair such that and

Therefore, ( )

6
Lemma 4.3.b G-R algorithm - For a 0-1 length function on the residual graph
̅ ̅ ( )

Proof: The proof of Lemma 4.3.a can be correctly applied here. Refer to the proof of Lemma 6.2 in [9]
for a full detail.
The inequalities in Lemma 4.2.a and Lemma 4.3.a on unit capacity graphs are similar to the inequalities in
Lemma 4.2.b and Lemma 4.3.b on general graph respectively. For this relation to hold, G-R algorithm
gives up the upper bounds on the capacity of the residual graph to only focus on the upper bounds on the
capacity of the residual graph with respect to its canonical cuts. Doing this takes advantage of an
admissible arc crosses only one canonical cut in the admissible graph. This characteristic is identical to an
arc can involve in at most one path of the residual flow in the case of unit capacity graphs. Moreover, it is
necessary to state that admissible graphs on which the blocking flow algorithm runs must be acyclic. This
constraint is rudimentary as it is one of the basic assumptions when proving the upper bounds on the
residual capacity of canonical cuts in Lemma 4.2.b and Lemma 4.3.b. By assigning zero values on large
capacity arcs and considering arc where as an admissible arc, an
admissible graph might have cycles, which violates the constraint. Clearly, these cycles are only cycles of
zero-length arcs with the same . Hence, contracting strongly connected components induced by zero
length arcs makes admissible graphs acyclic. Contracting and directing flow through contracted arcs are
important steps of G-R algorithm. These steps were discussed in detail in [9], hence, we shall skip them
here.
Lemma 4.2.b and Lemma 4.3.b combined with the binary length function give the upper bound on the
number of update steps required to find a canonical cut ̅ ̅ such that ̅ ̅ . Initially, G-R
algorithm chooses to be the current canonical cut and initializes . To get the desired
abound, set (⌈ ⌉ ⌈ ⌉).

Lemma 4.4 For the binary blocking flow algorithm


 For ⌈ ⌉, it requires update steps to find ̅ ̅ such that ̅ ̅
 For ⌈ ⌉, it requires update steps to find ̅ ̅ such that ̅ ̅
Proof: refer to the proof of Lemma 6.3 in [9]

Lemma 4.5 number of step1 required for G-R algorithm is


Proof:
 : every step1 reduces by half and (⌈ ⌉ ⌈ ⌉), hence, number of step1
is
 :
o . Hence, . By Lemma 4.2.b, ̅ ̅ . Since each
blocking flow increases , after at most update steps, . Therefore,
. This implies after at most update steps
o . Hence, . By Lemma 4.3.b, ̅ ̅ ( ) . Since
each blocking flow increases , after at most update steps, .
Therefore, . This implies after at most update steps
Hence, it requires min( ) update steps to reduce , which means the
algorithm needs of step1 to reduce

7
In both cases, number of step1 required before G-R terminates is at most

Lemma 4.6 G-R algorithm runs in


Proof: By G-R algorithm, Lemma 4.2.b, Lemma 4.3.b, Lemma 4.4, Lemma 4.5, the proof is completed.

4. Conclusion
More than just a polynomial time improvement, G-R algorithm provides an adaptive and pluggable
solution to the max-flow problem on general graphs. The algorithm constructs a method to associate the
maximum flow problem on general graphs with the problem on unit capacity graphs. Since unit capacity
graphs are special cases of the max-flow problem, solving the problem on these graphs generally achieves
a better running time than solving the problem on general graphs. The best known running time for the
problem on unit capacity graphs is . Given a unit capacity graph, let denote
be a number of times required to run a blocking flow algorithm and be the cost
of any blocking flow algorithm. In [6], Even and Tarjan obtained various upper bounds on
independently from any use of blocking flow algorithm. Based on this observation, we formulate the
running time for the max-flow problem on unit capacity graph as . Using
the method of G-R algorithm, the formula can be extended for general graphs as
where is the upper bound capacity of any arcs and is the cost of
any blocking flow algorithm on general graphs. Under this formula, the max-flow problem on general
graphs is effectively broken down into two sub-problems: finding the optimized value for
on unit capacity graphs and constructing an optimized blocking flow algorithm on general graphs. Any
improved result on these two sub-problems is immediately available to G-R algorithm. Unless a new
algorithm is taking a revolutionary approach which is much different than the blocking flow method, it
would be much difficult for any blocking flow algorithm to compete with G-R algorithm.

References

[1] G.M. Adel'son-Vel'ski, E.A. Dinic and A.V. Karzanov, Flow Algorithms, Nauka, Moscow, CIS (in
Russian), 1975.
[2] R.K. Ahuja, T.L. Magnanti, J.B. Orlin, Network flows: Theory, Algorithms and Applications, Prentice
Hall, N.J., 1993.
[3] G.B. Dantzig, Application of the simplex method to a transportation problem, In Activity Analysis
and Production and Allocation, Wiley, New York, pp. 359-373, 1951.
[4] E.A. Dinic, Algorithm for solution of a problem of maximum flow in networks with power estimation,
Soviet Math. Dokl. 11, 1970, pp. 1277-1280.
[5] E.A Dinitz, Dinitz’ Algorithm: The Original Version and Even’s Version, Lecture Notes in Computer
Science, 2006, Volume 3895/2006, pp. 218-240, http://www.cs.bgu.ac.il/~dinitz/Papers/Dinitz_alg.pdf.
[6] S. Even and R.E Tarjan, Network Flow and Testing Graph Connectivity, SIAM J. on Computing,
Vol.4, No.4, 1975, pp. 507-518.
[7] L.R. Ford and D.R. Fulkerson, Maximal flow through a network, Canadian Journal of Mathematics, 8,
1956, pp. 399-404.
[8] L.R. Ford and D.R. Fulkerson, Flows in Networks, Princeton Univ. Press, Princeton, N.J., 1962.
[9] A.V. Goldberg and S. Rao, Beyond the Flow Decomposition Barrier, Journal of the ACM, Vol.15,
No.5, 1998, pp. 783-797.

8
[10] A.V. Goldberg and R.E. Tarjan, A new approach to the maximum-flow problem, Journal of the
ACM, Vol.35, No.4, 1988, pp. 921-940.
[11] A.V. Goldberg and R.E. Tarjan, Finding Minimum-Cost Circulations by Successive Approximation,
Mathematics of Operations Research, Vol.15, No.3, 1990, pp. 430-466.
[12] David Karger, Blocking flows, Course Lecture Notes, MIT,
http://courses.csail.mit.edu/6.854/06/scribe/scribe11.pdf
[13] A.V. Karzanov, Determining the maximal flow in a network by the method of preflows, Soviet
Math. Dokl. 15, 1974, pp. 434-437.
[14] A. Schrijver, On the history of the transportation and maximum flow problems
[15] M. Shigeno, A survey of combinatorial maximum flow algorithms on a network with gains,
http://infoshako.sk.tsukuba.ac.jp/~tosho//dp1061.pdf
[16] D.D. Sleator and R.E. Tarjan, A Data Structure for Dynamic Trees, Journal of Computer and System
Sciences, Vol. 26, No. 3, 1983, pp. 362-391.

You might also like