Hochbaum or
Hochbaum or
We introduce the pseudoflow algorithm for the maximum flow problem that employs only pseudoflows and
does not generate flows explicitly. The algorithm solves directly a problem equivalent to the minimum
cut problem – the maximum blocking cut problem. Once the maximum blocking cut solution is available,
the additional complexity required to find the respective maximum flow is O(m log n). A variant of the
algorithm is a new parametric maximum flow algorithm generating all breakpoints in the same complexity
required to solve the constant capacities maximum flow problem. The pseudoflow algorithm has also a
simplex variant, pseudoflow-simplex, that can be implemented to solve the maximum flow problem. One
feature of the pseudoflow algorithm is that it can initialize with any pseudoflow. This feature allows it
to reach an optimal solution quickly when the initial pseudoflow is “close” to an optimal solution. The
complexities of the pseudoflow algorithm, the pseudoflow-simplex and the parametric variants of pseudoflow
and pseudoflow-simplex algorithms are all O(mn log n) on a graph with n nodes and m arcs. Therefore,
the pseudoflow-simplex algorithm is the fastest simplex algorithm known for the parametric maximum flow
problem. The pseudoflow algorithm is also shown to solve the maximum flow problem on s, t-tree networks
in linear time, where s, t-tree networks are formed by joining a forest, of capacitated arcs, with nodes s and
t adjacent to any subset of the nodes.
Subject classifications : Normalized tree; lowest label; pseudoflow algorithm; maximum flow
Area of review :
History :
1. Introduction
The maximum flow problem is to find in a network with a source, a sink, and arcs of given capacities,
a flow that satisfies the capacity constraints and flow balance constraints at all nodes other than
source and sink, so that the amount of flow leaving the source is maximized.
The past five decades have witnessed prolific developments of algorithms for the maximum flow
problem. These algorithms can be classified in two major classes: feasible flow algorithms and
preflow algorithms. The feasible flow algorithms work with augmenting paths incrementing the
flow at every iteration. The first algorithm of this type was devised by Ford and Fulkerson (1957).
A Preflow is a flow that may violate the restriction on the balance of the incoming flow and the
outgoing flow into each node other than source and sink by permitting excesses (more inflow than
outflow). It appears that the first use of preflow for the maximum flow problem was in work by
Boldyreff (1955), in a push-type algorithm with heuristically chosen labels. Boldyreff’s technique
named “flooding technique” does not guarantee an optimal solution. The push-relabel algorithm
of Goldberg and Tarjan (1988) uses preflows, and is efficient both theoretically and empirically.
The literature on maximum flow algorithms includes numerous algorithms. Most notable for
efficiency among feasible flow algorithms is Dinic’s algorithm, Dinic (1970), of complexity O(n2 m).
An improved version of this algorithm runs in time O(n3 ), Karzanov (1974), Malhorta, Kumar
and Maheshwari (1978). Goldberg and Rao (1998), based their algorithm on an extension of
Dinic’s algorithm for unit capacity networks with run time of O(min{n2/3 , m1/2 }m log(n2 /m) log U )
for U the largest arc capacity. Goldberg and Tarjan’s push-relabel algorithm with dynamic trees
1
Hochbaum: The Pseudoflow algorithm
2 c 0000 INFORMS
Operations Research 00(0), pp. 000–000, °
-
+ +
-
+
+
- + +
+ -
- +
+
-
Figure 1 A schematic description of the graph during the execution of the pseudoflow algorithm with a partition
to subsets of nodes of excess/deficit marked +/- respectively.
2
implementation has complexity of O(mn log nm ). And King, Rao and Tarjan (1994) devised an
algorithm of complexity O(mn logm/n log n n).
We describe here a novel approach for solving the maximum flow and minimum cut problems
which is based on the use of pseudoflow permitting excesses and deficits1. . Source and sink nodes
have no distinguished role in this algorithm, and all arcs adjacent to source and sink in the maxi-
mum flow problem instance are maintained saturated throughout the execution of the algorithm.
The method seeks a partition of the set of nodes to subsets, some of which have excesses, and
some have deficits, so that all arcs going from excess subsets to deficit subsets are saturated. The
partition with this property is provably a minimum cut in the graph.
The pseudoflow algorithm uses a certificate of optimality inspired by the algorithm of Lerchs
and Grossmann (1965) for the maximum closure problem defined on a digraph with node weights.
That algorithm was devised for the purpose of finding the optimal solution (contour) of the open-
pit mining problem. The algorithm of Lerch and Grossmann does not work with flows but rather
with a concept of mass representing the total sum of node weights in a given subset. It is shown
here that the concept of mass generalizes in capacitated networks to the notion of pseudoflow. The
reader interested in further investigation of the conceptual link between our algorithm and Lerchs
and Grossmann’s algorithm is referred to Hochbaum (2001).
The pseudoflow algorithm solves, instead of the maximum flow problem, the maximum blocking
cut problem, Radzik (1993). The blocking cut problem is defined on a directed graph with arc
capacities and node weights that does not contain source and sink nodes. The objective of the
blocking cut problem is to find a subset of the nodes that maximizes the sum of node weights,
minus the capacities of the arcs leaving the subset. This problem is equivalent to the minimum
s, t-cut problem (see Section 3) that is traditionally solved by deriving a maximum flow first.
At each iteration of the pseudoflow algorithm there is a partition of the nodes to subsets with
excesses and subsets with deficits such that the total excess can only be greater than the maximum
blocking cut value. In that sense the union of excess subsets forms a superoptimal solution. The
algorithm is thus interpreted as a dual algorithm for the maximum blocking cut problem. If there
are no unsaturated arcs between excess subsets and deficit subsets then the union of the excess
subsets forms an optimal solution to the maximum blocking cut problem. A schematic description
of the partition at an iteration of the algorithm is given in Figure 1.
The pseudoflow algorithm works with a tree structure called a normalized tree. This tree preserves
some information about residual paths in the graph. The normalized tree is used as a basic arcs
Hochbaum: The Pseudoflow algorithm
c 0000 INFORMS
Operations Research 00(0), pp. 000–000, ° 3
tree in a simplex-like variant of the pseudoflow algorithm, described in Section 10. We call this
variant the pseudoflow-simplex.
A part of the investigation here is on the sensitivity analysis of the maximum flow problem
using the pseudoflow algorithm. The goal of sensitivity analysis, or parametric analysis, is to find
the maximum flow as a function of a parameter when source and sink adjacent arc capacities are
monotone nondecreasing and nonincreasing functions of the parameter respectively. We distinguish
two types of sensitivity analysis: In simple sensitivity analysis, we are given k parameter values for
the arc capacities functions and the problem is to find the optimal solution for each of these values.
In complete parametric analysis the goal is to find all the maximum flows (or minimum cuts) for
any value of the parameter.
Martel (1989) showed that a variant of Dinic’s algorithm can solve the simple sensitivity analysis
in O(n3 + kn2 ). Gallo, Grigoriadis and Tarjan (1989), showed that simple sensitivity analysis for
k = O(n) and complete parametric analysis problems for linear functions of the parameter can
2
be solved in the same time as a single run of the push-relabel preflow algorithm, O(mn log nm +
2
km log nm ). The simple sensitivity analysis was subsequently improved by Gusfield and Tardos
2 2
(1994) to O(mn log nm + kn log nm ) permitting the increase of the number of parameter values to
k = O(m) while still maintaining the same complexity. We show here that both simple sensitivity
analysis for k = O(m log n) and complete parametric analysis can be performed using the pseudoflow
algorithm or the pseudoflow-simplex algorithm in the same time as a single run, O(mn log n +
kn). The complete parametric analysis algorithm can be extended to any monotone functions,
for the pseudoflow algorithm and its variants, and also for the push-relabel algorithm by adding
O(n log U ) steps, where U is the range of the parameter, Hochbaum (2003a). The pseudoflow and
the pseudoflow-simplex algorithms are thus the only alternatives to the push-relabel algorithm
known to date that can solve the complete parametric analysis efficiently.
The contributions here include:
1. A new algorithm for the maximum flow problem of complexity O(mn log n). This is the first
algorithm specifically designed for the maximum flow problem that makes use of pseudoflows.
2. A new pseudoflow-based simplex algorithm for maximum flow, matching the best complexity
of a simplex algorithm for the problem, Goldberg, Grigoriadis and Tarjan (1991).
3. A simple sensitivity analysis algorithm for the maximum flow problem on k parameter values
with the pseudoflow algorithm of complexity O(mn log n + kn). The pseudoflow-simplex algorithm
for simple sensitivity analysis also runs in O(mn log n + kn) time. This improves on the previously
best known simplex-based algorithm of Goldfarb and Chen (1997) for simple sensitivity analysis
with complexity O(mn2 + kn).
4. A complete parametric analysis with the pseudoflow or pseudoflow-simplex algorithms gen-
erating all breakpoints for any monotone functions of the parameter in O(mn log n + n log U ) steps
and in O(mn log n) steps for linear functions. The pseudoflow-simplex is the first simplex-based
algorithm that performs the complete parametric analysis problem in the same complexity as a
single constant capacities instance.
5. An efficient procedure for ”warm starting” the algorithm when the graph arcs and capacities
are modified arbitrarily.
6. A linear time algorithm for maximum flow on a s, t-tree network, which is a network with
tree topology (in the undirected sense) appended by source and sink nodes that are connected to
any subset of the nodes of the tree. This is used as a subroutine e.g. in solving the minimum cost
network flow, see Vygen (2002).
The paper is organized as follows. The next section introduces notations and relevant definitions.
In Section 3 we discuss the relationship of the maximum blocking cut problem to the minimum cut
problem, the maximum flow problem, and the maximum closure problems. Section 4 introduces the
normalized tree and its properties. Section 5 describes the pseudoflow algorithm and establishes its
Hochbaum: The Pseudoflow algorithm
4 c 0000 INFORMS
Operations Research 00(0), pp. 000–000, °
correctness as a maximum blocking cut algorithm. In Section 6 the generic pseudoflow algorithm
is shown to have pseudopolynomial run time, a scaling variant is shown to have polynomial run
time, and a labeling variant is shown to have strongly polynomial run time. Section 7 presents
several strongly polynomial variants of the pseudoflow algorithm. In Section 8 it is demonstrated
how to recover from a normalized tree a feasible flow in time O(m log n) and O(m log n + n log U )
respectively. At optimality the flow amount is equal to the capacity of the cut arcs and thus
we conclude that the pseudoflow algorithm is also a maximum flow algorithm. In Section 9 we
discuss the parametric features of the algorithm and show that simple sensitivity analysis and
complete parametric analysis can be implemented in O(mn log n) for linear functions, and with
an additive factor of O(n log U ) for arbitrary monotone functions. The pseudoflow-simplex and its
parametric implementation are presented in Section 10. Section 11 describes an implementation of
the push-relabel algorithm as a pseudoflow-based method. The methodologies of pseudoflow, the
pseudoflow-simplex, and the push-relabel algorithms are compared and contrasted in Section 12.
The Appendix contains a new algorithm for normalizing any given tree in a network in O(m) steps.
The implications for efficient warm starts, minimum directed cuts, and a linear time maximum
flow algorithm for s, t-tree networks are discussed as well.
8
ν
s V t
in T . T[v,p(v)] = Tv is the subtree suspended from the edge [v, p(v)]. The parent of a node v, denoted
by p(v), is the unique node that follows v on the path from v to the root of the tree. All nodes
that have node v as a parent are the immediate descendants of v and are called children of v. A
child of v, is denoted by ch(v). We will occasionally refer to the nodes or the arcs of a tree T as
the set T whenever there is no risk of ambiguity.
We introduce three related equivalent representations of a graph: G, Gst and Gext .
1. The directed graph G = (V, A) has real node weights wi for i ∈ V and (positive) arc capacities
cij for (i, j) ∈ A.
2. The graph Gst = (Vst , Ast ) is an s, t-graph with only arc capacities. It is constructed from the
graph G as follows: The set of nodes is Vst = V ∪ {s, t}, and the set of arcs Ast comprises of the arcs
of A appended by sets of arcs adjacent to s and t, A(s) and A(t). The arcs of A(s) = {(s, j)|wj > 0}
connect s to all nodes of positive weight, each of capacity equal to the weight of the respective
node, csj = wj . Analogously, A(t) = {(j, t)|wj < 0} and cjt = −wj = |wj | for (j, t) ∈ A(t). Zero weight
nodes are connected neither to the source nor to the sink. Thus, Gst = (Vst , Ast ) = (V ∪ {s, t}, A ∪
A(s) ∪ A(t)).
The inverse map from a graph Gst to a graph G is as follows: A node weighted graph G = (V, A)
is constructed by assigning to every node v adjacent to s a weight wv = csv , and every node u
adjacent to t is assigned a weight wu = −cut . Nodes that are adjacent neither to the source nor to
the sink are assigned the weight 0. For a node v adjacent to both s and t in Gst , the lower capacity
arc among the two of value δ = min{csv , cvt } is removed, and the value δ is subtracted from the
other arc’s capacity. Therefore each node can be assumed to be adjacent to either source or sink
or to neither. The source and sink nodes are then removed from Vst .
3. The extended network, Gext , corresponds to an s, t-graph Gst by adding to Ast , for each node
v, two arcs of infinite capacity – (t, v) and (v, s) – and then shrinking s and t into a single node r
called root. We refer to the appended arcs from sink t as S the deficit arcs and the appended arcs to
the source s as the excess arcs and denote them by A∞ = v∈V {(v, r) ∪ (r, v)}). Figure 2 provides a
schematic description of such a network. The extended network is the graph Gext = (V ∪ {r}, Aext ),
where Aext = A ∪ A(s) ∪ A(t) ∪ A∞ .
The maximum flow problem is defined on a directed s, t-graph, Gst = (Vs,t , Ast ). An arc of infinite
capacity is added from sink to source (t, s) in order to turn the problem into a circulation problem.
The standard formulation of the maximum flow problem with variable fij indicating the amount
of flow on arc (i, j) is
Hochbaum: The Pseudoflow algorithm
6 c 0000 INFORMS
Operations Research 00(0), pp. 000–000, °
Max fts
P P
subject to i fki − j fjk = 0 ∀k ∈ Vs,t
0 ≤ fij ≤ cij ∀(i, j) ∈ Ast .
The objective function value, which is also the total flow leaving the source (or arriving at the
sink) is denoted by |f |. In this formulation the first set of (equality) constraints is called the flow
balance constraints. The second set of (inequality) constraints is called the capacity constraints.
A
P “preflow” P violates the flow balance constraints in one direction permitting nonnegative excess
i f ki − j fjk ≤ 0. A “pseudoflow” may violate the flow balance constraints in both directions.
Capacity constraints are satisfied by both preflow and pseudoflow.
Claim 2.1For any pseudoflow in Gst there is a corresponding feasible flow on the graph Gext .
Proof: The feasible flow is constructed by sending the excess or deficit of each node v back to
node r via the excess arc (v, r) or the deficit arc (r, v). Q.E.D.
Let f be a pseudoflow vector in Gst with 0 ≤ fij ≤ cij and let inflow (D), outflow (D) be the total
amount of flow incoming and outgoing to and from the set of nodes D. For each subset of nodes
D ⊆ V the excess of D is the net inflow into D,
X X
excess(D) = inflow (D) − outflow (D) = fuv − fvu .
(u,v)∈(V ∪{s}\D,D) (v,u)∈(D,V ∪{t}\D)
The excess of a singleton node v is excess(v). A negative valued excess is called deficit with
deficit(D) = −excess(D).
For S ⊆ V we let the complement of S be S̄ = V \ S. The complement sets used here are only
with respect to V , even for the graphs Gst and Gext .
Next we introduce the maximum blocking cut problem and the concept of surplus of a set.
Problem Name: Maximum blocking cut
Instance: Given a directed graph G = (V, A), node weights (positive or negative) wi
for all i ∈ V , and nonnegative arc weights cij for all (i, j) ∈ A.
OptimizationP Problem: P
Find a subset of nodes S ⊆ V such that
surplus(S) = i∈S wi − i∈S,j∈S̄ cij is maximum.
The notion of surplus of a set of node in G has related definitions in the graphs G and Gext . st
P P
Definition 2.1The surplus of S ⊆ V in the graph G is j∈S wj − i∈S,j∈S̄ cij . The surplus of
S
P ⊆ V in the graph G
P st is C( {s } , S) −PC(S, S̄ ∪ { t} ). The surplus of S ⊆ V in the graph Gext is
j∈S,(r,j)∈A(s) crj − j∈S,(j,r)∈A(t) cjr − (i,j)∈(S,S̄) cij .
These definitions of surplus in the corresponding graphs Gext , Gst and G are equivalent: In
G ext and Gst the definitions are obviously the same since the capacity of the arcs in A(s) with
endpoints in S is C({s}, S), the capacity of the arcs in A(t) with endpoints in S is C(S, {t}), and
C(S, S̄ ∪ {t}) = C(S, {t}) + C(S, S̄). To see the equivalence in Gst and G, observe that the sum
of weights of nodes in S is also the sum of capacities C({s}, S) − C(S, {t}) where the first term
corresponds to positive weights in S, and the second to negative weights in S. Therefore,
P P
j∈S wj − i∈S,j∈S̄ cij = C({s}, S) − C(S, {t}) − C(S, S̄) = C({s}, S) − C(S, S̄ ∪ {t}).
The expression on the left-hand side is the surplus of S in G whereas the expression on the right-
hand side is the surplus of S in Gst .
Hochbaum: The Pseudoflow algorithm
c 0000 INFORMS
Operations Research 00(0), pp. 000–000, ° 7
Lemma 3.1For S ⊆ V , {s} ∪ S is the source set of a minimum cut in Gst if and only if (S, S̄) is
a maximum blocking cut in the graph G.
Proof: We rewrite the objective function in the maximum blocking cut problem for the equivalent
graph Gst :
maxS⊆V [C({s}, S) − C(S, S̄ ∪ {t})] = maxS⊆V [C({s}, V ) − C({s}, S̄) − C(S, S̄ ∪ {t})]
= C({s}, V ) − minS⊆V [C({s}, S̄) + C(S, S̄ ∪ {t})].
In the last expression the term C({s}, V ) is a constant from which the minimum cut value is
subtracted. Thus the set S maximizing the surplus is also the source set of a minimum cut and,
vice versa – the source set of a minimum cut also maximizes the surplus. Q.E.D.
We note that the blocking cut problem has appeared in several forms in the literature. The
boolean quadratic minimization problem with all the quadratic terms having positive coefficients
is a restatement of the blocking cut problem2. . More closely related is the feasibility condition
of Gale (1957) for a network with supplies and demands, or of Hoffman (1960) for a network
with lower and upper bounds. Verifying feasibility is equivalent to ensuring that the maximum
blocking cut is zero, in a graph with node weights equal to the respective supplies and demands with
opposite signs. If the maximum blocking cut is positive, then there is no feasible flow satisfying the
supply and demand balance requirements. The names maximum blocking cut or maximum surplus
cut were used for the problem by Radzik (1993).
3.1. The Blocking Cut Problem and the Maximum Closure Problem
The pseudoflow algorithm is a generalization of the algorithm solving the maximum closure problem
in closure graphs, described in Hochbaum (2001). Indeed, the blocking cut problem generalizes
the closure problem. The maximum closure problem is to find in a node weighted directed graph
a maximum weight subset of nodes that forms a closed set, i.e. a set of nodes that contains all
successors of each node in the closed set. Picard (1976) demonstrated how to formulate the
maximum closure problem on a graph G = (V, A) as a flow problem on the respective Gst graph:
All arc capacities in A are set to infinity, a source node s and a sink node t are added to V and arcs
A(s) and A(t) are appended as in the description of how to derive Gst from G: A(s) contains arcs
from s to all nodes of positive weight with capacity equal to that weight, and A(t) contains arcs
from all nodes of negative weights to t with capacities equal to the absolute value of the weight. In
Gst any finite cut C(S, S̄ ∪ {t}) must have (S, S̄) = ∅. This implies that for such a finite cut the set
S is closed. It follows that C(S, S̄ ∪ {t}) is equal to C(S, {t}), and thus Lemma 3.1 demonstrates
that the source set of a minimum cut is also a maximum weight closed set.
The blocking cut problem generalizes the maximum closure problem by relaxing the closure
requirement: Nodes that are successors of nodes in S, i.e. nodes that are the head of arcs with
tails in nodes of S, may be excluded from the set S, but at a penalty equal to the capacity of the
respective arcs.
From Lemma 3.1 we conclude that any maximum flow or minimum cut algorithm solves the
maximum blocking cut problem: The source set of a minimum cut is a maximum surplus set. The
pseudoflow algorithm works in a reverse direction, by solving the maximum blocking cut problem
first, which provides a minimum cut, and then recovering a maximum flow.
Hochbaum: The Pseudoflow algorithm
8 c 0000 INFORMS
Operations Research 00(0), pp. 000–000, °
4. A Normalized Tree
The pseudoflow algorithm maintains a construction called a normalized tree after the use of this
term by Lerchs and Grossmann (1965). A normalized S tree T = (V ∪ {r}, ET ) is defined on a
spanning tree in G ext rooted in r so that ET ⊆ A ∪ v∈V {(v, r) ∪ (r, v)}). The children of r in such
a spanning tree are denoted by ri and called the roots of their respective branches (also referred
to as trees or subtrees). In a normalized tree only the branch roots ri are permitted to carry
nonzero deficits or excesses. For a given pseudoflow f , a branch Tri is called strong if excess(Tri ) =
excess(ri ) = fri ,r > 0, and weak otherwise. All nodes of strong branches are considered strong, and
all nodes of weak branches are considered weak. Branches with zero excess are called 0-deficit
branches, and are considered to be weak.
The tree T induces a forest of all the branches in G = (V, A) formed by the set of arcs ET ∩ A.
The arcs in the set ET ∩ A are called in-tree arcs, and the arcs in the set A \ ET are called out-of-tree
arcs.
Recall that the root is placed at the top of the tree, so that the reference to the downwards
direction is equivalent to “pointing away from the root”, and the upwards direction is equivalent to
“pointing towards the root”. The topology of a normalized tree with three branches is illustrated
in Figure 3. The branch rooted at r1 is strong since the amount of excess of the branch Tr1 (and
of r1 ) is positive. Branch Tr3 has nonpositive excess and is thus considered weak.
Definition 4.1A spanning tree T in Gext with a pseudoflow f in Gst is called normalized if it
satisfies properties 1, 2, 3, and 4.
Property 1The pseudoflow f saturates all source-adjacent arcs and all sink-adjacent arcs A(s) ∪
A(t).
Property 2The pseudoflow f on out-of-tree arcs is equal to the lower or the upper bound capacities
of the arcs.
Property 3In every branch all downwards residual capacities are strictly positive.
Property 4The only nodes that do not satisfy flow balance constraints in Gst are the roots of their
respective branches.
Hochbaum: The Pseudoflow algorithm
c 0000 INFORMS
Operations Research 00(0), pp. 000–000, ° 9
Property 4 means that for T to be a normalized tree, the arcs connecting the roots of the
branches to r in Gext are the only excess and deficit arcs permitted. It also means that the excess
of a branch is equal to the excess of its root, excess(Tri ) = excess(ri ).
It is shown next that a crucial property – the superoptimality property – is satisfied by any
normalized tree and is thus a corollary of properties 1,2,3, and 4.
Lemma 4.1For a pseudoflow f saturating A(s) ∪ A(t), surplus(D) = excess(D) − C f (D, D̄).
Proof:
excess(D) = C({s}, D) − C(D, {t}) + f (D̄, D) − f (D, D̄)
P
= C({s}, D) − C(D, {t}) + f (D̄, D) − (C(D, D̄) − (i,j)∈A∩(D,D̄) cfij )
= C({s}, D) − C(D, {t}) − C(D, D̄) + C f (D, D̄)
= surplus(D) + C f (D, D̄).
Q.E.D.
Definition 4.2For a pseudoflow f saturating A(s) ∪ A(t), and a normalized tree T we define
surplusT (D) = excess(D) − C f ((D, D̄) ∩ T ).
From this definition and Lemma 4.1 it follows that, excess(D) ≥ surplusT (D) ≥ surplus(D).
All three terms are equal when C f (D, D̄) = 0, which happens when f (D̄, D) = 0 and f (D, D̄) =
C(D, D̄).
Lemma 4.2For a normalized tree T with pseudoflow f , strong nodes S and weak nodes S̄,
maxD⊆V surplusT (D) = surplusT (S).
Proof: The maximum of excess(D) is attained for a set of nodes D∗ that contains all the nodes
of positive excess – the roots of the strong branches – and excludes all nodes of negative excess –
the roots of weak branches. Recall that all non-root nodes have 0 excess.
Suppose that for a strong branch B ⊆ S, only a proper subset B1 ⊂ B is contained in D∗ where
B1 contains the root of the branch. Then the set of residual arcs in (B1 , B̄1 ) ∩ T is nonempty due
to Property 3, and surplus(B1 ) ≤surplus(B). Thus B maximizes the value surplusT (D) for any
D ⊆ B. Similarly including any subset of a weak branch that does not include the weak root cannot
increase the value of surplusT (D∗ ). Therefore, the maximum is attained for the set of all strong
nodes S. Q.E.D.
In particular, observing that (S, S̄) ∩ T = ∅, it follows that
Thus the excess of the strong nodes S is an upper bound on the value of the optimal solution to
the blocking cut problem, and the superoptimality is proved.
Q.E.D.
When the residual capacity of arcs in (S, S̄) is zero, then excess(S) = surplusT (S) = surplus(S).
It thus follows from Lemma 4.2,
Hochbaum: The Pseudoflow algorithm
10 c 0000 INFORMS
Operations Research 00(0), pp. 000–000, °
Definition 4.3A normalized tree with pseudoflow f is optimal if for the set of strong nodes S in
the tree (S, S̄) ∩ Af = ∅.
Corollary 4.2 (Minimality)If S is the set of strong nodes for an optimal normalized tree, then
it is a minimal maximum surplus set in the graph.
Proof: From the proof of Lemma 4.2, the maximum surplus set contains all strong nodes. Therefore,
a set strictly contained in S cannot be a maximum surplus set. Q.E.D.
Figure 4 A simple normalized tree where N (s)/N (t) are the nodes adjacent to s/t respectively.
The input parameters to procedure pseudoflow consist of a pseudoflow f in Gst saturating A(s) ∪
A(t), a normalized tree T associated with f and the respective sets of strong and weak nodes, S
and W . As before Af is the set of residual arcs in A with respect to f .
procedure pseudoflow {Gst , f, T, S, W }
begin
while (S, W ) ∩ Af 6= ∅ do
Select (s0 , w) ∈ (S, W );
Let rs0 , rw be the roots of the branches containing s0 and w respectively.
Let δ = excess(rs0 ) = frs0 ,r ;
Merge T ← T \ [r, rs0 ] ∪ (s0 , w);
Renormalize {Push δ units of flow along the path [rs0 , . . . , s0 , w, . . . , rw , r]:}
i = 1;
Until vi+1 = r;
Let [vi , vi+1 ] be the ith edge on the path;
{Push flow} If cfvi ,vi+1 ≥ δ augment flow by δ, fvi ,vi+1 ← fvi ,vi+1 + δ;
Else, split {(vi , vi+1 ), δ − cfvi ,vi+1 };
Set δ ← cfvi ,vi+1 ;
Set fvi ,vi+1 ← cvi ,vi+1 ;
i←i+1
end
end
end
procedure split {(a, b), M }
T ← T \ (a, b) ∪ (a, r); excess(a) = far = M ;{a is a root of a strong branch}
Af ← Af ∪ {(b, a)} \ {(a, b)};
end
An illustration of the steps at one iteration is given in Figure 5. The merger arc is (s, w). In
Figure 5(a) the weak and strong merger branches, Trw and Trs , are shown. The subtrees Tw and
Ts are contained in those branches. Figure 5(b) shows the inversion of the path [rs , . . . , s] in the
strong branch that follows a merger. Edges e1 and e2 are the only blocking edges found in the
normalization process, and the new partition following the split of those edges is shown in Figure
Hochbaum: The Pseudoflow algorithm
12 c 0000 INFORMS
Operations Research 00(0), pp. 000–000, °
rw
r r
c
rw rs Trw e2
d
rw d b
Trw Trs rs
w s w c w
W S s
Tw
s
Tw Ts Tw Ts a
a e1
b
Ts Trs
rs
Figure 5 The merger arc is (s, w); rs and rw are the roots of the strong and weak branches respectively; e1 = (b, a)
is the first split arc on the merger path, e2 = (d, e) is the second split arc. (a) Merger arc identified (b)
Inverting the strong branch (c) After renormalization
5 (c). The incoming flow into b is the excess frs ,r and the incoming flow into d is the amount that
got through (b, a), cfba .
The correctness of the generic algorithm follows firstly from Lemma 6.1, shown in Section 6,
proving that the algorithm terminates. Secondly, at each iteration the excess is pushed and arcs split
so that the resulting tree is normalized and all non-root nodes satisfy flow balance constraints in
Gst . The algorithm thus terminates with a normalized tree and no residual arc between strong and
weak nodes. This is the certificate of optimality given in Corollary 4.1. Therefore, at termination
the set of strong nodes is the source set of a minimum cut and a maximum surplus set.
Lemma 6.1At each iteration either the total excess of the strong nodes is strictly reduced, or at
least one weak node becomes strong.
Proof: Since downwards residual capacities are positive, a positive portion of the excess pushed
arrives at the weak branch. Then, either a positive amount of excess arrives at rw , or some upwards
arc (u, p(u)) in the weak branch has zero residual capacity. In the first case a positive amount of
excess arrives at node rw and the total excess is strictly reduced. In the latter case there is no
change in excess but the nodes of the subtree T[u,p(u)] that include the head of the merger arc, w,
become strong. Q.E.D.
Let M + = C({s}, V ) be the sum of arc capacities in A(s) and M − = C(V, {t}) be the sum of
arc capacities in A(t). These quantities are the total excess of the strong nodes and the total
deficit of the weak nodes in the initial simple normalized tree. From Lemma 6.1 it follows that two
consecutive reductions in total excess may be separated by at most n mergers, as each merger that
is not associated with a strict reduction in excess must result in a decrease in the number of weak
nodes. Thus we have for integer capacities:
The complexity expression in Corollary 6.1 depends on the total sum of excesses in the initial tree.
It is thus possible to take advantage of the symmetry of source and sink and solve the problem
on the reverse graph – reversing all arcs and the roles of source and sink – resulting in O(nM − )
iterations. Therefore, the total number of iterations is O(n min{M + , M − }).
It is important to note that even though the algorithm terminates when total excess is 0, this is
only a sufficient condition for termination, not necessary. At termination both excess and deficit
may be positive, as long as the cut arcs (S, W ) are all saturated. This observation leads to another
corollary.
A procedure for feasible flow recovery is given in Section 8. The feasible flow recovered in Gst
has the flow on all out-of-tree arcs unchanged. In particular for an optimal normalized tree the flow
saturates all arcs in (S, W ) and (S, W ) is a minimum cut. We conclude that for optimum minimum
cut value C(S, W ) = C ∗ the remaining excess at termination is M + − C ∗ . We then get a somewhat
tighter complexity expression,
Corollary 6.3Let the minimum cut capacity be C ∗ then the complexity of the algorithm is O(nC ∗ )
iterations.
Corollary 6.4The complexity of the scaling pseudoflow algorithm is O(mn log min{M + , M − }) iter-
ations.
Lemma 6.2Between two consecutive mergers using merger arc (s, w), the labels of s and w must
increase by at least one unit each.
Hochbaum: The Pseudoflow algorithm
c 0000 INFORMS
Operations Research 00(0), pp. 000–000, ° 15
Proof: Let the label of w be `w = L during the first merger using (s, w). After the merger’s
relabeling, `s ≥ L + 1. Prior to (s, w) serving again as a merger arc, flow must be pushed back on
(w, s) so that (s, w) may become an out-of-tree residual arc. This can happen if either,
• w is above s in a strong branch and the strong merger node is either s or a descendant of s.
After such a merger, the label of w must satisfy, `w = `s ≥ L + 1. Or,
• (w, s) serves as a merger arc. But then w is relabeled to be at least `s +1 and `w ≥ `s +1 ≥ L+2.
In either case `w ≥ `s ≥ L + 1.
Upon repeated use of (s, w) as a merger arc `s ≥ `w + 1 ≥ L + 2. Thus the labels of s and w must
increase by at least 1 each between the consecutive mergers. Q.E.D.
Invariants 3 and 4 imply that no label can exceed n since a label of a node increases only if there
is a residual path from the node to a weak root. It follows that each arc can serve as merger arc
at most n − 1 times throughout the algorithm.
Corollary 6.6There are at most O(mn) calls to procedure split throughout the execution of the
pseudoflow algorithm.
Proof: At any iteration there are at most n branches since there are only n nodes in the graph.
Each call to split creates an additional branch. The number of branches after a merger can either:
Increase – when there are at least two splits;
remain unchanged – when there is exactly one split;
decrease by 1 when there is no edge split. In this case all the strong nodes in the branch containing
the strong merger node become weak.
Since there are only O(mn) iterations the total accumulated decrease in the number of branches
can be at most O(mn) throughout the algorithm. Therefore there can be at most O(mn + n) edge
splits. Q.E.D.
6.3.1. Data Structures We maintain a set of n buckets where bucket k, Bk , contains all the
k-labeled branch roots. The buckets are updated in the following cases:
1. There is a merger and the root of the strong branch no longer serves as root. Here this root is
removed from its bucket
2. A root is relabeled, and then moved to another, higher label, bucket.
3. A split operation creates a new root node. Here the new root node is inserted into the bucket of
its label.
The number of bucket updates is thus dominated by the complexity of the number of mergers and
number of edge splits O(mn).
For the tree operations we use the data structure called dynamic trees devised by Sleator and
Tarjan (1983, 1985). Dynamic trees is a data structure that manages a collection of node disjoint
trees. Among the operations enabled by the dynamic trees data structure are:
findroot(v) find the root of the tree that v belongs to.
findmin(v) find the minimum key value on the path from v to the root of its tree.
addcost(v, δ) add the value δ to the keys of all nodes on the path from v to the root of its tree.
invert(v) invert the tree that v belongs to so it is rooted at v instead of at findroot(v).
merge(u, v) link a tree rooted at u with node v of another tree so that v becomes the parent of u.
split(u, p(u)) split the tree that u and p(u) belong to so that the descendants of u form a separate
tree Tu .
All these operations, and several others, can be performed in time O(log n) per operation (either
in amortized time or in worst case depending on the version of dynamic trees implemented, Sleator
Hochbaum: The Pseudoflow algorithm
16 c 0000 INFORMS
Operations Research 00(0), pp. 000–000, °
and Tarjan (1983, 1985).) The only operation required for the pseudoflow algorithm which is not
directly available is the operation of finding the next edge along the merger path that has residual
capacity less than the amount of excess δ. We call the operation that finds the first arc on the
path from v to the root of the tree with residual capacity less than δ, FIND-FIRST(v, δ). We note
that FIND-FIRST can be implemented as a minor modification of findmin(v), and in the same
complexity as findmin(v), O(log n).
Lemma 6.3The complexity of the labeling pseudoflow algorithm is O(mn log n).
Proof: The number of merger iterations is at most O(mn) and the number of splits is O(mn).
Each iteration requires:
1. Identifying a merger arc (s, w), if one exists, with w of lowest label.
2. Inverting and merging trees.
3. Updating residual capacities along the merger path.
4. Finding the next split edge on the merger path.
For operation 1, a merger arc can be identified efficiently using several possible data structures.
We show, in the next section, that in all the labeling variants the search for a merger arc initiates
at a strong node of a specific label. It is then established that scanning all arcs adjacent to all
strong nodes of label ` requires only O(m) operations. This results in O(mn) steps to identify all
merger arcs throughout the algorithm, or O(1) steps on average per merger arc.
Operations 2,3 use dynamic trees and operation 4 is the FIND-FIRST operation. The complexity
of each of these operations is O(log n). The total complexity is therefore O(mn log n). Q.E.D.
Since s is of lowest label among the strong nodes, the node labeled ` − 1 is necessarily weak. The
relabel is an increase of the label of a single strong node by one unit when it has no neighbor of
lower label and all its children in the strong branch have larger labels.
Lemma 7.1Invariants 1,2,3 and 4 hold for the lowest label variant.
Proof: Invariant 1 holds since the relabel of u occurs only when for all residual arcs (u, v) `u < `v +1.
After increasing the label of u by one unit the invariant inequality still holds.
The relabel operation satisfies the monotonicity invariant, invariant 2, by construction. Invariant
3 is satisfied as it is a corollary of invariant 1, and invariant 4 is satisfied by construction. Q.E.D.
The search for a merger arc is implemented efficiently utilizing the monotonicity property. The
strong nodes are scanned in depth-first-search (DFS) order starting from a lowest label root of
a strong branch. Such a root node is found easily in the lowest label non-empty bucket. Each
backtrack in the strong branch is associated with a relabel of the corresponding node. For each
node we maintain a neighbor-pointer to the last scanned neighbor in the adjacency list since the
last relabel. When a node is relabeled this pointer is reset to the start position. A node that has
its pointer at the end position and has had all its neighbors scanned for a potential merger, is a
candidate for relabeling.
Hochbaum: The Pseudoflow algorithm
c 0000 INFORMS
Operations Research 00(0), pp. 000–000, ° 17
Maintaining the status of out-of-tree arcs is easy as an arc changes its status either in a merger,
when the merger arc becomes an in-tree arc, or in a split when an in-tree arc becomes out-of-tree.
Either one of these cases happens only O(mn) times throughout the algorithm and the update of
status for each takes O(1). To summarize,
Lemma 7.2Finding all merger arcs throughout a phase requires at most O(m) operations for a
total of O(mn) operations for the entire algorithm.
Proof: Let Phase ` be the collection of iterations when the lowest label among the strong nodes
is `. From invariant 3 it follows that there are no more than n phases. The DFS process scans all
arcs in the normalized tree at most twice per phase, and all out-of-tree arcs are scanned at most
once per phase. Therefore, during a single phase the total complexity of searching for merger arcs
is O(m). Q.E.D.
8. Flow Recovery
At termination of the pseudoflow algorithm we have a minimum cut, but not a maximum fea-
sible flow. We show in this section how to construct a feasible flow from any pseudoflow and a
corresponding normalized tree, not necessarily optimal.
Definition 8.1A feasible flow f 0 is said to be associated with a normalized tree T and pseudoflow
f , if all free arcs of f 0 are in T and if for all out-of-tree arcs (i, j) ∈ A \ T , fij0 = fij .
If the normalized tree is optimal then the cut between strong and weak nodes is saturated and
therefore the corresponding feasible flow is maximum.
Theorem 8.1Every normalized tree with pseudoflow f has a feasible flow in Gst associated with
it that can be constructed in O(m log n) time.
The following lemma is needed for the proof of the theorem. The concept of “strictly strong” or
“strictly weak” node refers to a node in a strong (resp. weak) branch with strictly positive excess
(resp. deficit).
Lemma 8.1For any strictly strong node there exists a residual path either to the source or to some
strictly weak node.
Proof: Suppose not. Let v be a strictly strong node for which there is no residual path to the
source or to a strictly weak node. Therefore the set of nodes reachable from v in the residual graph,
R(v), includes only nodes with nonnegative excess.
Since no node is reachable from R(v) in the residual graph, inflow (R(v)) = 0 and thus in particu-
lar inflow (R(v)) − outflow (R(v)) ≤ 0. On the other hand, for all u ∈ R(v), the excess is nonnegative,
inflow (u) − outflow (u) ≥ 0. Now, since v ∈ R(v),
X
0 ≥ inflow (R(v)) − outflow (R(v)) = [inflow (u) − outflow (u)] > 0.
u∈R(v)
c1
Mr 0
w1
rw rs c2 rw rs
2 2 2 2 0
Mr Mr
w2 s2
s G t s G t
cp 0
rw rs rw rs
p q p q
cs
c(A (s)) c(A (t)) c(A (t))
A(s) A(s)
s t s t
A(t) A(t)
(a) (b)
Figure 6 The graph in which flow decomposition generates the corresponding feasible flow. Here Mv = |excess(v)|.
(a) The graph in which excesses are eliminated. (b) The graph after excesses have been eliminated and
before applying flow decomposition to eliminate deficits.
and sink nodes in which the pseudoflow f is feasible by appending nodes and arcs to the graph
Gst as follows: Let all strictly strong nodes in Gst with respect to f be adjacent to a sink node
t̄ with arcs from the excess nodes to t̄ carrying the amount of excess. These excess nodes include
the node t with excess equal to the total capacity of A(t), C(A(t)). All strictly weak nodes have
arcs incoming to them from a node s̄ carrying the deficit flow. The deficit nodes include the source
node s with deficit equal to the capacity of the arcs A(s). The resulting graph has a feasible flow
from s̄ to t̄. Such a graph is shown in Figure 6 (a) (where the quantity |excess(v)| is denoted by
Mv .)
We first decompose the sum of all excesses (which is the portion of the flow from the excess nodes
other than t to t̄). This is done by reversing the graph and the flows on each arc with the amount
of flow becoming the residual capacity of each arc in the opposite direction. This graph contains
a residual path from every excess node to s̄ as proved in Lemma 8.1. Once all the excesses have
been disposed off, there may be some strictly positive deficits left. These are denoted by the flows
cj in Figure 6 (b). All these deficits must now reach t̄ via t in the residual graph since there are
no other positive excess nodes left. Again flow decomposition is employed in order to send these
deficits to t̄.
Finding the flow paths can be done using DFS where at each iteration the procedure identifies
a cycle or a path along which flow is pushed back and eliminates at least one bottleneck arc. The
complexity of this DFS procedure is O(mn). A more efficient algorithm for flow decomposition
using dynamic trees was devised by Sleator and Tarjan (1985). The complexity of that algorithm
is O(m log n). Q.E.D.
In an optimal normalized tree, with a set of strong nodes S, there are no residual arcs in (S, S̄).
In that case it follows from Lemma 8.1 that all positive excess is sent back to the source s using
paths traversing strong nodes only, and all positive deficit is sent back to sink t via weak nodes
only. Thus, for an optimal normalized tree, the pseudoflow saturates (S, S̄), and the associated
feasible flow also saturates the arcs (S, S̄). So the flow on (S, S̄) is equal to the capacity of the
cut C(S, S̄). Given the maximum blocking cut solution and minimum cut the maximum flow is
therefore found in time O(m log n), as proved in Theorem 8.1. This is an alternative proof to the
optimality of a normalized tree with C f (S, S̄) = 0.
Remark 8.1For closure graphs – graphs that have all arcs not adjacent to source and sink, with
infinite capacity – the pseudoflow on the normalized tree is transformed to a feasible flow in O(n)
time, Hochbaum (2001). That algorithm is more efficient for finding feasible flow than the algorithm
Hochbaum: The Pseudoflow algorithm
20 c 0000 INFORMS
Operations Research 00(0), pp. 000–000, °
for general graphs since for closure graphs all out-of-tree arcs must have zero flow on them and
the flow decomposition involves only the arcs within the respective branch. This is the case also for
s, t-tree networks discussed in the Appendix.
Lemma 9.1 (Nestedness)For k parameter values λ1 < λ2 < · · · < λk , the corresponding minimal
(maximal) source set minimum cuts satisfy, Sλ1 ⊆ Sλ2 ⊆ · · · ⊆ Sλk .
Hochbaum: The Pseudoflow algorithm
c 0000 INFORMS
Operations Research 00(0), pp. 000–000, ° 21
The key to the efficiency of the parametric solution is to leave the distance labels unchanged
between consecutive calls to monotonically increasing values of the parameter. Adjusting the graph
2
for a new parameter value in the push-relabel algorithm requires O(m log nm ) time for a total
2 2
of O(mn log nm + km log nm ). For the pseudoflow algorithm the normalized tree remains the same
except that it may require renormalization at a complexity of O(n) when the value of the parameter
is increased. The running time is then O(mn log n + kn).
We now sketch briefly the main concepts of the complete parametric analysis algorithm of Gallo,
Grigoriadis and Tarjan (1989) mimicked here for the pseudoflow algorithm. Each call to the
algorithm is made with respect to a value λ∗ and an interval [λ1 , λ2 ] where λ∗ ∈ [λ1 , λ2 ] and where
the graph has the maximal source set of the minimum cut on Gλ1 shrunk with the source, and the
maximal sink set of the minimum cut on Gλ2 shrunk with the sink. Each such call is provided with
two free runs, one starting from Gλ1 and the other on the reverse graph starting from the solution
on Gλ2 . For a given interval where we search for breakpoints we run the algorithm twice: from the
lower endpoint of the interval where the maximal source set of the cut obtained at that value is
shrunk into the source, and from the highest endpoint of the interval where the maximal sink set
of the cut is shrunk into the sink. The runs proceed for the graph and reverse graph till the first
one is done. The newly found cut subdivides the graph into a source set and a sink set, G(1) and
G(2) , with n1 and n2 nodes respectively, and m1 and m2 edges respectively. Assuming that n1 ≤ n2
then n1 ≤ 21 n. In the smaller interval, corresponding to the graph on n1 nodes, two new runs are
initiated from both endpoints. In the larger interval, however, we continue the previous runs using
two properties:
Reflectivity: The complexity of the algorithm remains the same whether running it on the
graph or reverse graph.
Monotonicity: Running the algorithm on a monotone sequence of parameter values has the
same complexity as a single run.
The implementation of the complete parametric analysis with pseudoflow requires two minimum
cut solutions, one with minimal and one with maximal source sets. From Corollary 4.2 the set of
strong nodes at the optimal solution is a minimal source set. In order to find a maximal source
set minimum cut we solve the problem in the reverse graph. Alternatively, if using the free arcs
variant, the set of strong nodes appended with all 0-deficit branches that do not have residual arcs
to strictly weak branches forms a maximal source set. This collection of 0-deficit branches can also
be generated by a process of normalization, even if the free arcs variant is not used.
Using the reflectivity and monotonicity properties for the labeling pseudoflow algorithm, we
choose a quantity Q to be Q = c log n for some constant c, m1 ≤ m. m2 ≤ m, where n1 + n2 ≤ n + 1
and n1 ≤ 12 n. Let T (m, n) be the running time of the labeling parametric pseudoflow algorithm on
a graph with m arcs, n nodes. The recursive equation satisfied by T (m, n) is
The solution to this recursion is T (m, n) = O(Qmn) = O(mn log n). This omits the operation of
finding the value of λ∗ which is done as the intersection of the two cut functions for the parameter
value λ1 and the parameter value λ2 . This intersection is computed at most O(n) times, each at
O(1) steps for linear functions. Computing the intersection of arbitrary monotone functions can
be done in O(log U ) steps each with binary search, thus requiring an additive factor of O(n log U ).
Hochbaum: The Pseudoflow algorithm
22 c 0000 INFORMS
Operations Research 00(0), pp. 000–000, °
10. Pseudoflow-Simplex
A generic simplex network flow algorithm works with a feasible flow and a spanning tree of the
arcs in the basis, the basis tree. All free arcs are basic and are thus part of the basis tree. A simplex
iteration is characterized by having one arc entering the basis, and one arc leaving the basis.
A normalized tree can serve as a basis tree in the extended network for a simplex algorithm that
solves the maximum blocking cut problem. A merger arc qualifies as an entering arc, but in the
pseudoflow algorithm there are potentially numerous leaving arcs (split arcs). The simplex version
of the pseudoflow algorithm removes the first arc with the bottleneck residual capacity on the cycle
beginning at r, rs , . . . , s, w, . . . , rw , r. At each iteration there is precisely one split edge that may be
such that the strong merger branch is eliminated altogether when the excess arc is the bottleneck
(the residual capacities of all arcs on the cycle is greater or equal to the amount of excess), or the
weak merger branch is eliminated when the deficit arc is the bottleneck. The requirement to remove
the first bottleneck arc is shown below to be essential in order to retain the downwards positive
residual capacities in each branch – a property of normalized trees. Removing a first bottleneck arc
on the cycle has been used previously in the concept of a strong basis introduced by Cunningham
(1976).
Our simplex algorithm for solving the maximum blocking cut problem is called the pseudoflow-
simplex algorithm. Although the algorithmic steps taken by the pseudoflow algorithm and the
pseudoflow-simplex on the same normalized tree can lead to different outcomes in the subsequent
iteration (see Section 12) the complexity of both algorithms is the same.
Let an out-of-tree residual arc between a strong node s0 and a weak node w be referred
to as an entering arc. The cycle created by adding an entering arc to a normalized tree is
[r, rs0 , . . . , s0 , w, . . . , rw , r], where r represents, as before, the root in the extended network. The
largest amount of the flow that can be augmented along the cycle is the bottleneck residual capacity
along the cycle. The first arc (u, v) along the cycle starting with (r, rs0 ) attaining this bottleneck
capacity δ is the leaving arc where
The new basis tree is T ∪{(s0 , w)}\ {[u, v]}. The roots of the branches remain unchanged provided
that neither u nor v is the node r. If u = r then the excess arc is the bottleneck arc and the
strong branch Trs is eliminated and joins the weak branch Trw . If v = r then the deficit arc is the
bottleneck arc and the weak branch is eliminated and joined with Trs . This means that throughout
the algorithm the number of branches is nonincreasing.
procedure pseudoflow-simplex{Gst , f, T, S, W }
begin
while (S, W ) ∩ Af 6= ∅ do
Select (s0 , w) ∈ (S, W ); {(s0 , w) is the entering arc.}
{Leaving arc and flow update:}
Let δ be the minimum residual capacity along the cycle [r, rs0 , . . . , s0 , w, . . . , rw , r]
attained first for arc (u, v):
{ If δ > 0 push δ units of flow along the path [rs0 , . . . , s0 , w, . . . , rw , r]:}
Until vi+1 = r;
Let [vi , vi+1 ] be the ith edge on the path;
{Push flow} Set fvi ,vi+1 ← fvi ,vi+1 + δ;
If fvi ,vi+1 = cvi ,vi+1 then Af ← Af ∪ {(vi+1 , vi )} \ {(vi , vi+1 )};
i←i+1
end
Hochbaum: The Pseudoflow algorithm
c 0000 INFORMS
Operations Research 00(0), pp. 000–000, ° 23
rs rw
s w
(a)
r r
rs rw u rw
u rs
w w
s s
ν ν
(b) (c)
Figure 7 Comparing the split of an edge with an update step in the Simplex algorithm
With the added deficit arcs the push-relabel algorithm works without modification. Since the
algorithm does not generate strict deficits there is no need to add new deficit arcs during execution.
At termination of the push-relabel algorithm, some of the deficit arcs may carry positive flows on
them. In that case, generating a feasible flow can be done by the procedure described in Section 8.
Running push-relabel with pseudoflows permits the use of arbitrary initial pseudoflows, notably
the “saturate-all” initialization. This version of push-relabel allows the use of warm starts. Also,
experimental studies we conducted show that for some classes of problems the pseudoflow-push-
relabel utilizing some of the initialization schemes, runs faster than the standard push-relabel
algorithm, Chandran and Hochbaum (2003).
compared to pseudoflow-simplex, the pseudoflow algorithm does not strive to increase flow feasi-
bility. Pseudoflow-simplex sends only an amount of excess that does not violate the feasibility of
any residual arc along the augmentation path (merger path in our terminology). In contrast, the
pseudoflow algorithm pushes the entire excess of the branch until it gets blocked. This quantity is
always larger or equal to the amount pushed by simplex.
To contrast the split process in pseudoflow as compared to the one in Simplex, consider Figure
7. In (a) the merger arc is added, and edge (u, v) is identified for pseudoflow as the first infeasible
edge, or as leaving arc for simplex. Figure 7 (b) show the resulting branches following “simplex-
split” and (c) shows the branches after split. (In general the choice of the split arc for simplex
may be different from the choice in the corresponding iteration of the pseudoflow algorithm.) Note
that the rooting of the branch on the left is different. For pseudoflow-simplex the set of roots of
the normalized tree with which the procedure works is always a subset of the initial set of roots,
whereas for pseudoflow the set of the strong roots can change arbitrarily.
Another aspect in which the two algorithms differ is that pseudoflow performs several arc
exchanges in the tree during a single merger iteration, whereas simplex performs exactly one.
Appendix A: Motivation and Applications of Tree Normalization
When solving a flow problem in practice, it is often the case that numerous similar instances,
differing from each other in minor data changes, should be solved. When the input changes slightly
it would be beneficial to take advantage of the solution attained for the previous input as a starting
point for solving the problem for the new input – a warm start process. Such warm start for the
pseudoflow algorithm requires normalizing the tree after the capacities have been modified. It is
sufficient to consider capacity changes because all changes in the network data can be reduced to
changes in arc capacities: Removing a node is accomplished by changing all arc capacities adjacent
to the node to 0. Similarly arcs can be removed or included by setting their capacities to 0 or
positive values respectively.
The procedure Normalize, presented here, takes as input a tree T and a specification, or a partition
A \ T = As ∪ A0 , of the out-of-tree arcs where the pseudoflow is to meet their lower bounds A0 and
those where the pseudoflow is to meet the upper bounds As . When arc capacities values change,
the procedure finds a new pseudoflow f 0 that meets the new lower or upper bounds on the new
capacities of out-of-tree arcs A \ T . The normalization procedure completes the specification of f 0
also on the in-tree arcs of T , and delivers a normalized tree T 0 associated with f 0 . The in-tree arcs
of T 0 satisfy T 0 ⊆ T and the out-of-tree arcs A \ T ⊆ A \ T 0 . In other words, this renormalization
procedure can only split each branch of T to a number of branches of T 0 , but branches cannot be
merged.
One application where capacities change in a series of instances is the parametric analysis
described in Section 9. There the sequence of networks has each subsequent modification restricted
to monotone changes in the source adjacent and sink adjacent arcs. In that case all strong nodes
remain strong, and the only change in node status is due to some weak nodes becoming strong.
In another example the capacity changes apply to arcs interior to G, or the changes are to source
and sink adjacent arcs that are not monotone. This happens in a project scheduling problem with
resource constraints described by Möhring et al. (2003). A lagrangian relaxation of the shared
resource results in a minimum cut problem on a graph. Consecutive iterations in the subgradient
method changes the capacities as functions of the Lagrange multipliers, but the changes are small.
The motivation of using warm starts is the expectation that if the changes in capacities are small,
then only a few iterations will be required to reach an optimal solution to the new instance.
Another application of the normalization procedure is for the directed minimum cut problem.
The directed minimum cut problem is to partition a graph G = (V, A) to two subsets A, Ā so
that the cut capacity C(A, Ā) is minimum. This problem is distinguished from the minimum s, t-
cut problem in that the sets are not required to contain the specific nodes s and t respectively.
Hochbaum: The Pseudoflow algorithm
26 c 0000 INFORMS
Operations Research 00(0), pp. 000–000, °
It is possible to solve this problem using the pseudoflow algorithm in complexity O(mn log n),
Hochbaum (2003). The algorithm involves changing the identity of sink nodes between iterations.
At the end of an iteration a sink node t1 is shrunk with the source node and another node t2
(selected in a particular way) becomes a sink node. This means that the arcs incoming into t1 are
set to their lower bounds, the arcs outgoing from t1 are set to their upper bounds, and the arcs
incoming into t2 are set to their upper bounds. So rather than changing capacities, we change the
pseudoflow values on out-of-tree arcs. Since changing the flow values renders the tree no longer
normalized we use the normalization procedure described in the next subsection.
Appendix B: Normalizing a Tree
Given a spanning tree T rooted in r in Gext and a pseudoflow f that has all out-of-tree arcs A \ T
at their upper or lower bounds, we show how to normalize the tree in linear time, maintaining the
values of f on out-of-tree arcs.
The normalization procedure is applied to each tree (or branch) in the forest T ∩ A by scanning
it from the leaves up assigning each node v a flow going to p(v) which balances the flows from and
to leaves and out-of-tree arcs. If the total amount of flow from all nodes other than the parent is
positive then we send the flow balance up to p(v). If the total amount is negative then we pull
it from p(v) to v. When flow blocking edges are encountered because a residual capacity in the
direction required for balancing the flow is not sufficient, the edges [v, p(v)] are split and suspended
from r along with their subtree, as strong branches when the flow amount is positive, and as weak
ones when the flow amount is negative.
The information given in square brackets [ ] is the generation of the values of the pseudoflow f
on in-tree arcs that is associated with the newly normalized tree. Recall that excess(v) represents
the excess at node v. In this procedure we assume, as we had throughout, that all lower bounds
are zero. Adapting it to non-zero lower bounds is straight forward.
s,t-tree network
s t
The output tree T 0 is normalized since any node that does not satisfy flow balance is set as a
root of a respective strong or weak branch using an excess or deficit arc connecting it to r. Also all
downwards residual capacities are positive since if there is 0 excess then the 0-deficit branch is split.
Or when a flow is pulled downwards towards v from p(v) there is again a split if the downwards
residual capacity is equal to the amount of deficit of v. Thus properties 1, 2, 3 and 4 are satisfied
and the tree is normalized.
Lemma B.1The complexity of procedure Normalize is O(n) when the net inflows into each node
are given. Otherwise it is O(m).
Proof: Given the net inflows into each node resulting from out-of-tree arcs, the algorithm scans
each in-tree arc and node at most O(1) times. Thus the complexity if O(n). If these inflows are
not given then computing them requires O(m) steps. Q.E.D.
Given a tree and a set of saturated arcs As , a corresponding pseudoflow is constructed in linear
time O(m). We call this pseudoflow generation procedure that includes the [] statements, proce-
dure pseudoflow-tree. This pseudoflow can then be used to derive a corresponding feasible flow, as
shown in Section 8, in O(m log n) steps.
Appendix C: Maximum Flow on s, t-tree Network in Linear Time
Let T be a directed acyclic graph which is a tree or a forest (in the undirected sense). An s, t-tree
network is a graph Gst = (T ∪ {s, t}, T ∪ A(s) ∪ A(t)) formed by joining T to source and sink nodes
that are linked to any subset of nodes in T . All arcs carry capacity values. An example of an
s, t-tree network is illustrated in Figure 8. One of the motivation for studying maximum flow on
s, t-tree networks is that it serves as a key operation in an efficient minimum cost network flow
algorithm, as shown by Vygen (2002).
To solve the maximum flow problem on an s, t-tree network we apply the process of normalization
to the tree or forest T where each connected component is arbitrarily rooted and As = A(s) ∪ A(t)
and call for procedure pseudoflow-tree. The output is a normalized tree without a residual arc
between strong and weak nodes: To see this, observe first that all out-of-tree arcs are generated as
split arcs during the normalization process. We show that none of the split arcs is residual from
a strong to weak node: If an upwards arc is split, this is because its tail node has positive excess
exceeding its capacity. That node becomes then the root of a strong branch and the arc leaving
that branch is saturated. Similarly for a downwards arc, if it is split, that is because its head node
has deficit that exceeds the capacity of the arc. That head node becomes a weak branch that has
Hochbaum: The Pseudoflow algorithm
28 c 0000 INFORMS
Operations Research 00(0), pp. 000–000, °
the only incoming arc to it, saturated. This normalized tree is thus optimal, and the strong nodes
form a maximum blocking cut set and the source set of a minimum cut. It remains to find the
corresponding feasible flow by sending the excesses and deficits back to source and sink respectively.
This can be done in linear time O(n) using an algorithm similar to the one for finding feasible flow
on closure graphs, Hochbaum (2001). We have thus proved the theorem,
Theorem C.1The maximum flow problem on s, t-tree networks is solved in linear time O(n).
Endnotes
1. We note that the concept of pseudoflow has been used previously in algorithms solving the
minimum cost network flow problem.
2. We thank Michel Minoux for mentioning the boolean quadratic minimization problem’s relation-
ship to the blocking cut problem, and anonymous referees for pointing out the references Radzik
(1993), Gale (1957) and Hoffman (1960).
3. We are grateful to an anonymous referee for pointing out this possibility
Acknowledgments
This research was supported in part by NSF award No. DMI-0620677.
References
Anderson C., D. S Hochbaum. 2002. The performance of the pseudoflow algorithm for the maximum flow
and minimum cut problems. UC Berkeley manuscript.
Boldyreff A. W. 1955. Determination of the Maximal Steady State Flow of Traffic Through a Railroad
Network. JORSA 3(4) 443–465.
Chandran B., D. S Hochbaum. 2003. Experimental study of the pseudoflow push-relabel algorithm. UC
Berkeley manuscript, submitted.
Cunningham W. H. 1976. A network simplex method. Math. Programming 1(1) 105–116.
Dinic E. A. 1970. Algorithm for solution of a problem of maximal flow in a network with power estimation.
Soviet Math. Dokl., 11 () 1277-1280.
Ford, Jr. L. R., D. R. Fulkerson. 1957. A simple algorithm for finding maximal network flows and an appli-
cation to the Hitchcock problem. Canad. J. Math. 9 210–218.
Gale D. A theorem of flows in networks. Pacific J. of Math. 7 (1057), 1073-1082.
Gallo G., M. D. Grigoriadis, R. E. Tarjan. A fast parametric maximum flow algorithm and applications.
SIAM J. Comput. 18(1) 30–55.
Goldberg A. V., B. V. Cherkassky. 1997. On implementing the push-relabel method for the maximum flow
problem. Algorithmica 19 390–410.
A. V. Goldberg, Grigoriadis M. D., R. E. Tarjan. 1991. The use of dynamic trees in a network simplex
algorithm for the maximum flow problem. Math. Programming 50 277–290.
Goldberg A. V., B. M. E. Moret. 1999. Combinatorial algorithm test sets CATS: the ACM/EATCS platform
for experimental research. Proceedings of the tenth annual Symposium on Discrete Algorithms 913–914.
Goldberg A. V., S. Rao. 1998. Beyond the flow decomposition barrier. J. of the ACM 45 783–797.
Goldberg A. V., R. E. Tarjan. 1988. A New Approach to the Maximum Flow Problem. J. Assoc. Comput.
Mach. 35 921–940.
Goldfarb D., W. Chen. 1997. On strongly polynomial dual algorithms for the Maximum flow problem. Special
issue of Math. Programming, Ser. B, 78(2) 159–168.
Hochbaum: The Pseudoflow algorithm
c 0000 INFORMS
Operations Research 00(0), pp. 000–000, ° 29
Gusfield D., E. Tardos. 1994. A Faster Parametric Minimum-Cut Algorithm. Algorithmica 11(3) 278–290.
Hochbaum D.S., B.G. Chandran. 2004. Further below the flow decomposition barrier of maximum flow for
bipartite matching and maximum closure. Submitted.
Hochbaum D. S., A. Chen. 2000. Performance analysis and best implementations of old and new algorithms
for the Open - Pit Mining Problem. Oper. Res. 48(6) 894–914.
Hochbaum D. S. 2001. A new-old algorithm for minimum-cut and maximum-flow in closure graphs. Networks
37(4) 171–193.
Hochbaum D. S. 2003. A pseudoflow algorithm for the directed minimum cut problem. Manuscript, UC
Berkeley.
Hochbaum D. S. 2003. Efficient Algorithms for the Inverse Spanning Tree Problem. Oper. Res. 51(5) 785–797.
Hoffman A. J. 1960. Some recent applications of the theory of linear inequalities to extremal combinatorial
analysis. In Proceedings of Symposia in Applied Mathematics Vol X, Combinatorial Analysis R. Bellman
and M. Hall Jr., eds. (American mathematical Society, Providence) 113–127.
King V., S. Rao, R. Tarjan. 1994. A Faster Deterministic Maximum Flow Algorithm. J. of Algorithms 17(3)
447–474.
Karzanov A. V.. 1974. Determining the maximal flow in a network with a method of preflows. Soviet Math.
Dokl. 15 434–437.
Lerchs H., I. F. Grossmann. Optimum Design of Open-Pit Mines. Transactions, C.I.M. LXVIII 17–24.
Malhorta V. M., M. P. Kumar, S. N. Maheshwari. 1978. An O(|V |3 ) algorithm for finding maximum flows
in networks. Information Proc. Letters, 7(6) 277–278.
Martel C. 1989. A comparison of phase and nonphase network flow algorithms. Networks 19(6) 691–705.
Möhring R. H., A. S. Schultz, F. Stork, M. Uetz. 2003. Solving project scheduling problems by minimum cut
computations. Management Science 49 330–350.
Picard J. C. 1976. Maximal Closure of a Graph and Applications to Combinatorial Problems. Management
Science 22 1268–1272.
Radzik T. 1993. Parametric flows, Weighted means of cuts, and fractional combinatorial optimization. In
Complexity in Numerical Optimization, World Scientific, P. M. Pardalos Ed. 351–386.
Sleator D. D., R. E. Tarjan. 1983. A data structure for dynamic trees. Journal of Computer and System
Sciences, 24, , 362-391.
Sleator D. D., R. E. Tarjan. 1985. Self-adjusting binary search trees. Journal of the ACM 32 652–686.
Vygen J. On Dual Minimum Cost Flow Algorithms. 2002. Math. Methods of Oper. Res. 56 101–126.