Professional Documents
Culture Documents
informs
INFORMS holds copyright to this article and distributed this copy as a courtesy to the author(s).
Additional information, including rights and permission policies, is available at http://journals.informs.org/.
doi 10.1287/opre.1080.0572
2009 INFORMS
Dorit S. Hochbaum
Department of Industrial Engineering and Operations Research, and Walter A. Haas School of Business,
University of California, Berkeley, California 94720, hochbaum@ieor.berkeley.edu
We present the results of a computational investigation of the pseudoow and push-relabel algorithms for the maximum ow
and minimum s-t cut problems. The two algorithms were tested on several problem instances from the literature. Our results
show that our implementation of the pseudoow algorithm is faster than the best-known implementation of push-relabel
on most of the problem instances within our computational study.
Subject classications: ow algorithms; parametric ow; normalized tree; lowest label; pseudoow algorithm;
maximum ow.
Area of review: Optimization.
History: Received January 2006; revisions received April 2007, December 2007; accepted March 2008. Published online
in Articles in Advance January 21, 2009.
1. Introduction
Among algorithms for the max-ow and min-cut problems, the push-relabel algorithm (sometimes referred to
as the preow-push algorithm) of Goldberg and Tarjan
(1988) performs well in theory as well as in practice. The
complexity of this algorithm (for the max-ow and mincut problems) is Onm logn2 /m, using the dynamic trees
data structure of Sleator and Tarjan (1983). Several studies
have shown push-relabel to be computationally very efcient (for example, Ahuja et al. 1997, Anderson and Setubal
1993, Derigs and Meier 1989, Goldberg and Cherkassky
1997). The highest-level variant of the push-relabel algorithm was found to have the best performance in practice
(see Goldberg and Cherkassky 1997 and Ahuja et al. 1993,
p. 242).
Hochbaum (2008) introduced the pseudoow algorithm
for the maximum ow problem, based on an algorithm
of Lerchs and Grossman (1965) for the maximum closure problem. A lowest-label variant of the pseudoow
algorithm has the strongly polynomial complexity of
Onm log n using dynamic trees. Anderson and Hochbaum
(2002) introduced the highest-label pseudoow variant that
has the same strongly polynomial complexity, and performed an extensive computational study comparing the
pseudoow algorithm to push-relabel. The highest-label
pseudoow algorithm was found to perform competitively
with push-relabel on many problem instances.
The pseudoow algorithm can be initialized with any
pseudoow. A straightforward variation of the push-relabel
algorithm can also be started with any pseudoow.
Chandran and Hochbaum: A Computational Study of the Pseudoow and Push-Relabel Algorithms
INFORMS holds copyright to this article and distributed this copy as a courtesy to the author(s).
Additional information, including rights and permission policies, is available at http://journals.informs.org/.
2. Preliminaries
Let Gst be a graph Vst Ast , where Vst = V
s t and
Ast = A As At , in which As and At are the sourceadjacent and sink-adjacent arcs, respectively. The number
of nodes Vst is denoted by n, whereas the number of arcs
Ast is denoted by m. A ow vector f =
fij i jAst is said
to be feasible if it satises:
(i) Flow balance constraints: For each j V , i jAst
fij = j kAst fjk (i.e., inow(j) = outow(j)), and
(ii) Capacity constraints: The ow value is between the
lower-bound and upper-bound capacity of the arc, i.e.,
lij fij uij . We assume henceforth that lij = 0.
A maximum ow is a feasible ow f that maximizes
the ow out of the source (or into the sink). The value of
the maximum ow is s iAs fsi .
Given a capacity-feasible ow, an arc i j is said to be
a residual arc if i j Ast and fij < cij or j i Ast and
fji > 0. For i j Ast , the residual capacity of arc i j
with respect to the ow f is cijf = cij fij , and the residual
capacity of the reverse arc j i is cjif = fij . Let Af denote
the set of residual arcs for ow f in Gst , which are all arcs
or reverse arcs with positive residual capacity.
A preow is a ow vector that satises capacity constraints, but inow into a node is allowed to exceed the
outow. The excess of a node v V is the inow into that
node minus the outow denoted by ev = u vAst fuv
v wAst fvw . A pseudoow is a ow vector that satises capacity constraints but may violate ow balance in
either direction (inow into a node need not equal outow).
A negative excess is called a decit.
359
is allowed to exceed its outow. A node with strictly positive excess is said to be active.
Each node v is assigned a label lv that satises
(i) lt = 0, and (ii) lu lv + 1 if u v Af . A residual arc u v is said to be admissible if lu = lv + 1.
Initially, all nodes are assigned a label of zero, and
source-adjacent arcs are saturated creating a set of sourceadjacent active nodes (all other nodes have zero excess).
An iteration of the algorithm consists of selecting an active
node in V , and attempting to push its excess to its neighbors
along an admissible arc. If no such arc exists, the nodes
label is increased by one. The algorithm terminates with a
maximum preow when there are no more active nodes with
label less than n. The set of nodes of label n then forms
the source set of a minimum cut, and the current preow is
maximum in that it sends as much ow into the sink node as
possible. This ends Phase 1 of the push-relabel algorithm.
In Phase 2, the algorithm transforms the maximum preow
into a maximum ow. In practice, Phase 2 is much faster
than Phase 1. A high-level description of the push-relabel
algorithm is shown in Figure 1.
In the highest-label and lowest-label variants, an active
node with highest and lowest labels, respectively, are chosen for processing at each iteration. In the FIFO variant, the
active nodes are maintained as a queue in which nodes are
added to the queue from the rear and removed from the
front for processing.
The generic version of the push-relabel algorithm runs
in On2 m time. Using the dynamic trees data structure of
Sleator and Tarjan (1983), the complexity is improved to
Onm logn2 /m.
Two heuristics that are employed in practice signicantly
improve the running time of the algorithm:
1. Gap relabeling: If the label of an active node is l and
there are no nodes of label l 1, the sink is no longer reachable through this node. The node is now known to be in
Figure 1.
/*
Generic push-relabel algorithm for maximum ow. The nodes
with label equal to n at termination form the source set of the
minimum cut.
*/
procedure push-relabel Vst Ast c:
begin
Set the label of s to n and that of all other
nodes to 0;
Saturate all arcs in As ;
while there exists an active node u V of
label less than n do
if there exists an admissible arc u v do
f
Push a ow of min
eu cuv
along arc u v;
else do
Increase label of u by 1 unit;
end
INFORMS holds copyright to this article and distributed this copy as a courtesy to the author(s).
Additional information, including rights and permission policies, is available at http://journals.informs.org/.
360
Chandran and Hochbaum: A Computational Study of the Pseudoow and Push-Relabel Algorithms
the source set, and this node and all its arcs are removed
from the graph for the rest of Phase 1 of the algorithm.
2. Global relabeling: The labels of the nodes are periodically recomputed by nding the distance of each node from
the sink in the residual graph. This tightens the labels and
leads to signicantly improved performance in practice.
Once a minimum cut has been identied, a feasible
ow is recovered by ow decomposition (discussed in 5).
In practice, the time for Phase 1 dominates the time for
Phase 2.
4.1. Initialization
In this section, we provide a description of the pseudoow algorithm. Our description here is different from that
in Hochbaum (2008), although the algorithm itself is the
same. This description uses terminology and concepts similar in spirit to push-relabel to help clarify the similarities
and differences between the two algorithms.1
The rst step in the pseudoow algorithm, called the
min-cut stage, nds a minimum cut in Gst . Source-adjacent
and sink-adjacent arcs are saturated throughout this stage
of the algorithm; consequently, the source and sink have no
role to play in the min-cut stage.
The algorithm may start with any other pseudoow that
saturates arcs in As At . Other than that, the only requirement of this pseudoow is that the collection of free arcs
namely, the arcs that satisfy lij < fij < uij form an acyclic
graph.
Each node in v V is associated with at most one current
arc u v Af ; the corresponding current node of v is
denoted by currentv = u. The set of current arcs in the
graph satises the following invariants at the beginning of
every major iteration of the algorithm:
Property 1. (a) The graph does not contain a cycle of
current arcs.
(b) If ev = 0, then node v does not have a current arc.
Each node is associated with a root that is dened constructively as follows: starting with node v, generate the
sequence of nodes
v v1 v2 vr dened by the current
arcs v1 v v2 v1 vr vr1 until vr has no current
arc. Such a node vr always exists because otherwise a cycle
will be formed, which would violate Property 1(a). Let the
unique root of node v be denoted by rootv. Note that if
a node v has no current arc, then rootv = v.
The set of current arcs forms a current forest. Dene a
component of the forest to be the set of nodes that have
the same root. It can be shown that each component is a
directed tree, and the following properties hold for each
component:
Property 2. In each component of the current forest,
(a) the root is the only node without a current arc,
(b) all current arcs are pointed away from the root.
Chandran and Hochbaum: A Computational Study of the Pseudoow and Push-Relabel Algorithms
INFORMS holds copyright to this article and distributed this copy as a courtesy to the author(s).
Additional information, including rights and permission policies, is available at http://journals.informs.org/.
rj
D
C
i
A
v
u
F
ri
B
F
Admissible arc
A
(a)
(b)
ri
j
v
D
i
E
j
rj
ri
(c)
Figure 3.
361
/*
Min-cut stage of the generic labeling pseudoow algorithm. All
nodes in label-n components form the nodes in the source set of
the min-cut.
*/
procedure GenericPseudoow (Vst Ast c):
begin
SimpleInit (As At c);
while a good active component T do
Find a lowest labeled node u T ;
if admissible arc u v do
Merger (rootu u v rootv);
else do
lu lu + 1;
end
Figure 4.
/*
Saturates source- and sink-adjacent arcs.
*/
procedure SimpleInitAs At c:
begin
f e 0;
for each s i As do
ei ei + csi ;
for each i t At do
ei ei cit ;
for each v V do
lv 0;
current v ;
end
Figure 5.
/*
Pushes ow along an admissible path and preserves invariants.
*/
procedure Merger (v1 vk ):
begin
for each j = 1 to k 1 do
if evj > 0 do
min
cvj vj+1 evj ;
evj evj ;
evj+1 evj+1 + ;
if evj > 0 do
currentvj ;
else do
currentvj vj+1 ;
end
Chandran and Hochbaum: A Computational Study of the Pseudoow and Push-Relabel Algorithms
INFORMS holds copyright to this article and distributed this copy as a courtesy to the author(s).
Additional information, including rights and permission policies, is available at http://journals.informs.org/.
362
/*
Min-cut stage of the monotone implementation of the pseudoow
algorithm. All nodes in label-n components form the nodes in
the source set of the min-cut.
*/
procedure MonotonePseudoow (Vst Ast c):
begin
SimpleInit (As At c);
while a good active component T with root r do
u r;
while u = do
if admissible arc u v do
Merger (rootu u v rootv);
u ;
else do
if w T currentw = u lw = lu do
u w;
else do
lu lu + 1;
u currentu;
end
Chandran and Hochbaum: A Computational Study of the Pseudoow and Push-Relabel Algorithms
363
Figure 7.
INFORMS holds copyright to this article and distributed this copy as a courtesy to the author(s).
Additional information, including rights and permission policies, is available at http://journals.informs.org/.
pseudo_hi_fifo
hi_pr
10
0.1
9,100 15,488
30,589
65,536
130,682
270,848
651,600
Nodes
Simple initialization
Minimum cut
Time (sec.)
Maximum ow
Relative time
Time (sec.)
Relative time
Pseudoow
Push-relabel
Pseudoow
Push-relabel
Pseudoow
Push-relabel
Pseudoow
Push-relabel
9100
15488
30589
65536
130682
270848
651600
41760
71687
143364
311040
625537
1306607
3170220
0111
0208
0587
1395
2935
7627
23483
0183
0330
0665
1484
5472
17509
73272
1000
1000
1000
1000
1000
1000
1000
1649
1588
1132
1064
1864
2295
3120
0126
0234
0652
1512
3325
8169
24893
0213
0375
0779
1711
6081
18582
76553
1000
1000
1000
1000
1000
1000
1000
1689
1602
1195
1132
1829
2275
3075
Pushes
Relabels
Arc scans
Pseudoow
Push-relabel
Pseudoow
Push-relabel
Pseudoow
Push-relabel
9100
15488
30589
65536
130682
270848
651600
41760
71687
143364
311040
625537
1306607
3170220
62168
103083
223333
542475
1175273
2650312
7858941
65820
117142
228170
473126
1620216
4685107
16987429
53765
93847
205848
511926
1046223
2564604
6826351
38953
69189
137018
292081
1158262
3381599
13254386
192386
337308
754240
1913935
3958944
9808078
26496009
384584
656046
1283615
2933002
11401882
30466028
131500478
Chandran and Hochbaum: A Computational Study of the Pseudoow and Push-Relabel Algorithms
364
Figure 8.
INFORMS holds copyright to this article and distributed this copy as a courtesy to the author(s).
Additional information, including rights and permission policies, is available at http://journals.informs.org/.
100
10
8,214
16,807
32,768
63,504 123,210
259,308 526,904
Nodes
Simple initialization
Minimum cut
Time (sec.)
Maximum ow
Relative time
Time (sec.)
Relative time
Pseudoow
Push-relabel
Pseudoow
Push-relabel
Pseudoow
Push-relabel
Pseudoow
Push-relabel
8214
16807
32768
63504
123210
259308
526904
38813
80262
157696
307440
599289
1267875
2586020
0304
0808
2184
4803
14489
45228
99951
0679
1920
4540
11575
29938
84931
223596
1000
1000
1000
1000
1000
1000
1000
2229
2375
2079
2410
2066
1878
2237
0321
0872
2313
5046
15906
50007
102228
0735
2078
5668
16255
37209
107161
301137
1000
1000
1000
1000
1000
1000
1000
2292
2384
2450
3221
2339
2143
2946
Pushes
Relabels
Arc scans
Pseudoow
Push-relabel
Pseudoow
Push-relabel
Pseudoow
Push-relabel
8214
16807
32768
63504
123210
259308
526904
38813
80262
157696
307440
599289
1267875
2586020
318368
795596
1906289
4109525
13924860
40741173
82202433
242160
610992
1245410
2946034
7446489
19432456
46445026
79765
185494
385992
850820
1798138
3902188
9423555
119899
302675
677448
1627468
4018154
10923983
26388184
324192
760255
1581645
3509773
7442460
16160617
38835979
1264679
3118748
7157116
17566754
41840711
117956644
283460191
Chandran and Hochbaum: A Computational Study of the Pseudoow and Push-Relabel Algorithms
365
Figure 9.
Run times and operation counts for AK instances with simple initialization.
AK scaling (simple initialization)
1,000
INFORMS holds copyright to this article and distributed this copy as a courtesy to the author(s).
Additional information, including rights and permission policies, is available at http://journals.informs.org/.
pseudo_hi_fifo
hi_pr
100
10
1
8,198
16,390
32,774
65,542
131,078
Nodes
Simple initialization
Minimum cut
Time (sec.)
Maximum ow
Relative time
Time (sec.)
Relative time
Pseudoow
Push-relabel
Pseudoow
Push-relabel
Pseudoow
Push-relabel
Pseudoow
Push-relabel
8198
16390
32774
65542
131078
12295
24583
49159
98311
196615
0852
3428
16428
76322
317770
1806
7520
30876
133248
544794
1000
1000
1000
1000
1000
2120
2194
1879
1746
1714
0856
3438
16446
76356
317840
1810
7534
30906
133310
544926
1000
1000
1000
1000
1000
2114
2191
1879
1746
1714
Pushes
Relabels
Arc scans
Pseudoow
Push-relabel
Pseudoow
Push-relabel
Pseudoow
Push-relabel
8198
16390
32774
65542
131078
12295
24583
49159
98311
196615
2108420
8411140
33599492
134307844
537051140
2112487
8419460
33615862
134341737
537116756
10243
20483
40963
81923
163843
10245
20 485
40965
81925
163845
16388
32772
65540
131076
262148
2141498
8478188
33731795
134576974
537581429
Chandran and Hochbaum: A Computational Study of the Pseudoow and Push-Relabel Algorithms
366
Figure 10.
Run times and operation counts for AK instances with saturate-all initialization.
AK Scaling (saturate-all initialization)
1
INFORMS holds copyright to this article and distributed this copy as a courtesy to the author(s).
Additional information, including rights and permission policies, is available at http://journals.informs.org/.
pseudo_hi_fifo
hi_pr
0.1
0.01
8,198
16,390
32,774
65,542
131,078
Nodes
Saturate-all initialization
Minimum cut
Time (sec.)
Relative time
Pseudoow
Push-relabel
Pseudoow
Push-relabel
8198
16390
32774
65542
131078
12295
24583
49159
98311
196615
0008
0020
0036
0076
0142
0014
0034
0074
0150
0304
1000
1000
1000
1000
1000
1750
1700
2056
1974
2141
Pushes
Relabels
Arc scans
Pseudoow
Push-relabel
Pseudoow
Push-relabel
Pseudoow
Push-relabel
8198
16390
32774
65542
131078
12295
24583
49159
98311
196615
2049
4097
8193
16385
32769
8802
18337
36800
71795
146743
6
6
6
6
6
4097
8193
16383
32769
65537
4095
6389
16383
32767
34458
22157
45770
91740
179657
364 427
Chandran and Hochbaum: A Computational Study of the Pseudoow and Push-Relabel Algorithms
367
Figure 11.
Run times and operation counts for acyclic dense (AC) instances.
AC scaling
INFORMS holds copyright to this article and distributed this copy as a courtesy to the author(s).
Additional information, including rights and permission policies, is available at http://journals.informs.org/.
10
pseudo_hi_fifo
hi_pr
0.1
0.01
0.001
256
512
1,024
2,048
Nodes
Simple initialization
Minimum cut
Time (sec.)
Maximum ow
Relative time
Time (sec.)
Relative time
Pseudoow
Push-relabel
Pseudoow
Push-relabel
Pseudoow
Push-relabel
Pseudoow
Push-relabel
256
512
1024
2048
32640
130816
523776
2096128
0005
0041
0123
1149
0050
0369
1862
9056
1000
1000
1000
1000
10870
8903
15189
7880
0007
0053
0146
1342
0057
0395
1968
9493
1000
1000
1000
1000
8576
7489
13481
7072
Pushes
Relabels
Arc scans
Pseudoow
Push-relabel
Pseudoow
Push-relabel
Pseudoow
Push-relabel
256
512
1024
2048
32640
130816
523776
2096128
562
1441
2650
7803
1571
3782
7954
20378
365
1195
1913
6594
522
1377
2862
7135
23246
178125
495358
4451181
126603
653232
2702803
13078 897
3. For each node i V with excess ei < 0, Af contains the arc i t with capacity ei.
We now show how to convert a maximum ow in Gf
to a maximum ow in Gst .
6. Experiments
This section describes our experimental setup and testing
methodology.
Chandran and Hochbaum: A Computational Study of the Pseudoow and Push-Relabel Algorithms
368
Figure 12.
INFORMS holds copyright to this article and distributed this copy as a courtesy to the author(s).
Additional information, including rights and permission policies, is available at http://journals.informs.org/.
10
pseudo_hi_fifo
hi_pr
0.1
4,098
8,194
16,386
32,770
65,538
Nodes
Simple initialization
Minimum cut
Time (sec.)
Maximum ow
Relative time
Time (sec.)
Relative time
Pseudoow
Push-relabel
Pseudoow
Push-relabel
Pseudoow
Push-relabel
Pseudoow
Push-relabel
4098
8194
16386
32770
65538
65023
187352
522235
1470491
4186085
0038
0124
0252
0904
2215
0077
0221
0637
2002
6880
1000
1000
1000
1000
1000
2037
1780
2523
2215
3106
0045
0164
0294
1185
2852
0099
0304
0778
2651
8499
1000
1000
1000
1000
1000
2181
1851
2650
2238
2980
Pushes
Relabels
Arc scans
Pseudoow
Push-relabel
Pseudoow
Push-relabel
Pseudoow
Push-relabel
4098
8194
16386
32770
65538
65023
187352
522235
1470491
4186085
11125
21617
41045
81213
153277
12746
25229
49754
99056
189258
8662
19675
32916
79929
146661
4730
9273
18101
35709
70134
78639
272051
550411
2148608
5251717
176949
483119
1285367
3498246
9594976
6.1. Implementations
We implemented ve variants of the pseudoow algorithm:
highest label with FIFO buckets (pseudo_hi_fo), highest
label with LIFO buckets (pseudo_hi_lifo), highest label with
wave buckets (pseudo_hi_wave), lowest label with FIFO
buckets (pseudo_lo_fo), and lowest label with LIFO buckets (pseudo_lo_lifo). The latest version of the code (version 3.21) is available at Pseudoow solver (Chandran and
Hochbaum 2007).
The implementation of the highest-level push-relabel
algorithm hi_pr (version 3.6) was obtained from Goldberg
(2007). This implementation is an improvement over the
h_prf implementation by Goldberg and Cherkassky
(1997), which was previously considered to be the best
implementation of push-relabel.
6.2. Computing Environment
The experiments were run on a Sun UltraSPARC workstation with a 270 MHz CPU and 192 MB of RAM. All codes
No optimization
-O4 ag
Test 2
Real
User
System
Real
User
System
04
02
04
01
00
00
33
20
33
19
00
00
Chandran and Hochbaum: A Computational Study of the Pseudoow and Push-Relabel Algorithms
369
Figure 13.
INFORMS holds copyright to this article and distributed this copy as a courtesy to the author(s).
Additional information, including rights and permission policies, is available at http://journals.informs.org/.
10
0.1
16,386
32,770
65,538
Nodes
Simple initialization
Minimum cut
Time (sec.)
n
16386
32770
65538
131074
262146
524290
1048578
49088
98240
196544
393152
786368
1572800
3145664
Maximum ow
Relative time
Time (sec.)
Relative time
0272
0484
1073
2054
3863
7318
12007
1000
1000
1000
1000
1000
1000
1072
Pushes
1653
1517
1562
1417
1408
1081
1000
0188
0357
0778
1646
3156
7637
14552
Relabels
0310
0548
1220
2365
4472
8614
14195
1000
1000
1000
1000
1000
1000
1025
1653
1535
1568
1437
1417
1128
1000
Arc scans
Pseudoow
Push-relabel
Pseudoow
Push-relabel
Pseudoow
Push-relabel
16386
32770
65538
131074
262146
524290
1048578
49088
98240
196544
393152
786368
1572800
3145664
95273
176177
343385
678708
1285622
2498234
4797765
146351
278940
580581
1096443
1995391
3711744
6087748
80491
154187
327157
693000
1294217
2689543
5058970
49978
97107
207667
386306
699376
1283366
1969792
191360
362301
757382
1587599
2957115
6081694
11425647
424079
826264
1757393
3303730
6080414
11327436
18228497
Chandran and Hochbaum: A Computational Study of the Pseudoow and Push-Relabel Algorithms
370
Figure 14.
INFORMS holds copyright to this article and distributed this copy as a courtesy to the author(s).
Additional information, including rights and permission policies, is available at http://journals.informs.org/.
pseudo_hi_fifo
hi_pr
10
0.1
8,194
16,386
32,770
65,538
Nodes
Simple initialization
Minimum cut
Time (sec.)
Maximum ow
Relative time
Time (sec.)
Relative time
Pseudoow
Push-relabel
Pseudoow
Push-relabel
Pseudoow
Push-relabel
Pseudoow
Push-relabel
8194
16386
32770
65538
131074
262146
524290
24448
48896
97792
195584
391168
782336
1564672
0101
0234
0624
1719
4299
10135
26488
0168
0437
1293
3521
11163
30838
78538
1000
1000
1000
1000
1000
1000
1000
1666
1872
2072
2049
2597
3043
2965
0114
0257
0680
1843
4627
11181
30359
0188
0474
1375
3691
11506
31618
80322
1000
1000
1000
1000
1000
1000
1000
1652
1841
2022
2002
2487
2828
2646
Pushes
Relabels
Arc scans
Pseudoow
Push-relabel
Pseudoow
Push-relabel
Pseudoow
Push-relabel
8194
16386
32770
65538
131074
262146
524290
24448
48896
97792
195584
391168
782336
1564672
59204
127923
276483
588634
1303234
2723785
5780423
100287
230186
587053
1296152
3345024
7895722
18368338
45181
91458
201804
456952
979796
2105484
5081726
35101
81527
216799
482079
1291646
3137422
7440283
110922
226446
496752
1108638
2372407
5060915
11899792
291507
670912
1753941
3882692
10169333
24296062
56996936
Chandran and Hochbaum: A Computational Study of the Pseudoow and Push-Relabel Algorithms
371
Table 2.
Relative running times of highest- and lowest-label pseudoow algorithms on small instances.
Highest label
INFORMS holds copyright to this article and distributed this copy as a courtesy to the author(s).
Additional information, including rights and permission policies, is available at http://journals.informs.org/.
Instance family
Lowest label
FIFO
LIFO
Wave
FIFO
LIFO
AC
256
512
1024
2048
32640
130816
523776
2096128
1320
1397
1472
1840
1760
1381
1385
2001
1440
1365
1442
1849
1360
1143
1121
1162
1000
1000
1000
1000
AK
8198
16390
32774
65542
12295
24583
49159
98311
1009
1002
1000
1000
1000
1000
1001
1003
1005
1001
1001
1001
2017
2021
2367
2097
2012
2019
2358
2084
GENRMF-Long
9100
15488
30589
65536
41760
71687
143364
311040
1057
1000
1162
1000
1000
1079
1000
1095
1039
1072
1011
1021
16600
22967
34253
50851
16471
23088
35073
53685
GENRMF-Wide
8214
16807
32768
63504
38813
80262
157696
307440
1000
1000
1000
1000
1646
1467
2131
2839
1434
1845
1993
2478
2217
2521
2519
3605
8706
13211
16328
18750
RLG-Long
16386
32770
65538
131074
49088
98240
196544
393152
1052
1092
1124
1088
1000
1000
1000
1000
1017
1092
1030
1022
24036
55414
123417
259719
24217
56138
126579
267464
RLG-Wide
8194
16386
32770
65538
24448
48896
97792
195584
1068
1071
1042
1089
1000
1001
1006
1000
1004
1000
1000
1096
6829
8455
8336
7907
6938
8568
8224
8022
Line-Moderate
4098
8194
16386
32770
65023
187352
522235
1470491
1004
1029
1000
1035
1000
1000
1060
1007
1062
1033
1139
1000
9996
9926
19649
17231
10912
10969
20985
18529
7. Results
In this section, we provide the results of our experiments
for each problem family. Figures 7 through 17 show the
scaling behavior and run times of the algorithms on each
of the studied problem instances.
Chandran and Hochbaum: A Computational Study of the Pseudoow and Push-Relabel Algorithms
372
Figure 15.
1% of nodes weighted
Minimum cut
Time (sec.)
0.1
0.01
0.001
1,024
2,048
4,096
8,192
1024
2048
4096
8192
16384
5263
20995
83930
336031
1343460
Relative time
0003
0024
0098
0263
1207
1000
1000
1000
1000
1000
1333
2125
4495
4899
4996
16,384
Nodes
Closure scaling (low density, 10% of nodes weighted)
pseudo_hi_fifo
hi_pr
0.1
0.01
0.001
1,024
2,048
4,096
8,192
1024
2048
4096
8192
16384
5333
21199
84154
336167
1345002
Relative time
0004
0025
0077
0416
2300
1000
1000
1000
1000
1000
1750
2886
3832
4512
4315
16,384
Nodes
Closure scaling (low density, 100% of nodes weighted)
pseudo_hi_fifo
hi_pr
INFORMS holds copyright to this article and distributed this copy as a courtesy to the author(s).
Additional information, including rights and permission policies, is available at http://journals.informs.org/.
Time (sec.)
0.1
0.01
1,024
2,048
4,096
8,192
1024
2048
4096
8192
16384
6269
22977
88091
344121
1359906
Relative time
0009
0036
0201
0863
3950
1000
1000
1000
1000
1000
1913
2662
3869
4938
5271
16,384
Nodes
7.1. GENRMF-Long
Push-relabel is slower than pseudoow on the smaller
instances, but appears to almost catch up with pseudoow
for the medium-sized instances. However, it subsequently
becomes relatively slower, and the gap between the two
algorithms appears to increase with problem size. This
appears to correlate with the number of relabels performed.
Push-relabel initially performs fewer relabels than does
Chandran and Hochbaum: A Computational Study of the Pseudoow and Push-Relabel Algorithms
373
Figure 16.
1% of nodes weighted
Minimum cut
Time (sec.)
0.1
0.01
Relative time
Pseudoow
Push-relabel
Pseudoow
Push-relabel
512
1024
2048
4096
8192
12997
52178
209470
838568
3355771
0003
0009
0036
0242
0800
0006
0040
0146
0634
2325
1000
1000
1000
1000
1000
2000
4422
4073
2618
2907
0.001
512
1,024
2,048
4,096
8,192
Nodes
pseudo_hi_fifo
hi_pr
Minimum cut
Time (sec.)
0.1
0.01
0.001
512
1,024
2,048
4,096
Relative time
Pseudoow
Push-relabel
Pseudoow
Push-relabel
512
1024
2048
4096
8192
12983
52245
209440
838571
3355380
0002
0011
0055
0165
0767
0008
0051
0228
0879
3906
1000
1000
1000
1000
1000
4100
4849
4116
5322
5094
8,192
Nodes
Closure scaling (medium density, 100% of nodes weighted)
10
pseudo_hi_fifo
hi_pr
INFORMS holds copyright to this article and distributed this copy as a courtesy to the author(s).
Additional information, including rights and permission policies, is available at http://journals.informs.org/.
Time (sec.)
0.1
0.01
0.001
512
1,024
2,048
4,096
Relative time
Pseudoow
Push-relabel
Pseudoow
Push-relabel
512
1024
2048
4096
8192
13509
53211
211418
842690
3363345
0001
0007
0041
0205
0749
0009
0053
0335
1508
6903
1000
1000
1000
1000
1000
11250
7216
8166
7356
9214
8,192
Nodes
7.2. GENRMF-Wide
7.3. AK
Chandran and Hochbaum: A Computational Study of the Pseudoow and Push-Relabel Algorithms
374
Figure 17.
1% of nodes weighted
Minimum cut
0.1
Time (sec.)
0.01
0.001
0.0001
128
256
512
1,024
Relative time
Pseudoow
Push-relabel
Pseudoow
Push-relabel
128
256
512
1024
2048
7943
32226
130052
522184
2092818
0000
0004
0016
0063
0296
0002
0014
0064
0315
1283
1000
1000
1000
1000
1000
6000
3400
3927
5022
4338
2,048
Nodes
Closure scaling (high density, 10% of nodes weighted)
pseudo_hi_fifo
hi_pr
0.1
Time (sec.)
0.01
0.001
Relative time
Pseudoow
Push-relabel
Pseudoow
Push-relabel
128
256
512
1024
2048
7920
32309
130050
522596
2093115
0000
0004
0018
0057
0255
0004
0017
0073
0318
1395
1000
1000
1000
1000
1000
9500
4421
4136
5615
5467
0.0001
128
256
512
1,024
2,048
Nodes
Closure scaling (high density, 100% of nodes weighted)
pseudo_hi_fifo
hi_pr
INFORMS holds copyright to this article and distributed this copy as a courtesy to the author(s).
Additional information, including rights and permission policies, is available at http://journals.informs.org/.
0.1
0.01
0.001
128
256
512
1,024
Relative time
Pseudoow
Push-relabel
Pseudoow
Push-relabel
128
256
512
1024
2048
8043
32561
130548
523278
2094890
0001
0004
0019
0053
0276
0003
0017
0077
0336
1448
1000
1000
1000
1000
1000
2167
4300
4118
6312
5238
2,048
Nodes
roughly the same number of pushes and relabels, pushrelabel performs a signicantly larger number of arc scans.
The run time of both algorithms decreases signicantly when the saturate-all initialization is used, as shown
in Figure 10. We report only the time to minimum cut for
this initialization because the transformation described in 5
preserves only the minimum cut in the graph and additional
Chandran and Hochbaum: A Computational Study of the Pseudoow and Push-Relabel Algorithms
Operations Research 57(2), pp. 358376, 2009 INFORMS
INFORMS holds copyright to this article and distributed this copy as a courtesy to the author(s).
Additional information, including rights and permission policies, is available at http://journals.informs.org/.
8. Conclusions
The highest-label pseudoow implementation is faster than
push-relabel on all but the largest instances of one problem
class (RLG-Long). Our work is of signicance because it
was widely accepted until now that push-relabel was the
fastest algorithm in practice for the maximum ow problem. Because the min-cut and max-ow are of interest
both as stand-alone problems and as subroutines in other
algorithms, our implementation could be used to efciently
solve a wide range of problems.
375
Among the different pseudoow variants, the highestlabel algorithm was in general faster and more robust across
different problem families than the lowest-label algorithm.
This is similar to past ndings for push relabel (for example,
by Ahuja et al. 1997) in which the lowest-label variant was
found to be slower than the highest-label variant.
We observed that the number of relabels performed by
push-relabel was generally greater than that of pseudoow,
in spite of the global relabeling heuristic used in pushrelabel. One possible explanation is that pseudoow allows
pushes along arcs where both ends of the arc have the
same label. Such arcs would be inadmissible in pushrelabel, needing at least one relabel to push ow along such
an arc.
Endnote
1. We thank an anonymous referee for proposing this
description.
Acknowledgments
This research was supported in part by NSF award no.
DMI-0620677.
References
Ahuja, R. K., T. L. Magnanti, J. B. Orlin. 1993. Network Flows Theory,
Algorithms, and Applications. Prentice-Hall, Englewood Cliffs, NJ.
Ahuja, R. K., M. Kodialam, A. K. Mishra, J. B. Orlin. 1997. Computational investigations of maximum ow algorithms. Eur. J. Oper. Res.
97(3) 509542.
Anderson, C., D. S. Hochbaum. 2002. The performance of the pseudoow algorithm for the maximum ow and minimum cut problems.
Manuscript, University of California, Berkeley.
Anderson, R. J., J. C. Setubal. 1993. Goldbergs algorithm for the maximum ow in perspective: A computational study. D. S. Johnson, C. C.
McGeoch, eds. Network Flows and Matching First DIMACS Implementation Challenge. American Mathematical Society, Providence,
RI, 118.
CATS: Combinatorial Algorithms Test Sets. 2007. Retrieved January
2007, http://www.avglab.com/andrew/CATS/gens/.
Chandran, B., D. S. Hochbaum. 2007. Pseudoow solver. Retrieved January 2007, http://riot.ieor.berkeley.edu/riot/Applications/Pseudoow/
maxow.html.
Derigs, M., W. Meier. 1989. Implementing Goldbergs max-ow algorithmA computational investigation. ZORMethods and Models
Oper. Res. 33 383403.
DIMACS. 1990. The rst DIMACS algorithm implementation challenge: The core experiments. Retrieved October 2004, http://dimacs.
rutgers.edu/pub/netow/general-info/.
Dinic, E. A. 1970. Algorithm for the solution of a problem of maximal
ow in networks with power estimation. Soviet Math. Doklady 11
12771280.
Ford, L. R., D. R. Fulkerson. 1956. Maximal ow through a network.
Canadian J. Math. 8 339404.
Goldberg, A. V. 2007. Andrew Goldbergs network optimization library.
Retrieved January 2007, http://www.avglab.com/andrew/soft.html.
Goldberg, A. V., B. V. Cherkassky. 1997. On implementing the pushrelabel method for the maximum ow problem. Algorithmica 19
390410.
376
Chandran and Hochbaum: A Computational Study of the Pseudoow and Push-Relabel Algorithms
INFORMS holds copyright to this article and distributed this copy as a courtesy to the author(s).
Additional information, including rights and permission policies, is available at http://journals.informs.org/.