Mathl. Comput. Modelling Vol. 24, No. 7, pp.
69-75, 1996
Published by Elsevier Science Ltd. Printed in Great Britain
0895-7177/96 $15.00f 0.00
PII:SO895-7177(96)0012%-8
A Simplex Algorithm for a Class of
Leontief Flow Problems
P. H. NG
Division of Science and Mathematics, University of Minnesota-Morris
Morris, MN 56267, U.S.A.
[email protected] D. K. WAGNER
Division of Mathematical, Computer, and Information Sciences, Office of Naval Research
Arlington, VA 22217, U.S.A.
[email protected]
(Received December 1995; accepted February 1996)
Abstract-A matrix N is hntief if it has exactly one positive entry per column and there exists
a nonnegative x such that Nx > 0. A Lwntief flow problem is a linear-programming problem of the
form min(cTx 1 Nx = b;x 2 0), where N is a certain type of Leontief matrix. It is shown that for
b > 0 this problem can be solved in 0(n2U 1ognpU) pivots by the simplex method using Dantzig’s
rule for choosing the entering variable, where n is the number of variables, p is the largest entry of N
in absolute value, and CTis a valid upper bound on any extreme-point solution. C~SSHS of problems
where this is a strongly polynomial bound are identified.
Keywords-Linear programming, Simplex algorithm, Leontief matrices, Networkflows, Compu-
tational complexity.
1. INTRODUCTION
It is well known that for certain classes of problems and for certain pivot rules the simplex
method requires an exponential number of pivots; see, for example [l]. On the other hand,
classes of problems have been identified for which certain pivot rules guarantee termination in
a polynomial number of pivots. Examples of such classes include the assignment, maximum-
flow, and shortest-path problem; see [Z] for references. In particular, given an instance of the
“one-to-all” shortest-path problem, Orlin [3] showed that the corresponding linear-programming
problem min{cTz 1 Nz = 1;x 1 0) is solved by the simplex method using Dantzig’s pivot rule
in 0(m2nlogm) pivots. {Here N is the m x n vertex-arc incidence matrix of the directed graph
with the row corresponding to the source vertex removed, c is the vector of arc costs, and 1 is
the vector of all 1’s.) It is well known that as long as there are no negative-cost directed cycles,
then an extreme-point solution to this linear-programming problem yields a shortest-path tree.
A matrix N is a Leontief matrix if each column has exactly one positive entry and there exists
a nonnegative x such that Nx > 0. A Leontiefflozv problem is defined as the linear-programming
problem P(N, b, c) := min{cTx 1Nx = b; x > O}, where N is an integral Leontief matrix with all
positive entries equal to +l, and c is an integral cost vector. The main result of this paper is that
the simplex method using Da&zig’s pivot rule solves the P(N, b, c) with b > 0 in 0(n2U log npU)
pivots, where p is the largest entry of N in absolute value and U is an upper bound on the
We thank T. Maguauti for suggesting that the results of the paper could be extended beyond (0, fl)-matrices.
70 P. H. No AND D. K. WAGNER
value of any variable in any extreme-point solution. This extends the result of Orlin for the
shortest-path problem; the Leontief flow problem includes the shortest-path problem since the
constraint matrix of the shortest-path problem is Leontief under the assumption that the problem
is feasible (which is easily checked) and that there are no arcs directed into the source (which is
easily accommodated).
In general, the above bound on the number of pivots is not polynomial in the size of P(N, b, c)
since U can be exponential in the size of P(N, b, c). There exist cases, however, where not only
is U polynomial, but so is p. Evidently, one such case is the shortest-path problem where U = m
and p = 1. Two other such cases have been identified by Jeroslow et al. [4]. In these cases, which
are discussed further in Section 3, the bound is, in fact, strongly pol~omi~.
Linear systems of the form {Nz = b; z L 0}, where N is a Leontief matrix and b I: 0, were
studied in the classic paper by Veinott [5] under the name of ~eunt~e~s~&s~t~t~o~syste9ns. Veinott
provides several algebraic properties of Leontief substitution systems. Further work along these
lines and references to earlier related work can be found in the book by Koehler, Whir&on, and
Wright [6].
One recent focus of the work on Leontief flow problems has been to show that certain problems
can be solved in polynomial time without resorting to a general-purpose polynomial-time linear-
programming solver. Using a dynamic-programming approach, Erickson [7] was perhaps the first
to show that certain Leontief flow problems can be solved in polynomial time. Interpreting the
Leontief flow problem as a flow problem on a directed hypergraph (hence, the name), Jeroslow
et a.&[4] give a strongly pol~omi~-time ~gorithm for solving the class of “gain&e” Leontief
flow problems, which properly includes the class of problems investigated in this paper; their
algorithm is an extension of the Bellman-Ford algorithm for shortest paths. Gal10 et al. [8] inter-
pret the problem P(N, 1, c) as a shortest-path problem on a directed hypergraph, and develop
hypergraph versions of Dijkstra’s algorithm. In work that complements the present work, Bardin
and Martin [9] show that the simplex method using Cunningham’s [lo] antistalling pivot rules
solves certain types of Leontief flow problems in a polynomial number of pivots. Among these
works, only the last is aimed at developing a polynomial-time simplex method for a class of Leon-
tief flow problems. In related work, Cambini, Gallo, and Scutella [11] develop a simplex method
for P(N, b, c) and show that many of the simplex computations have hypergraph interpretations,
thus generalizing the network simplex method; no time bounds are derived, however.
Application of Leontief flow problems can be found in many diverse areas. These include
expert systems, Markov branching processes, and problems from operations management, among
others. For more details, see [4,6,8] and the references contained therein.
2. THE MAIN RESULT
Throughout, P(N, b, c) is assumed to be a Leontief flow problem with N an m x n matrix. As
is standard, a basis of P( N, b, c) is a maximal nonsingular submatrix of N; a basis B is feasible
for P(N, b, c) if B-lb 2 0, Of particular interest in this section is the problem P(N, 1,c);that
is, when b is the vector of ones. Da&Q’s pivot rule specifies the entering variable in the simplex
method: among all variables eligible to enter, choose one having the smallest reduced cost, ties
being broken arbitrarily.
The following lemma collects some known results.
LEMMA 1. Let B be an m x m-feasible basis of a Leontief Aow problem P(N, b, c) with b > 0.
Then, B-’ is nonnegative and integral.
PROOF. Veinott [5] showed that every basic feasible solution of a Leontief substitution problem
is determined by some feasible basis matrix that is Leontief. Fiedlar and Ptak [12] showed that
every square Leontief matrix is nonsingular and has a nonnegative inverse. Since b > 0, it
follows that every basic feasible solution is nondegenerate. Thus, each basic feasible solution is
determined by a unique feasible basis matrix. It follows that B is Leontief, and thus, B-’ is
Leontief Flow Problems 71
nonnegative. Finally, Jeroslow et al. [4] showed that if N is integral with all positive entries equal
to +l, then B-’ is integral. I
As a by-product of Lemma 1, if b is integral, then every basic feasible solution is integral.
The proof of the main result is essentially that of Orlin [3] for the shortest-path problem.
At the heart of proving the main result is a lemma from Orlin that states that if the simplex
method makes sufficient progress at each pivot in terms of the objective value, then the number
of pivots is bounded. To state the lemma, consider an application of the simplex method to the
Leontief flow problem P(N, 1,c)and define .z~, k = 1,2,. . . , to be the objective value prior to the
kth pivot. Let H be an upper bound on the difference between the objective values of any two
extreme-point solutions of P(N, 1,c).Set z* to be the target objective value, which is defined to
be .$ for any fixed k. (The target objective value can be thought of as the objective value at
which either optimality or unboundedness is detected.)
LEMMA 2. If there exists a constant CYwith 0 < a < 1 such that, prior to each pivot of the
simplex algorithm applied to the Leontief flow problem P(N, 1,c) before reaching the target
objective value, inequahty (1) holds,
(2 - Zk+l) 1 (Y(2 - t.*) (1)
then the algorithm reaches the target objective value in O((logH)/cr) pivots.
PROOF. Rearranging yields .z’+’ - z* I (1 - a)(~~ - z*), which inductively yields zk+l - Z* 5
(1 - cr)kH. Since c is integral (by assumption) and all basic feasible solutions are integral (by
Lemma l), .z~ is integral for all k. Thus, zk+’ - z* < 1 implies zk+l = z*. Therefore, it su5ces
for (1 -a)“H < 1, implying that k is at most (logH)/(-log(1 -a)), which is O((logiY)/cr). 1
To use Lemma 2, both H and (Y must be appropriately chosen. Define C to be the largest
entry of the cost vector c in absolute value. Recall n is the number of variables and U is an upper
bound on the value of any variable in an extreme-point solution. The following result is evident.
LEMMA 3. For the Leontief flow problem P(N, l,c), H 5 nCU. I
The next result provides (Y.
LEMMA 4. Prior to each pivot of the simplex method using Dantzig’s pivot rule applied to the
Leontief Aow problem P( N, 1,c)
(2” - Zk+l) 1
PROOF. Consider the kth pivot, and let B be the feasible basis of P(N, 1, c) after performing the
pivot. By Lemma 1, B-’ is nonnegative and integral. Thus, each entry of B-‘1 is at least 1,
implying that the value of the variable that just entered is at least 1. Letting E denote the vector
of objective coefficients prior to the pivot and &,.,i,, the smallest of these coefficients, it follows
from Dantzig’s rule that
*k+l -2’ 5 Emin.
(2)
Now, consider the problem min{ETz+zk ] 0 I z I U), which is obtained by relaxing the equality
constraints and adding upper bounds. Letting ZR denote its objective value yields
.Z* 2 Zn > i&inUn + .Zk. (3)
Combining (2) and (3) yields the desired inequality. I
THEOREM 1. Starting fi-omany basicfeasible solution, the simplex method using Da&zig’s pivot
rule solves the Jkontief isow problem P(N, 1,c)in O(nU log(nCU)) pivots.
PROOF. The theorem follows directly from Lemmas 2-4. I
72 P. H. NGAND D. K. WAGNER
3. POLYNOMIAL BOUNDS
The bound given in Theorem 1 is polynomial in the size of P(N, 1, c) as long as U is polynomial.
Since the right-hand side of P(N, 1,c)is 1, U is polynomial if all of the entries in every feasible
basis inverse are polynomial. In general, this is not the case, even when N is a (0, fl)-matrix. As
an example, if N has a feasible basis matrix B that is lower triangular with l’s along the diagonal
and all -1’s below the diagonal, then B -’ has entries that are exponential in m. On the other
hand, classes of Leontief flow problems have been identified for which each entry in every feasible
basis inverse is polynomial. As is well known, if P( N, 1, c) is a shortest-path problem, then every
feasible basis inverse is a (0, I)-matrix, and thus U = m. Jeroslowet al. [4] have identified other
classes of Leontief flow problems for which the entries of each feasible basis inverse are either 0 or 1.
Specifically , if N is a (0, fl)-matrix and the directed hypergraph underlying the Leontief flow
problem satisfies either of two structural properties, called pamcycle-free and disjointly reachable
in [4], then every feasible basis inverse is a (0,1)-matrix; see [4] for a detailed description of these
structural properties. Jeroslow et al. go on to show that Leontief flow problems satisfying these
properties are a reasonably rich class. For example, they show that solving minimum-concave-cost
network flow problems using the send-and-split algorithm of Erickson, Monma, and Veinott [13]
can be modeled as a disjointly reachable Leontief flow problem.
Even if U is polynomial, the bound in Theorem 1 is not strongly polynomial (i.e., polynomial in
just m and n) because of the C. The remainder of this section shows that the C can be eliminated
at the expense of introducing a factor depending on p, the largest entry in N in absolute value.
It follows that if N is a (0, fl)-matrix, which is the case in most of the applications discusses
in [4,8], then the bound is strongly polynomial (still assuming that U is polynomial). The basic
idea for eliminating C is to replace the cost vector c in P(N, 1, c) by a vector c’ such that log c’ is
bounded by a polynomial in n, p, and U and such that P(N, 1, c) and P(N, 1, c’) have the same
set of optimal solutions.
For the shortest-path problem (and, more generally, for the minimum-cost network flow prob
lem), Orlin [3] introduced a technique for providing such a c’. A technique applicable to all
linear-programming problems, and thus the present case, was developed by Frank and Tardos [14].
Bather than using the Frank-Tardos technique, however, it is shown that the Orlin technique can
be extended to the present setting. By doing so, some interesting properties of the Leontief flow
problem are brought out.
Let P(N, b, c) be a Leontief flow problem. Define a circuit of N to be a column submatrix of N
whose set of columns are minimally linearly dependent. (That is, they are linearly dependent,
but every proper subset of columns is linearly independent.) If R is a circuit, then Ra: = 0 has a
nonzero solution; each such solution is called an orientation of R. Note that any two orientations
of R must be scalar multiples of each other. Define a circuit R to be feusible if there exists a
feasible basis B of P( N, 1, c) that contains all but one column of R. Feasible circuits arise as
follows: if B is a basis of P(N, 1, c) and e is a nonbasic column of N, then the matrix (B, e)
contains a unique circuit, which necessarily contains the column e. A column e of R is an outcast
if there exists a feasible basis that contains all of the columns of R except e. An orientation w
of R is a unit orientation if w(e) = fl for some outcast column e of R (Here, w(e) is the entry
of w that corresponds to column e of R.)
LEMMA5. Let P(N, 1, c) be a Leontief flow problem. Every feasible circuit R of N has exactly
two unit orientations, one being the negative of the other.
PROOF. Clearly, every feasible circuit has at least unit orientations; take any orientation and scale
it so that some outcast entry is +l and then -1. Let wr and ws be distinct unit orientations
of R, and without loss of generality suppose that WI(~) = wz(f) = -1 for outcast columns e
and f of R. Since wr and wz are scalar multiples of each other, Tws(e) = -1 = wi(f)/r for
some nonzero scalar 7, which implies wi(f)ws(e) = 1. It now suffices to show that w1 and ws are
integral since then it follows that wp(e) = +l.
Leontief Flow Problems 73
Since e and f are outcast columns, there exist feasible bases, say Br and Bs, that contain
all of the columns of R except e and f , respectively. Observe that wr and w2 can be extended
to solutions to (Br , e)g = 0 and (Bz, f)z = 0 by adding zeros corresponding to the noncircuit
columns of Br and B2, respectively. (That is, if (Br, e) is written as (Q, R) for some matrix Q,
then (Q, R)(wq) = 0.) Since wr(e) = ws(f) = -1, e is integral, and B,’ and B;’ are integral
(Lemma l), it follows that wr and ws are integral, as required. I
A consequence of Lemma 5 is that in either of the two unit orientations, all entries corresponding
to outcast columns have value fl.
LEMMA 6. Let P(N, 1,~) be a Leontief Aow problem. Let R be a feasible circuit of N, e an
outcast column of R, and B a feasible basis that contains all of the columns of R except e. Then,
the reduced cost of the nonbasic variable xe relative to B is equal to dTw, where d is the subvector
of the cost vector c corresponding to R and w is the unit orientation of R in which w(e) = 1.
Moreover, the entries of w are integral and bounded in absolute value by pU.
PROOF. The reduced cost of xe is given by iZe:= c, - CAB-‘e. Let X be the subvector of B-le
consisting of precisely its nonzero entries; let sT be the corresponding subvector of CL. Then,
w := (_‘x) is a unit orientation of R. (Without loss of generality, it is assumed that the ordering
of the columns of R coincides with that of the rows of w and that e is the first column of R.)
Letting dT := (c,,sT), it follows that Ze = dTw. Since the entries of B-‘1 are bounded by U,
each row sum of B-’ is bounded by U, and therefore each entry of B-‘e is bounded in absolute
value by pU. Thus, so is each entry of w. Moreover, by Lemma 1, B-l is integral, and therefore
so is w. I
It follows from Lemmas 5 and 6, that if f is an outcast column of R different from e and B’
is a feasible basis that contains all of the columns of R except f, then the reduced cost of xf
with respect to B’ is equal to plus or minus the reduced cost of x6 with respect to B. Thus, it
makes sense to refer to the “cost” of a feasible circuit independent of any particular basis. More
precisely, given a feasible circuit R and a unit orientation w of R, the cost of (R, w) with respect
to the cost vector c, denoted c(R, w), is dTw, where d is the subvector of c corresponding to R.
It might be useful to consider Lemmas 5 and 6 in the well-understood special case that N is a
vertex-arc incidence matrix of a directed graph D (with one row removed). In this case, a circuit
of N corresponds to a cycle of D. From the total unimodularity of N, each unit orientation of
a circuit of N is, in fact, a U-vector with the +l entries corresponding to the “forward” arcs
of the cycle and the -1 to the “reverse” arcs. Lemma 5 essentially says that every circuit has
two orientations and these correspond to the two possible ways of traversing of the cycle. Now,
consider a feasible basis B of N. Then, it is well known that B corresponds to a spanning tree T
of D. The unique circuit of the matrix (B,e) for any nonbasic column e corresponds to the
unique cycle obtained by adding the arc e to T. Lemma 6 yields the well-known fact that the
reduced cost of the nonbasic variable xe is equal to sum of the costs of the arcs of this cycle
whose orientation agrees with e minus the sum of the costs of those that disagree.
Returning to the general case, Lemma 5 implies that every feasible circuit R has a unit ori-
entation w such that c(R,w) 2 0. Let R = {(RI,wI),... , (Rt , wt)} be the set of all such pairs
in N, and assume that c( Rt, wt) > - - . 2 c( RI, wr) L 0. Consider defining a new cost vector c’
that satisfies the following set of conditions (S):
c’(Rr,wl) = 6, if c(Rl,wl) = 0,
c’(Rl,wl) 2 1, if c(Rl,wl) > 0,
c’(Rj,wj) = c’(R+_~,w~_I), ifc(Rj,wj)=c(Rj_r,wj_r)forjE{2 ,..., t},
c’(Rj,wj) 2 1, ifc(Rj,wj)>c(R+r,w+r)forjE{2,...,t}.
c'(R~-I,w~-I)+
REMARK. Consider applying the simplex method to the Leontief flow problems P(N, 1,c) and
P(N, l,c’), where c’ satisfies the conditions in (S). Let B be a feasible basis of P(N, 1,~)and
74 P. H. NG AND D. K. WAGNER
thus of P(iV, 1,c'). If Dantzig’s rules chooses variable ze to enter for P(N, 1,c),then Lemma 6
and the conditions of (S) are sufficient to ensure that Da&zig’s rule can also choose x, to enter
for P(N, 1, c’). It follows that any sequence of pivots in terms of entering and leaving variables
obtained by applying the simplex method using Dantzig’s rule to P(N, 1,c)can alsobe obtained
by applying it to P(N, 1,c'). Moreover, Lemma 6 and the conditions of (S) also ensure that when
the method terminates on P(N, 1, c’), it also terminates on P(N, 1, c). Thus, any bound on the
number of pivots for P(N, 1,~') is also a bound for P(N, 1,~). I
Considering c’ as a vector of variables, Lemma 6 implies that (S) is a system of linear constraints
whose coefficients are integral and bounded in absolute value by pU and whose right-hand side
values are either 0 or 1. The system (S) is feasible since c is a solution. The next result establishes
the existence of a particular type of solution.
LEMMA 7. There exists a rational solution c” to(S) such that the entries of c” have their numer-
ators and their common denominator bounded in absolute value by (pU)“n!.
PROOF. Suppose that (S) has an extreme-point solution, say c”. Then, c” = Q-‘q, where Q is
an n x n submatrix of the constraint matrix of (S) and q is a subvector of the right-hand side
of S. By Cramer’s rule and the fact that the determinant of any submatrix of (Q, q) is bounded
in absolute value by (pU) %! (since the entries of (Q, q) are bounded in absolute value by pV),
the entries of c” have their numerators and their common denominator bounded in absolute value
by this same value.
Now, suppose that (S) does not have any extreme points. In this case, at least one variable
of (S) can be set to zero so that the resulting system is still feasible. Repeating, if necessary,
a system that has an extreme point is eventually obtained, and so the above argument can be
applied. 1
The main theorem can now be proved.
THEOREM 2. Starting from any basic feasible solution, the simplex method using Da&zig’s pivot
rule solves the Leontief Aow problem P(N, 1,c)in 0(n2U log npU) pivots.
PROOF. Consider a solution c” to (S) whose existence is guaranteed by Lemma 7. Multiply-
ing through by the common denominator, one obtains an integral vector c”‘. By the Remark,
any bound on the number of pivots for the simplex method using Dantzig’s rule applied to
P(N, 1,c"')is also a bound for P(N, 1,c).By Lemma 7, c”’ has entries bounded in absolute
value by (pU)2n(n!)2. From Theorem 1, the simplex method using Da&zig’s pivot rule requires
0(n2U log npU) pivots. I
4. POSITIVE B
Theorems 1 and 2 can be extended to arbitrary positive right-hand sides using the following
observation.
PROPOSITION. Let P(N, b, c) and P(iV, b’, c) be Leontief Aow problems with b, b’ > 0. Then, a
basis is feasible for P(N, b, c) if and only if it is feasible for P(N, b’, c). I
PROOF. Let B be a feasible basis of P(N, b, c). Clearly, B is a basis of P(N, b’, c). Since B is
feasible for P(N, b, c), Lemma 1 implies B-’ is nonnegative. Since b’ > 0, B-lb’ 2 0, and so B
is also feasible for P(N, b’, c). Analogously, if B is feasible for P(N, b’, c), then it is also feasible
for P(N, b, c). I
It follows from the Proposition that the same sequence of pivots in terms of entering and
leaving variables that solves P(N, b, c) also solves P(N, b’, c). In particular, any upper bound
on the number of pivots for P(N, 1,c)is also an upper bound for P(N, b, c). Thus, Theorem 2
implies the following result.
Leontief Flow Problems 75
THEOREM 3. Let P(N, b,c) be a Leontief flow problem with 6 > 0. Then, starting from any
basic solution, the simplex method using Da&zig’s pivot rule solves P( N, b, c) in O(n2U 1ognpU)
pivots. I
REFERENCES
1. V. Klee and G.J. Minty, How good is the simplex method?, In Inequalities, ZZZ,(Edited by 0. Shishs),
pp. 159-175, Academic Press, (1972).
2. R. Ahuja, T.L. Magnanti and J.B. Orlin, Network Flows: Theory, Algorithms, and Applications, Prentice
Hall, Englewood Cliffs, NJ, (1993).
3. J.B. Orlin, On the simplex algorithm for networks and generalized networks, Mathematical Programming
Study 24, 166-178 (1985).
4. R.G. Jeroslow, R.K. Martin, RL. Rardin and J. Wang, Gainfree Leontief substitution problems, Mathemat
ical Progmmming 57, 375-414 (1993).
5. A.F. Veinott, Jr., Extreme points of Leontief substitution systems, Linear Algebna and Its Applications 1,
181-194 (1968).
6. G.J. Koehler, A.B. Whinston and G.P. Wright, Optimization over Leontief Substitution Systems,
North-Holland, Amsterdam, (1975).
7. R.E. Erickson Optimality of stationary halting policies and finite termination of successive approximations,
Mathematics of Opemtions Research 13, 99-98 (1988).
8. G. Gallo, G. Longo, S. Pallottino and S. Nguyen, Directed hypergraphs and applications, Discrete Applied
Mathematics 42, 177-201 (1993).
9. R.K. Marti and R.L. Rardin, Private communication, (1993).
10. W.H. Cunningham, Theoretical properties of the network simplex method, Mathematics of Opemtions
Research 4, 196-208 (1979).
11. R. Cambini, G. Gal10 and M.G. Scutellb, Minimum cost flows on hypeqraphs, Technical Report, Diparti-
mento di Informatica, Universitl di Pisa (1993).
12. M. Fiedler and V. Ptak, On matrices with nonpositive off-diagonal elements and positive principal minors,
Czechoslovak Mathematicnl Journal 12, 382400 (1962).
13. R.E. Erickson, C.L. Monma and A.F. Veinott, Jr., Send-and-split method of minimum-concave-cost network
flows, Mathematics of Opemtions Reseamh 12, 634-664 (1987).
14. A. Frank and 8. Tardos, An application of simultaneous approximation in combinatorial optimization,
Combinatorics 7, 49-66 (1987).