How to Compute Least Infeasible Flows

How to Compute Least Infeasible Flows∗
S. Thomas McCormick
Faculty of Commerce and Business Administration
University of British Columbia
Vancouver, BC V6T 1Z2 Canada
April 1993, Revised November 1993, February 1995
UBC Faculty of Commerce Working Paper 93-MSC-007
Keywords: network flows, min-cost flow, cut canceling
Abstract
It is well-known how to use maximum flow to decide when a flow
problem with demands, lower bounds, and upper bounds is infeasible.
Less well-known is how to compute a flow that is least infeasible. This
paper considers many possible ways to define “least infeasible” and shows
how to compute optimal flows for each definition. For each definition it
also gives a dual characterization in terms of cuts, a polynomial routine
for recognizing that type of least infeasible flow, and relates that definition
to dual cut canceling min-cost flow network algorithms.
1
Introduction
Suppose that we are given a flow network with lower bounds l, upper bounds u,
and demands d. We want to find a feasible flow x satisfying conservation and
the bounds. The standard tool for doing this (see, e.g., Ahuja, Magnanti and
Orlin [3, Application 6.1, p. 169] for this and other networks basics) is to first
choose any x0 satisfying the bounds and compute the excess ei at each node i,
defined as
X
X
ei =
x0ki −
x0ij − di .
(1)
j
k
We then construct a max flow network by adding a new source node s and an
arc s → i for all nodes i with ei > 0 with capacity ei , and a new sink node t
∗ This research was partially supported by an NSERC Operating Grant, an NSERC Grant
for Research Abroad, and a UBC Killam Faculty Study Leave Fellowship. Parts of this
research were done while the author was visiting Laboratoire ARTEMIS IMAG at Universit´
e
Joseph Fourier de Grenoble, France.
1
and an arc j → t for all nodes j with ej < 0 with capacity −ej . Other arcs have
their usual augmenting capacities w.r.t. x0 . Then it is well known that a max
flow saturates s (and t) if and only if the original network has a feasible flow.
We call this procedure Phase I Max Flow.
But what should be done if no max flow saturates s? Clearly the network
must be changed in order to achieve feasibility. One helpful tool is:
Theorem 1.1 (Hoffman’s Circulation Theorem [19]) The data l, u, and
¯ whose value
d are infeasible if and only if there is a cut (S, S)
¯ − u(S,
¯ S)
V (S) ≡ d(S) + l(S, S)
(2)
is positive.
That is, a positive cut constitutes a proof of infeasibility, and must be repaired somehow to achieve feasibility.
Unfortunately, positive cuts are not an easy concept for applied modelers to
grasp. However, positive cuts usually have associated “least infeasible flows”,
which come from the max flow at the end of Phase I Max Flow. Such flows
can give a modeler a more concrete idea of possible causes of infeasibility than
positive cuts since least infeasible flows will have nodes and/or arcs where either
conservation or boundedness is violated. The modeler can then concentrate their
repair efforts at those nodes or arcs. This argues that it may be worthwhile to
consider least infeasible flows as being a more practically useful tool for resolving
infeasibility in networks than positive cuts.
Thus this paper concentrates on characterizing various types of least infeasible flows, and providing efficient algorithms for computing them. Note that
there are two parts to primal feasibility, namely conservation and boundedness.
Our various types of least infeasible flows will come from different choices for
which part(s) we shall allow to be infeasible, and what norm we’ll use to measure
infeasibility.
This paper considers the alternatives of enforcing conservation but allowing
minimal violations of boundedness, enforcing boundedness but allowing minimal
violations of conservation, and allowing minimal violations of both. It considers measuring infeasibility as a sum of violations (`1 -norm, Section 4), as the
Euclidean size of violations (`2 -norm, Section 7), as a maximum of violations
(`∞ -norm, Section 5), and weighted versions of these. It also considers a special
norm where the infeasibility is “balanced” around each cycle (Section 6). Some
of these variations have been studied before, but several of them lead to new
results and new algorithms.
Along with each variation we give an algorithm for computing the corresponding least infeasible flow, and an algorithm for recognizing least infeasible
flows under this measure. We also give a dual characterization of least infeasible flows for each measure (analogous to Hoffman’s Circulation Theorem).
2
Such dual characterizations often lead to interesting Min-Cost Network Flow
(MCNF) algorithms, so we comment on this along the way as well.
A geometric way of looking at our problem is to imagine the polytope F
in IR2A+N consisting of all network data (l, u, d) that yield feasible networks
(F is a polytope since Theorem 1.1 shows that equations (2) are precisely the
constraints defining F ). Infeasible data then correspond to a point in IR2A+N
outside of F . In this viewpoint a least infeasible flow picks out a point in F
closest to our given data in some norm. In this sense our results in Section 7
are related to the problem that Frank and Karzanov consider in [8].
In practice, the infeasibility concepts that we suggest here, varied as they
are, may still result in structures that are too large for a modeler to easily use
for repairing the infeasibility. A natural question to ask is if one can compute,
e.g., a smallest possible subset of nodes forming a positive cut. Unfortunately,
Aggarwal, Hao and Orlin [1] have shown that this problem is NP-Complete.
However, they also give an algorithm for computing a minimal positive cut in
essentially the same asymptotic time as one max flow.
Given that it is hard to find a smallest such structure, we can still search for
heuristic procedures that work well for practical instances at identifying small,
meaningful, localized infeasibilities. There has been a lot of previous work in
this area; see, e.g., Greenberg [14, 15, 16] and the references cited therein for
pointers to this work. (Note that there is a diversity of terms in the literature:
What we call here a positive cut is called an isolation by Greenberg, and a
witness by Aggarwal, Hao and Orlin.) However, it is still plausible that some
of the flow and/or cut concepts in this paper would be helpful for these more
practical heuristics since they could potentially provide a wider range of starting
points from which to search for a localized cause of infeasibility.
2
Notation and Background
A directed graph D is a pair D = (N, A) where N is a set of nodes and A is a
set of ordered pairs of nodes, called arcs. We denote an arc directed from node
i to node j by i → j.
An (undirected) cycle Q in a directed graph is a sequence i1 , i2 , . . . , ik of
distinct nodes of N such that either (ir → ir+1 ) ∈ A (a forward arc in Q) or
(ir+1 → ir ) ∈ A (a backward arc in Q) for r = 1, 2, . . . , k (where we interpret
ik+1 as i1 ). A directed cycle is a cycle with all forward arcs. A directed path is
the same as a directed cycle except without arc ik → i1 . We say that a directed
graph is strongly connected if for all nodes i, j, there is a directed path from i
to j, and a directed path from j to i.
If S is a non-trivial subset of N (i.e., S 6= ∅, S 6= N ), define the cut
¯ = {i → j ∈ A | i ∈ S, j ∈
(S, S)
/ S}
3
¯ ∪ (S,
¯ S). Arc i → j ∈ (S, S)
¯ is forward in (S, S)
¯ and
and define { S, S¯ } = (S, S)
¯
¯
¯
¯
backward in (S, S). A cut (S, S) is directed if (S, S) = {S, S}, in which case it is
¯ S) = {S, S},
¯ in which case it is backward directed . Note
forward directed , or (S,
that a directed graph is strongly connected if and only if it has no directed cuts.
This is dual to the fact that a directed graph is acyclic if and only if it has no
directed cycles.
A network is a directed graph with lower bounds l ∈ { −∞, IR }A , upper
bounds u ∈ { +∞, IR }A , and demands d ∈ IRN (if di < 0, then −di is a supply
at node i). We assume throughout that l ≤ u, that eT d = 0 (sum of supplies
equals sum of demands), and that the underlying graph is connected. A flow is
a vector x ∈ IRA . We call flow x feasible if it satisfies
X
X
xki =
xij + di
for all i (conservation)
(3)
j
k
and
lij ≤ xij
≤ uij
for all i → j (boundedness).
(4)
Given l, u, and d, the existence of a feasible flow can be checked using one max
flow via the Phase I Max Flow procedure.
When the data are not feasible we must relax the constraints to achieve
feasibility, and then a least infeasible flow can be defined by a penalty function on
the amounts of relaxation. Denote the lower and upper relaxations of (3) by vi
and wi , and the lower and upper relaxations of (4) by pij and qij . Alternatively,
these variables represent the amount of violation of feasibility at a node or arc.
Then in the weighted minsum case, a least infeasible flow will minimize the
linear objective with positive weights bi on nodes and bij on arcs. We get the
linear program
X
X
min
bi (vi + wi ) +
bij (pij + qij )
i
s.t.
di − vi
≤
Xi→j
X
xki −
xij
lij − pij
≤
≤ di + wi
for all i
≤ uij + qij
for all i → j.
j
k
xij
v, w, p, q
≥ 0
In order to characterize optimal least infeasible flows we need to look at
the dual of the above LP. The main dual variables are the node potentials π ∈
IRN . We apparently also need dual variables on the arcs, but the main dual
constraints imply that these can be defined using the node potentials using the
potential differences, defined as
∆πij = πi − πj .
Then we can assume w.l.o.g. that the arc dual variable for the lower bound on
+
i → j is ∆πij
, the positive part of ∆πij , and the arc dual variable for the upper
4
−
bound is ∆πij
, the negative part. With these definitions, the dual LP looks like
max dT π + lT ∆π + − uT ∆π −
s.t.
|πi |
|∆πij |
≤ bi
for all i
≤ bij
for all i → j
(5)
(6)
π free.
As we vary the norm used to measure infeasibility, the form of these dual
problems will change. In simple cases optimal solutions to the dual problems
will partition the nodes into two sets of constant π value, and the potential
differences on the arcs between the sets pick out the arcs in the induced cut.
In some cases we can guarantee that primal flows and dual node potentials are
integral (with integral data), in others they will in general be fractional.
In the minsum case we have here, the dual objective value corresponds to the
value of the cut as defined by (2), and we get a linear programming interpretation
of Hoffman’s Circulation Theorem saying that l, u, and d are infeasible (the
primal LP has positive objective value) if and only if there is a cut with positive
value (the dual LP has positive objective value). It is easy to transform this
case into an ordinary min-cost flow problem, so in this case we are assured of
primal and dual integral solutions with integral data.
Note that without the bounds on |π| and on |∆π| the dual LP would be
homogenous, so that if there is any positive cut at all, the dual would be unbounded. The bounds (5) and (6) arise from the primal objective, so in choosing
the form of our objective for least infeasible flow, we are effectively choosing a
way to normalize the dual LP for choosing a most positive cut.
We can allow only node violations (force boundedness to be satisfied by
fixing p and q to be 0, which removes the bound on ∆π in the dual), only arc
violations (force conservation to be satisfied by fixing v and w to be 0, which
removes the bound on π in the dual), or both node and arc violations. However,
it is easy to reduce the case of allowing both node and arc violations to the case
of allowing only arc violations by adding a new node 0 with d0 = 0. Then for
each node i with di ≥ 0 we add an arc i → 0 with li0 = ui0 = di , and for each
node i with di < 0 we add an arc 0 → i with l0i = u0i = −di . Lastly, we reset
all di = 0. Then a least arc infeasible flow in this new network corresponds
naturally to a least arc and node infeasible flow in the original network.
Furthermore, we could consider one-sided infeasibilities by fixing one of v,
w or p, q to be zero. This would correspond to having one-sided bounds in (5)
and/or (6). However, these one-sided variants turn out to be minor extensions
of their two-sided cousins.
Let a denote a generic vector of relaxation variables indexed by the set F ,
i.e., a could be just v and w so that F is the nodes, or it could be all four vectors
so that F is both nodes and arcs. Three reasonable infeasibility objectives are
5
to minimize the sum of the infeasibilities,
min eT a
(the minsum objective),
(7)
minimize the Euclidean size of the infeasibilities,
min aT a
(the Euclidean objective),
(8)
and to minimize the largest infeasibility,
min max af
F
(the minmax objective).
(9)
We could also consider versions of these objectives with weights b on the arcs
and/or nodes.
To gain even greater insight into infeasibility we can require a least infeasible flow to be not only minimum by some global measure, but also locally
feasible everywhere. A natural such local measure in the case where we keep
conservation and allow violations of boundedness can be defined as follows. It is
well-known that pushing flows around cycles (i.e., increasing xij by on forward
arcs of Q and decreasing xij by on backwards arcs of Q) preserves conservation. A plausible definition of a least infeasible flow is that it should have the
property that pushing around any cycle should not improve the maximum violation of the arcs on that cycle. Equivalently, if the maximum violation in Q is z,
then Q should have either two oppositely oriented arcs which both have pij = z,
or which both have qij = z, or two similarly oriented arcs with pij = qhk = z.
We call a flow with this property cycle balanced. We shall see in Section 6 that
cycle balanced flows can be computed in strongly polynomial time, and that
they form a subclass of the flows optimizing objective (9).
The counterpart of this local measure in the reverse case where we keep
boundedness and allow violations of conservation is as follows. The basic operation that preserves boundedness is pushing flows on paths augmenting w.r.t.
the current flow. Pushing on such a path causes a local improvement in the
maximum absolute violation if and only if we can push from a node i with excess ei to a node j with excess ej < ei . We call a flow with no such augmenting
paths node balanced. We shall see in Section 7 that node balanced flows can
also be computed in strongly polynomial time, and that they form a subclass
of the flows optimizing objectives (8) and (9).
3
Minimum Cost Network Flows
If we are also given costs c ∈ IRA on the arcs of a network, then Minimum Cost
Network Flow (MCNF) is the problem of minimizing the total cost cT x over all
feasible flows. Primal infeasibility results lead to dual MCNF algorithms in the
following way: Dual variables are node potentials π ∈ IRN , which yield reduced
6
costs c¯πij ≡ πi + cij − πj . From complementary slackness, we know that π is dual
optimal if and only if the modified bounds lπ and uπ defined below are feasible:
if cπij > 0
then `πij = uπij = `ij
if cπij = 0 then `πij = `ij , uπij = uij
if cπij < 0
then `πij = uπij = uij .
When lπ , uπ , and d are infeasible, by Hoffman’s Circulation Theorem we get
¯ ≡ d(S) + lπ (S, S)
¯ − uπ (S,
¯ S) > 0. (Note that V π (S, S)
¯ is
a cut with V π (S, S)
¯
just the ordinary value of cut (S, S) defined by (2) in the network with bounds
`πij and uπij .) Then if we increase π by δ on S, the dual objective value will
¯ This process is called canceling the positive (w.r.t. π)
increase by δV π (S, S).
¯ Cut canceling (called Hassin’s Algorithm in [6]) is the basis for many
cut (S, S).
dual MCNF algorithms.
Each of our notions of a least infeasible flow in an infeasible network will be
accompanied by a corresponding notion of a cut or cuts proving the optimality
of the least infeasible flow. Then each notion of cut will give us a corresponding
dual MCNF algorithm. We shall comment on what is known about each cut
canceling algorithm as we encounter each notion of cut.
4
Minimizing the Sum of Infeasibilities
As noted in Section 2, this class of problems can be formulated as min-cost flow
problems, and so always have integral primal and dual solutions with integral
data.
The easiest case here is where we enforce boundedness and minimize the sum
of the wi . Note that the wi are precisely the positive parts of the excess defined
in (1). Since the max flow in the Phase I Max Flow procedure minimizes the
sum of the positive excesses, the result of the Phase I Max Flow procedure is a
least infeasible flow for this definition.
This objective forces optimal dual π’s to be 0,1, which picks out a single cut.
By duality of the primal and dual LPs, this cut must have the largest value (by
definition (2)) over all cuts. By max flow/min cut, this most positive value cut
is the min cut from the Phase I Max Flow procedure.
To recognize such flows it is easy to show that:
Theorem 4.1 A flow x is least infeasible for the minsum objective with only
node violations allowed if and only if there is no augmenting path w.r.t. x from
a positive excess node to a negative excess node.
Note that this gives an immediate O(m) algorithm for recognizing such flows,
and that the cut of non-augmentable arcs separating the positive excess nodes
7
from the negative excess nodes must be a most positive value cut. Also, Phase I
Max Flow is essentially making use of this characterization by looking for such
augmenting paths.
If we change to the more conventional node infeasibility objective of minimizing the sum of all wi and vi , then we get essentially the same answer as
above. This is because the sum of the positive excesses always equals the sum
of the negative excesses, so that minimizing the sum of the positive ones also
minimizes the sum of all of them, except for an extra factor of two in objective
value. This extra factor of two arises in the dual because optimal π’s will now
take on values of ±1, so that the ∆π’s will be 0, ±2, which multiplies cut value
by two.
Hassin [17] considered using cuts with most positive values in a cut canceling
algorithm for MCNF. He showed that this algorithm has exponential worst case
(although he reports anecdotal evidence that it works well in practice). However,
Ervolina and McCormick [7] show that if we choose a close relative of most
positive valued cuts called most helpful total cuts, we get a polynomial-time
MCNF algorithm.
The situation where we instead enforce conservation and minimize the sum of
arc violations appears not to have been studied previously and is quite different.
Now the π’s are unconstrained in the dual LP, except indirectly by the fact that
the absolute values of the ∆π’s are constrained to be at most one. Thus an
optimal dual solution will have the π’s taking on consecutive integer values in
such a way that the absolute value of the potential difference across every arc
is at most one. Thus the dual solution corresponds to a family of arc-disjoint
cuts, and the optimal objective value is the sum of the values of the cuts in the
family. Thus a dual solution is a most positive disjoint family of cuts. This is
an intriguing certificate of infeasibility since it points out possibly several places
where the network needs to be repaired, not just a single cut.
For this definition of least infeasible, computing a least infeasible flow and
corresponding family of cuts is a special sort of MCNF problem. That is, there
is no cost for flow between the bounds, but there is a unit cost for flow outside
the bounds (which can be modeled by making parallel arcs). We can take
advantage of the fact that all costs are 0,1 and use Goldberg and Tarjan’s
MCNF algorithm [13] that runs in O(mn log(n2 /m) log n) time, or Ahuja, et
al’s [2] MCNF algorithm that runs in O(mn log log U log n) time in this case
(here U is the largest arc bound).
To characterize such flows, we first need some definitions. Given a flow x
satisfying conservation but not boundedness, define an auxiliary graph D(x) on
the same node set as D. Every arc i → j becomes a pair of arcs i → j and j → i
in D(x) with distances dij and dji . Where D has an arc i → j with xij > uij
(resp. xij < lij ) (a violation arc), make dij = +1, dji = −1 (resp. dij = −1,
8
dji = +1). Where D has an arc i → j with lij < xij = uij (resp. uij > xij = lij )
(a bound arc), make dij = +1, dji = 0 (resp. dij = 0, dji = +1). Where D has
an arc i → j with lij = xij = uij (also a bound arc), make dij = dji = +1.
Where D has an arc with lij < xij < uij make dij = dji = 0. Then if D(x) has a
directed cycle Q of negative distance, then augmenting around Q will decrease
the sum of arc violations (since more violations are decreased than increased by
this augmentation). Call such a cycle a net violation cycle. This observation
forms the basis of the proof of:
Theorem 4.2 Flow x is least infeasible for the minsum objective with only arc
violations allowed if and only if there are no net violation cycles in D(x).
Note the interaction between Theorem 4.2 and the disjoint family of cuts
proving x’s optimality: By complementary slackness, all violation arcs w.r.t. x
must be in a cut in the disjoint family. Thus if a cycle Q contains a forward
violation arc, it must also contain a backwards arc from the same cut in the
family, and again by complementary slackness this arc must be a violation or
bound arc. Thus the disjoint family of cuts is also a certificate verifying that
no net violation cycles exist in D(x).
Given a flow x, to check if it is a least infeasible flow of this type, by Theorem 4.2 we need only check D(x) for negative cycles. Because all distances in
√
D(x) are 0, ±1, it can be checked for negative cycles in only O( nm) time using Goldberg’s scaling shortest paths algorithm [12]. Because D(x) has a more
restricted structure than what is considered in [12], it is natural to wonder if
there is a faster special-purpose algorithm for checking D(x) for negative cycles.
We can use these most positive families of cuts in a MCNF cut canceling
algorithm as follows. The paper [7] shows how to embed most positive (single)
cuts in a polynomial cut canceling algorithm for MCNF. Since the sum of the
values of the cuts in a most positive family of disjoint cuts must be at least
as big as the single most positive cut, we could just as well use most positive
families of cuts in the algorithm in [7] and we would achieve the same polynomial
bound. This is analogous to what Barahona and Tardos [4] do for Weintraub’s
Algorithm [28]: Since it is NP Complete to find a most negative cycle, Barahona
and Tardos instead solve an assignment problem to find a most negative disjoint
set of cycles, and rely on the fact that this most negative disjoint family of
cycles is at least as negative as the most negative cycle and thus achieve the
same polynomial bound that canceling single most negative cycles would have.
As mentioned in Section 2, minimizing the sum of both node and arc infeasibilities easily reduces to the case of arc infeasibilities. Solutions for the case
of both node and arc infeasibilities will have the same structure as in the case
of arc infeasibilities. The case we considered at the beginning of this section
with only node infeasibilities is more straightforward than either of the cases
9
involving arc infeasibilities because in the node case all the node infeasibilities
can be collected into single source and sink nodes. This is impossible in the two
arc cases.
Weighted cases can be solved straightforwardly as MCNF problems.
5
Minimizing the Maximum Infeasibility
This class of objectives changes the LPs significantly. In the primal we add a
new variable z to carry the objective value, and add new constraints that each
variable af involved in the objective must satisfy af ≤ z. The effect of this in
the dual is to add a “convexification” constraint that says that the sum of the
absolute values of the dual variables corresponding to the primal constraints
involved in the primal objective (π’s for conservation, ∆π’s for boundedness)
must equal one.
We have a sort of meta-duality here: in Section 4 the primal minimized the
sum of absolute values of violations, leading to a dual normalization of bounded
individual dual variables. Here we have the reverse where the primal bounds
individual variables, and the dual is normalized by requiring a constant sum of
absolute values of dual variables.
Since the dual LP is now homogenous except for the convexification constraint, an easy application of fractional programming theory [22] reveals that
the dual is asking for a cut whose value per positive component (mean value)
is most positive, a maximum mean cut. Since the value of the primal and dual
optima is the mean value of a max mean cut, which can be fractional, in general
we are not guaranteed integral optimal solutions here. However, it follows from
results in [22] that there is always an optimal solution where the optimal node
potentials take only two values, and so implicitly define a cut (which is of course
a max mean cut).
The most studied case here is where we enforce conservation and ask for
a flow that minimizes the maximum violation of boundedness, which leads to
an arc-wise max mean cut. This first appeared in [22], and faster algorithms
for computing both a least infeasible flow and a maximum mean cut appear in
[20, 24, 26, 25, 23]. Ervolina and McCormick [6] show that canceling max mean
cuts leads to a strongly polynomial MCNF algorithm.
The flow characterization here is:
Theorem 5.1 ([22]) A flow x is least infeasible for the minmax objective and
arc violations if and only if the graph becomes disconnected when we delete the
arcs with the maximum violation value.
This condition can be checked in linear time.
10
The converse case where we enforce boundedness but allow node violations
and ask for a flow minimizing the maximum excess leads to node-wise max mean
cuts. It can be formulated as the sort of parametric max flow problem considered
in Gallo, Grigoriadis and Tarjan [11]: Relax the capacities on the s → i arcs
in the Phase I Max Flow network to ei − λ for parameter λ (if ee − λ < 0 we
replace arc s → i by i → t with capacity λ − ei ). Then we are looking for the
smallest value of λ such that there is a flow saturating s. (We can use essentially
the same trick to maximize the most negative node violation, or to minimize
the largest absolute node violation.) Such parametric problems can be solved in
O(mn log(n2 /m)) time using the methods in [11], which is essentially the same
asymptotic time it take to solve one max flow problem. Hassin [18] shows that
choosing such cuts in a cut canceling algorithm for MCNF can take exponential
time in the worst case.
Flow characterizations in this case are:
Theorem 5.2
1. A flow x is least infeasible for minimizing the maximum
excess if and only if there is no augmenting path w.r.t. x from a node of
maximum positive excess to a node of lesser excess.
2. A flow x is least infeasible for maximizing the minimum excess if and only
if there is no augmenting path w.r.t. x to a node of minimum negative
excess from a node of greater excess.
3. A flow x is least infeasible for minimizing the maximum absolute excess if
and only if when its maximum absolute excess is positive it satisfies condition 1 above, and if its maximum absolute excess is negative it satisfies
condition 2.
These conditions can be checked in linear time. Note also that a flow of minimum
absolutely largest excess must also minimize either the maximum positive excess
or the negative of the maximum negative excess. This theorem can be seen to
be a special case of general results in [10, Section 10].
If we allow both conservation and boundedness to be violated and ask for a
flow minimizing the maximum over both node and arc violations, then, since the
reduction in Section 2 converts this case to the pure arc case, all the methods
for the pure arc case apply also to this case. The same argument shows that
canceling this sort of max mean cut also leads to a strongly polynomial MCNF
algorithm.
If there are weights on node violations, the methods in [11] still work in
the same strongly polynomial time. If there are weights on arc violations, the
methods in [25] will still work in strongly polynomial time, albeit with a slower
time bound.
11
6
Computing Cycle Balanced Flows
A type of least infeasible flow that has apparently not been considered before is
where we enforce conservation and allow violations of boundedness, and where
we require that pushing around any cycle must worsen the cycle’s maximum
violation. That is, each cycle is locally as good as it can be instead of merely
requiring a global condition. Recall that we call a least infeasible flow under
this definition a cycle balanced flow.
The key step in computing cycle balanced flows is as follows. Suppose that
we first compute a least infeasible flow x0 and an arc-wise max mean cut (S 0 , S¯0 )
with mean value z 0 for the max violation objective, where only arc violations
are allowed (conservation is enforced). Let Q be any cycle crossing cut (S 0 , S¯0 ).
By complementary slackness between x0 and (S 0 , S¯0 ), every (S 0 , S¯0 ) arc must
have qij = z 0 w.r.t. x0 , and every (S¯0 , S 0 ) arc must have pij = z 0 w.r.t. x0 .
Now Q must cross the cut (S 0 , S¯0 ) at least twice, and these two arcs satisfy the
balance condition for Q w.r.t. x0 .
Now delete the arcs in { S 0 , S¯0 } from the network, splitting it into two
connected components. For i ∈ S 0 update di to
di = di + x0 (i, S¯0 ) − x0 (S¯0 , i),
and perform the similar update for i ∈ S¯0 . Since x0 satisfies conservation, this
new set of demands still sums to zero in each connected component. Also, x0
restricted to each component satisfies conservation w.r.t. the new demands and
has maximum violation z 0 . Thus the max mean cut value in each component is
at most z 0 .
Therefore we can compute least infeasible flows and max mean cuts in each
component and replace the parts of x0 not including the arcs of (S 0 , S¯0 ) with the
two new flows. Since the max violation of each of the two new flows is at most
z 0 , the balance condition for cycles crossing (S 0 , S¯0 ) still holds. Furthermore,
any cycle Q that does not cross (S 0 , S¯0 ) but that does cross one of the two new
max mean cuts will now also satisfy the balance condition. We can continue in
this manner until every cycle satisfies the balance condition.
After computing at most n − 1 max mean cuts, all components will consist
of a single node, and so every cycle will satisfy the balance condition. Thus
the complexity of computing a cycle balanced least infeasible flow is O(n) times
the complexity of computing a minmax least infeasible flow. This procedure is
essentially the dual of the procedure suggested by Schneider [27] for computing “max balanced” graphs. It is natural to wonder if a faster algorithm for
computing cycle balanced flows exists, especially since Young, Tarjan and Orlin
[29] have shown how to compute max balanced graphs in essentially the same
time as only one min mean cycle computation (instead of O(n) min mean cycle
computations).
12
A corollary to the algorithm is that a cycle balanced flow must in particular
be a minmax least infeasible flow. Also, since cycle balanced flows generalize
the minmax flows from the previous section, and since the minmax flows are
not in general integral, cycle balanced flows are also not integral in general.
The theorem characterizing least infeasible flows in this case is:
Theorem 6.1 A flow x is cycle balanced if and only if every arc i → j belongs
to a cut { S, S¯ } in which i → j’s violation is minimum.
This condition can be checked in O(m2 ) time. It is dual to a characterization
of max-balanced flows in [27].
The n − 1 “tree-structured” max mean cuts encountered while computing a
least infeasible cycle balanced flow x form a dual certificate of x’s optimality. As
in the case of the minsum of arc violations objective, this dual object consisting
of many cuts gives a much finer idea of how to repair the network’s infeasibility
than a classic single cut. No work appears to have been done on using these
cuts in an MCNF algorithm.
Essentially the same algorithm will work in the weighted case using the
weighted max mean cut algorithm in [25]. The next section shows that minimum
Euclidean node violation flows are a node violation version of cycle balanced
flows.
7
Minimizing the Euclidean Size of Violations
This case is much like the minsum (`1 -norm) case, except that while the minsum
case cared about balancing the number of positive and negative violations, the
Euclidean case cares about balancing the sum of the magnitudes of the positive
and negative violations. Since our objective is convex, all we have to worry about
is removing any local way of decreasing the objective, and we know that we
have the global optimal. It is easy to construct examples where Euclidean least
infeasible flows have neither primal nor dual integrality. Minimum Euclidean
distance problems are interesting partly because they arise in the context of
minimizing submodular set functions, see Fujishige [10, Lemma 7.4]; also, many
of the results in this section can be seen to be special cases of general results in
[10, Sections 8–10].
We first consider the simpler case where we enforce boundedness and minimize node violations. This problem appears as Problem 14.5 in [3]. Here it
is well-known that we can move from one flow to another along augmenting
paths. An augmenting path decreases the Euclidean objective if and only if it
goes from a node i with excess ei to a node j with excess ej < ei . Thus our
characterization theorem here is:
13
Theorem 7.1 A flow x is least infeasible for the Euclidean objective, enforcing
boundedness but allowing node violations, if and only if there are no augmenting
paths w.r.t. x from a node i with excess ei to a node j with excess ej < ei .
In particular, comparing with Theorem 4.1 and Theorem 5.2, such a flow must
also be both a minsum node violation flow and a minmax node violation flow
(for all three variants). Such flows are also the closest node-oriented analogue
we have for cycle balanced flows, in that such flows have the property that they
are not only globally optimal, but that every local augmenting path is also as
balanced as possible. Theorem 7.1 can be seen to be a special case of a result
of Fujishige [9, Theorem 3.2].
We can check a flow for the condition in Theorem 7.1 in linear time by forming its augmenting graph, and performing a strong components decomposition
on it (see [3]). We then check that the excesses within every strong component
are the same, and that the partial order on the strong components is consistent
with the linear order of excesses.
Such flows can be computed using a sophisticated algorithm from [11]. One
way to look at our minimum Euclidean norm node violation problem is that it
is a “flow sharing” problem in the Phase I max flow network, where our objective is to lexicographically minimize the vector whose ith component is the ith
largest node violation. Note that such a lexicographically minimum flow must
satisfy the condition of Theorem 7.1 (else we could perturb the flow to a lexicographically smaller one; this observation is a special case of [9, Theorem 3.3]).
Now [11, Theorem 4.1] gives a method for computing such a lexicographically
minimum flow in the same O(mn log(n2 /m)) time bound as before.
The dual cut structure of Euclidean least infeasible node violation flows is
interesting. Since this objective requires that all augmenting paths between
larger and smaller excess nodes disappear, it can potentially give a very finegrained picture of where the infeasibilities in the network lie. However, since
this objective is non-linear, it is difficult to see what would happen if these cuts
were used in a MCNF algorithm. Note that the node subsets of constant excess
value (the strong components of the residual network w.r.t. this type of least
infeasible flow) give a canonical partition of the network. This partition is called
the principal partition of the network; see, e.g., Fujishige [9] or [10, Section 7.2].
We turn now to the case of enforcing conservation and minimizing the Euclidean size of arc violations. Now the local object whose violation magnitudes
must be balanced are augmenting cycles. Given an (undirected) cycle C, its
sum of violations is
X
X
X
X
sviol(C) ≡
(xij −uij )+
(xij −lij )−
(xij −uij )−
(xij −lij ).
i→j forw
xij >uij
i→j forw
xij <lij
Thus our optimality characterization here is:
14
i→j back
xij >uij
i→j back
xij <lij
Theorem 7.2 A flow x is least infeasible for the Euclidean objective, enforcing
conservation but allowing arc violations, if and only if sviol(C) = 0 for all cycles
C.
Checking this condition is equivalent to checking the existence of a shortest
path potential in a graph whose distances are the appropriately signed violations. This is a general shortest paths problem, which can be solved in O(mn)
√
time [5], or in O( nm log(V )) time [12] (where V is the absolutely largest violation).
In the pure case where we allow arc violations in both directions on every
arc, we can find such a flow x via a linear program. Let T be any spanning
tree (basis) of the network, and let C be the set of fundamental cycles w.r.t. T .
Recall that the (incidence vectors of the) cycles in C form a basis for the space
of all cycles. Thus if we force sviol(C) = 0 for all C ∈ C, we have actually forced
sviol(C) = 0 for all C. Thus the following LP does what we want:
X
min
(vij + wij )
i→j
s.t.
Ax = d
X
i→j forw in C
l−v ≤x ≤ u+w
X
(wij − vij ) =
(wij − vij )
for all C ∈ C.
i→j back in C
However, this linear program is a bit unsatisfying on two counts: First,
aesthetically, it would be nicer to have a more combinatorial way to compute
this sort of least infeasible flow. Second, the LP fails to work anymore if we are
interested instead, for example, in relaxing only the upper bounds. This second
reason is likely to arise in practical modeling where it is known a priori that
negative lower bounds make no sense.
Happily, Karzanov and McCormick [21] have provided two such algorithms.
The first one works by “canceling” min mean cycles in the same auxiliary graph
that we used to check the optimality condition in Theorem 7.2 via a shortest
path computation, and the second is a more efficient way of approximating what
the first one does. They show that it suffices to perform O(nm log n) iterations
of the faster “Cancel and Tighten” algorithm, which allows the optimal positive
violations to be fixed, and then to solve a feasible circulation problem to find the
remaining feasible flows. Each Cancel and Tighten iteration takes O(m log n)
time, so the whole algorithm works in O(m2 n log2 n) time (which dominates the
time to compute a final feasible circulation, which costs one max flow) for this
problem.
The algorithms in [21] are capable of handling quite general convex separable
cost functions. They can for example be used to solve our problem for a weighted
15
Euclidean norm (with non-negative weights). A more detailed description is
beyond the scope of this paper, so we refer the reader to [21] for more details.
Euclidean arc violation least infeasible flows come along with a set of node
potentials proving that sviol(C) = 0 for all cycles C, and these node potentials
do induce various positive cuts. However, it is difficult to see how these cuts
would help a modeler, and also difficult to see how these cuts would be useful
in an MCNF cut canceling algorithm. These flows are the most difficult to
compute as well, so their practical utility seems limited.
8
Conclusion
It is important in practice to be able to deal with infeasible networks. This paper
has shown that classic methods of identifying feasibility yield only a single cut,
which is rather limited information. Three new concepts of least infeasible flow
were presented here which yield much richer information, namely whole families
of infeasible cuts. These three are the minsum of arc violations objective, the
cycle balanced objective, and the Euclidean node violation objective. It could
prove very worthwhile in practice to use one of these as a tool for probing
infeasibility.
Acknowledgement
I thank a referee for pointing out the relevance of [9, 10].
References
[1] C. Aggarwal, J. Hao, and J.B. Orlin (1994). Diagnosing Infeasibilities in
Network Flow Problems. MIT Sloan School Working Paper WP # 3696,
Cambridge, MA.
[2] R.K. Ahuja, A.V. Goldberg, J.B. Orlin, and R.E. Tarjan (1992). Finding
Minimum-cost Flows by Double Scaling. Math. Programming, 53, 243–266.
[3] R.K. Ahuja, T.L. Magnanti, and J.B. Orlin (1993). Network Flows: Theory,
Algorithms and Applications. Prentice Hall, New York, NY.
´ Tardos. (1989). Note on Weintraub’s Minimum Cost
[4] F. Barahona and E.
Flow Algorithm, SIAM J. Comput. 18, pp. 579–583.
[5] R. Bellman (1958). On a Routing Problem. Quarterly of Applied Mathematics, 16, 87–90.
16
[6] T.R. Ervolina and S.T. McCormick (1993). Two Strongly Polynomial Cut
Cancelling Algorithms for Minimum Cost Network Flow. Discrete Applied
Math, 46, pp. 133–165.
[7] T.R. Ervolina and S.T. McCormick (1993). Cancelling Most Helpful Total
Cuts for Minimum Cost Network Flow. Networks, 23, pp. 41–52.
[8] A. Frank and A.V. Karzanov (1992). Determining the Distance to the Perfect Matching Polytope of a Bipartite Graph. Technical Report RR 895M, Laboratoire ARTEMIS IMAG, Universit´e Joseph Fourier, Grenoble,
France.
[9] S. Fujishige (1980). Lexicographically Optimal Base of a Polymatroid With
Respect to a Weight Vector. Math. of OR, 5, 186–196.
[10] S. Fujishige (1991). Submodular Functions and Optimization, Annals of
Discrete Mathematics, Vol. 47, North-Holland.
[11] G. Gallo, M.D. Grigoriadis, and R.E. Tarjan (1989). A Fast Parametric
Maximum-Flow Algorithm and Applications. SIAM J. Comput., 18; 30–
55.
[12] A.V Goldberg (1992). Scaling Algorithms for the Shortest Paths Problem.
Stanford University Computer Science technical report STAN-CS-92-1429,
Stanford, CA.
[13] A.V Goldberg and R.E. Tarjan (1990). Solving Minimum Cost Flow Problems by Successive Approximation. Math. of OR, 15, 430–466.
[14] H.J. Greenberg (1987). Diagnosing Infeasibility in Min-cost Network Flow
Problems Part I: Dual Infeasibility. IMA J. of Math. in Management, 1,
99–109.
[15] H.J. Greenberg (1988/9). Diagnosing Infeasibility in Min-cost Network
Flow Problems Part II: Primal Infeasibility. IMA J. of Math. Applied in
Business & Industry, 2, 39–50.
[16] H.J. Greenberg (1993). Consistency, Redundancy, and Implied Equalities in
Linear Systems. Technical Report, Math. Dept., U. of Colorado at Denver,
Denver, CO; to appear in Annals of Mathematics and Artificial Intelligence.
[17] R. Hassin (1983). The Minimum Cost Flow Problem: A Unifying Approach
to Dual Algorithms and a New Tree-Search Algorithm, Math. Prog., 25,
pp. 228–239.
[18] R. Hassin (1992). Algorithms For the Minimum Cost Circulation Problem
Based on Maximizing The Mean Improvement. OR Letters, 12, 227–233.
17
[19] A.J Hoffman (1960). Some Recent Applications of the Theory of Linear
Inequalities to Extremal Combinatorial Analysis. In R. Bellman and M.
Hall, Jr. (eds.) Proceedings of Symposia in Applied Mathematics, Vol. X,
Combinatorial Analysis. American Mathematical Society, Providence, RI,
pp. 113–127.
[20] K. Iwano, S. Misono, S. Tezuka, and S. Fujishige (1994). A New Scaling
Algorithm for the Maximum Mean Cut Problem. Algorithmica, 11, 243–
255.
[21] A.V. Karzanov and S.T. McCormick (1993). Polynomial Methods for Separable Convex Optimization in Totally Unimodular Linear Spaces with Applications to Circulations and Co-circulations in Networks. Technical Report RR 927 -M-, Laboratoire ARTEMIS IMAG, Universit´e Joseph Fourier,
Grenoble, France. To appear in SIAM J. on Computing; extended abstract
in Proceedings of the Sixth SODA, (1995), 78–87.
[22] S.T. McCormick and T.R. Ervolina (1994). Computing Maximum Mean
Cuts. Discrete Applied Math, 52, 53–70.
[23] S.T McCormick (1993). Approximate Binary Search Algorithms for Mean
Cuts and Cycles. OR Letters, 14, 129–132.
[24] T. Radzik (1992). Minimizing Capacity Violations in a Transshipment Network. Proceedings of the Third Annual ACM-SIAM Symposium on Discrete
Algorithms, pp. 185–194.
[25] T. Radzik (1992). Newton’s Method for Fractional Combinatorial Optimization. Proc. 33rd IEEE Annual Symp. of Foundations of Computer Science, pp. 659–669; see also “Parametric Flows, Weighted Means of Cuts,
and Fractional Combinatorial Optimization” in Complexity in Numerical
Optimization, World Scientific (1993), ed. by P. Pardalos, 351–386.
[26] G. Rote (1991). An Improved Time Bound for Computing Maximum Mean
Cuts. Talk given at 14th International Symposium on Mathematical Programming, Amsterdam, The Netherlands, 5–9 August 1991.
[27] M.H Schneider (1990). Max-Balanced Flows. Proceedings of IPCO 1991,
Waterloo, ON, pp. 421–429.
[28] A. Weintraub (1974). A Primal Algorithm to Solve Network Flow Problems
with Convex Costs. Man. Sci. 21, 87-97.
[29] N.E Young, R.E. Tarjan, and J.B. Orlin (1991). Faster Parametric Shortest
Path and Minimum Balance Algorithms. Networks, 21, 205–221.
18