Network Blow, Transportation and Scheduling Theory and Algorithms
Network Flow,Transportation and Scheduling Theory a...
34 downloads
1252 Views
4MB Size
Report
This content was uploaded by our users and we assume good faith they have the permission to share this book. If you own the copyright to this book and it is wrongfully on our website, we offer a simple DMCA procedure to remove your content from our site. Start by pressing the button below!
Report copyright / DMCA form
Network Blow, Transportation and Scheduling Theory and Algorithms
Network Flow,Transportation and Scheduling Theory and Algorithms MASAO IRI DEPARTMENT OF MATHEMATICAL ENGINEERING AND INSTRUMENTATION PHYSICS FACULTY OF ENGINEERING UNIVERSITY OF TOKYO TOKYO, JAPAN
@
ACADEMIC PRESS
New York and London
1969
COPYRIGHT 0 1969, BY ACADEMIC PRESS,INC. ALL RIGHTS RESERVED NO PART O F THIS BOOK MAY BE REPRODUCED I N ANY FORM, BY PHOTOSTAT, MICROFILM, RETRIEVAL SYSTEM, OR ANY OTHER MEANS, WITHOUT W R I T E N PERMISSION FROM THE PUBLISHERS.
ACADEMIC PRESS, INC. 111 Fifth Avenue, New York, New York 10003
United Kingdom Edition published by ACADEMIC PRESS, INC. (LONDON) LTD. Berkeley Square House, London W1 X 6BA
LIBRARY OF CONGRESS CATALOG CARDNUMBER: 69-13483 AMS 1968 SUBJECT CLASSIFICATIONS 0540,9430
PRINTED IN THE UNITED STATES OF AMERICA
From the theoretical points of view, network-flow problems constitute a very special subclass among general mathematical-programmingproblems -special in the sense that the constraint relations for variables are determined by the topological properties of a geometrical figure called a graph and that the objective functions are separable in form. From the points of view of practical applications, they not only serve as fairly good models of various kinds of problems, such as transportation processes, personnel assignment, project scheduling, etc., but also as powerful means to deal with some kinds of graph-theoretic as well as combinatorial-mathematical problems. Furthermore we can take advantage of their special characters to solve within practicable time and cost such large-scale network-flow problems that the solution of a general mathematical-programming problem of similar scale might prohibitively be difficult. The present book is intended to give a self-contained exposition of the theory and to develop thereupon the practical algorithms for networkflow problems. Therefore, it is basically of expository character although there will be found a lot of new material. Applied mathematicians, postgraduate students, and theoretical-minded people engaged in operations research, system engineering, electrical and communication engineering, etc. will be the audience. There are many alternative ways in which to expound the theory of network flows. Emphasis is sometimes laid upon the mathematicalprogramming facet of the problems and sometimes upon the graphtheoretic. It would not be impossible to give an ad hoc exposition even without sound preliminaries. However, for the deep understanding of the V
vi
Preface
whole theory and for the perfect command of the techniques of dealing with the problems, it seems necessary to prepare preliminary explanations on convex sets and convex functions together with considerable details about the topological properties of linear graphs, as we shall do in Chapters 11 and 111. Two seemingly contradictory ways of exposition-the general theoretical treatment and the practical algorithmic treatment of the problem-are in fact mutually complementary ways of approaching the true understanding of the problems. We have two chapters, i.e. Chapters IV and V, one of which is devoted exclusively to the theoretical treatment of general network-flow problems while the other emphasizes the algorithmic treatment of linear network-flow problems. The appendices contain a survey of topics and research problems in the related fields as well as mathematical supplements and suggestions on digital and analogue computations. The prerequisites to this book are rudiments of linear algebra, differential and integral calculus, set theory and elementary topology. Although there is an abundance of electrical terminology in this book, no knowledge of electricity or of electric networks will be assumed as the background. (Of course, physical intuition will help understand the problem.) The mathematical notations adopted in this book are more old-fashioned than modern, because the correspondence between mathematical concepts and their physical counterparts may become intuitively more intelligible in that manner. As for notations, particular attention should be paid to the relative positions of indices to kernel letters since they are of some significance in almost all cases. In the existing literature we have two excellent and pioneering books on network-flow problems, i.e. one by L. R. Ford, Jr., and D. R. Fulkerson and the other by C. Berge and A. Ghouila-Houri (see Ford and Fulkerson [I] and Berge and Ghouila-Houri [l] in the reference list at the end of this book), which have made a great contribution to the progress of science and to which the present book also owes not a little. The present book is based primarily upon a series of the author’s own investigations-among which we should mention, besides those found in the reference list, the following articles : “ Network Theory Based upon Topology.’’ RAAG Research Notes, Second Series, No. 10 (1956). “An Application of the Theory of Boolean Lattices to the Problems of Oriented Graphs or On-Off Circuits Containing Rectifiers.” ibid., No. 14 (1956). “ O n the Torsion and Linkage Characteristics and the Duality of
Preface
vii
Electric, Magnetic and Dielectric Networks (with Y. Mizoo and K. Kondo).” RAAG Memoirs, Vol. 2 (1958), A-VIII, pp. 84-117. “ Theory of Communication and Transportation Networks (with T. Sunaga).” ibid., G-11, pp. 444-468. “Algebraic and Topological Foundations of the Analysis and Synthesis of Oriented Switching Circuits.” ibid., G-111, pp. 469-518. “Algebraic and Topological Theory of the Problems of Transportation Networks with the Help of Electric Circuit Models.” RAAG Research Notes, Third Series, No. 13 (1959). “A New Method of Solving Transportation-Network Problems.” Journal of the Operations Research Society of Japan, Vol. 3, No. 112 (1960), pp. 27-87. “ Fundamentals of the Algebraical and Topological Treatments of General Information Networks.” RAAG Memoirs, Vol. 3 (1962) G-V, pp. 418-450. “ Several Applications of the Basic Theory of General Information Networks-Connexion Properties of Graphs and Finite Deterministic Two-Person Games.” ibid., G-VI, pp. 451-471. “ Topological and Algebraical Theory and Methods of Transportation Networks.” ibid., G-VII, pp. 472-494. “ On the Number of 2-Isomorphic Graphs.” RAAG Research Notes, Third Series, No. 72 (1963). “A Criterion for the Reducibility of a Linear Programming Problem to a Linear Network-Flow Problem.” ibid., No. 98 (1966). “ Metatheoretical Considerations on Duality.” ibid., No. 124 (1968). “ On the Topological Conditions for the Realization of Multi-Port Networks.” RAAG Memoirs, Vol. 4 (1968), A-XV, pp. 47-61. Some of the results published in the works of J. B. Dennis and of G. J. Minty (see Dennis [l] and Minty [l]) are included and Zoutendijk’s book [11was useful. However, the recent works of R. T. Rockafeller whose standpoint seems to have much to do with ours could not be taken into account because of time limitations (cf. Rockafeller [13). It is a matter of regret that the geographical and other constraints under which the author lies made it difficult to compile a complete literature list, to a fatal drawback of this book. It is a pleasure to record the author’s gratitude to those to whom he is indebted, directly or indirectly, in writing this book. First of all, my thanks are due to Professor Richard Bellman who kindly invited and encouraged me to write a book in the “ Mathematics in Science and Engineering” series. I would like to take this opportunity also to express
...
Vlll
Preface
my deep sense of gratitude to Professor Kazuo Kondo of the University of Tokyo under whose guidance 1have studied and worked since my student days, to the members of the RAAG (Research Association of Applied Geometry, Japan) and other friends at home and abroad whose stimulative discussions and suggestions have been very helpful, and to Professor Sigeiti Moriguti of the University of Tokyo who guides me in Operations Research, Computer Applications and Numerical Methods. It should be recorded here also that, in December 1965, the Matsunaga Science Foundation awarded me the Matsunaga Prize for the “Researches on Network Problems in Operations Research,” which greatly stimulated me in writing this book. Finally, I must fulfill my private duty to mention the invaluable collaboration of my wife, Mrs. Yumi Iri, who did not only type all the manuscript but also suggested many formal and substantial improvements in it. IRI MASAO June I969
Preface
V
I. Introduction 1. Transportation Problems 2. Project Scheduling Problems
3. Electric Networks with Nonlinear Resistors
1 3 5
11. Convex Sets and Functions 4. Convex Sets
5. Convex Functions 6. Minimum of a Convex Function on a Convex Set
8 11
26
111. Topological Properties of Networks 7. Graphs and Vector Spaces 8. Connectivity 9. Loops, Cutsets, Trees, and Cotrees 10. Duality 11. 2-Isomorphism 12. Planar Graph and Its Dual
28 37
41 66
67 73
IV. Network-Flow Problems in General 13. Constituents of a Network 14. Remarks on Duality
75 87
ix
Contents
X
15. 16. 17. 18. 19.
Minimization Problems on a Network General Properties of Solutions Two-Terminal Characteristic Problems of Approximation Equivalence Transformations of Networks
87 101 110 116 120
V. Linear Network-Flow Problems 20. Maximum Flow 21. Minimum Route 22. Re!ations between the Maximum-Flow Problem and the Minimum-
Route Problem 23. Two-Terminal Characteristics 24. General Linear Network-Flow Problems
130 174 192 193 243
Appendices 1 : Farkas’ Theorem 2: Equisignum Decomposition of a Vector 3: Theory of Linear Resistor Networks 4: Digital and Analog Computations 5: Reducibility of a Linear Programming Problem to a Linear Network-Flow Problem 6: Related Problems and Extensions of Network-Flow Problems
256 263 267 274
References
307
Index
311
288 296
Introduction
A network-flow problem is, mathematically, a special case of mathematical programming problems, in which the constraint relations imposed on variables are intimately connected with a graph, i.e., with a geometrical figure consisting of points and lines. However, we believe it in order to give a rough sketch of the essence of the problem from the point of view of practical applications and then to enter into its mathematical treatments. Thus, we shall begin with rough formulations of the three typical physical problems of which the network-flow problem is a mathematical model. 1. TRANSPORTATION PROBLEMS
Let us consider transporting a commodity through a network of routes such as shown by solid-line arrows in Fig. 1.1. We assume that there is no stagnation of commodity flow at nodes, i.e., at junction points of routes; we denote by r" the rate of commodity flow through the Kth route, and assume that the total cost z for a transportation plan is equal to the sum of the costs related to the routes, each of which is a given function rp,(r) of p,i.e.,
1
2
I. Introduction
Our problem is to obtain a transportation plan, i.e., a set of values .. ., t5),according to which a given rate c of commodity flow is made from the entrance node 1 to the exit node 4 through the network, and which, among all such plans, minimizes the total cost z. ({I,
Fig. 1.1. Transportation network.
Instead of dealing with the problem as it was just posed, we make a modification as follows. We introduce a new fictitious route 6 (drawn by a dashed-line arrow in Fig. 1.1) which connects the exit directly to the entrance and through which the flow going out of the network at the exit returns to the entrance again to enter the network. The condition that the total rate of commodity flow from the entrance to the exit be equal to c can now be written as 56
= c,
where t6 is the flow rate in route 6 . Let (P6(t6) be a function whose value is 0 when t6 = c and is very large when t6 # c. Then our problem would be equivalent, at least approximately, to the problem of obtaining (fC(1 - 4 1
0
+ 251. 1
I),
5 + 151,
0
(5.1‘)
1
, f ( E , ) is said to be strictly convex. If --f(&) is convex or strictly convex,f(S) is said to be concave or strictly concave, respectively. The foregoing definition of convex functions might seem to be applicable to the functions whose domains are not necessarily open but only convex. However, we shall adopt a slightly more restricted definition of them in order to simplify the discussions about the behavior of the functions on the boundary of 6,especially about the continuity and the differentiability. Definition 5.2. A function f (6) defined on a convex set (5. (not necessarily open) is said to be convex if there exist an open convex set T, ( 2(5.) and a convex function g(6) defined on 3 such that
6 E (5..
for all
f(E,)= g(5)
(5.2)
The following two theorems are direct consequences of the definition and will require no formal proof. Theorem 5.1. A function defined on an open convex set (5. is convex if and only if for arbitrary points 6 , . . ., E, E (5. and arbitrary weights 1
m
m
w ) . . . )w ( f + l 2 0 , C w = 1 ) , 1
m
i=l i
i
m
i=l
i
i
i=l
(5.3)
i i
Theorem 5.2. If the domains of (a finite or infinite number of) convex functions .f;(E,), f2(E,), . . . are El, E2,. . . , respectively, then, for arbitrary nonnegative CI’S, the functions i
f(S) = 1 mfi(E,) i i
and
g ( 5 ) = SUPL(S> i
(5.4)
Ci. Moreover, if at least
are (so long as they exist) convex functions on i
13
5. Convex Functions
one f i ( Q is strictly convex with the corresponding a strictly positive, then i
f(6) is strictly convex.
Next, we shall change to the discussions on the continuity and the differentiability of convex functions.
Theorem 5.3. A convex function continuous at every point in (5..
f(6) on a convex set
(5.
in R" is
PROOF. It suffices to consider the case where (5. is open in view of Definition 5.2. Let 6 be an arbitrary point in (5. and E be an arbitrary positive number. Since (5. is open, there exists a positive number p such that all the points 6 2 pe, ( K = 1, . . . , n) belong to 6,where eK is the Kth basis vector. Put = max[max
lf(6 + peK) -f(6>1?
K
lf(6 -
peK>
-f(6>11?
(5'5)
K
and 6 = p/(2n) min(1, E / w ) ,
(5.6)
n
and choose a point x
=
1 xKeKsuch that IxK- lK1< 6 for every K . Then, K=l
we have
where y" E xK- 5" (I yKI < 6) and sgn y = 0, or < 0, and, conversely,
[Note that x belongs to follows that
(5.
= 1,
0, or - 1 according as y > 0,
by virtue of (5.7).] From (5.7) and (5.3), it
or
(5.9)
14
11. Convex Sets and Functions
Similarly, from (5.8) and (5.3), it follows that
or (5.10)
Thus, we have shown that for any I.f(x) -f(k)I < E
( > O ) , there exists a 6 ( > O ) such that
E
for every x with
- tK1< 6.
Ix"
Q.E.D.
(5.11)
Before entering into the discussion of differentiability, we first show Lemma 5.2. Letf(5) be a convex function on a convex set 6 (gR"), an arbitrary vector in R", and a and p be real numbers such that a > p and that
5 E 0, r be
5 + ar € 6
6 + pr € 0 .
and
Then F(u,
=
CJ'(6 + 4 - A 6 + fir)l/(a - P)
(5.12)
is monotone nondecreasing as a function of a as well as a function of
PROOF. Let
E,
a, a be real numbers such that a > a
1
2
1
3
6 + ar E 6
(i
=
2
p.
> a and that 3
1,2,3).
i
Then we have a-a
1
a-u 1
3
3
(5.13) may be rearranged as
i.e.,
F(u, a ) 2 F(a, a) I
3
2
3
(a > a 1
2
> a), 3
(5.14)
15
5. Convex Functions
and, at the same time, as
f ( 6 + ar) - f ( 6 + ar) f(5 + ar) -f(S 1 2 1 a-u 1
2
+ ar) 3
7
a-a
2
1
3
i.e., F(a, a) 2 F(U, a). 1 2
1
(5.15)
Q.E.D.
3
For a given convex function f(4) on (5. and a given point 5 E 6,we choose a vector r E R” arbitrarily when 5 is not a boundary point of (5. and, when 6 is on the boundary of 6,in such a way that there exists a positive number h such that 5 + hr E 6. (We assume that 6 is neither empty nor a single point.) Then, for sufficiently small h (>O), F(h, 0) = Cf(6 + hr) -f(S)llh
(5.16)
is defined and is monotone nondecreasing as a function of h. Furthermore, we can find an h‘( > 0) such that 6 - h’r E ID, where ID means an open convex set mentioned in Definition 5.2. Then we have
F(h, -h’) = Cf(4 + hr)-g(5 - h‘r)l/(h F(0, A’) = Cf(9- s(5 - h’r)I/h’,
+ h’),
(5.17)
where g(6) is the convex function on D mentioned in Definition 5.2. From the preceding lemma, we have F(h, 0) 2 F(h, -h’) 2 F(0, A’),
(5.18)
so that F(h, 0) is bounded below by P(0, -A’) and, consequently, there exists lim F(h, 0). This limit is called the deriuatiue o f f ( 6 ) in the direction h++O
ofr and is denoted byf’(6; r). Thus we have Theorem 5.4. A convex function f(5) on a convex set 6 has, at every point 6 E 6,the derivative in the direction of every admissible r:
where r is called “admissible” when we can find an h(>O) such that 5 hr E 6.
+
Theorem 5.5. f’(5; r) of a convex functionf(6) on 6 has the following properties, where 5 is an arbitrary point in (5.:
(i)
f’(6;
0) = 0.
(5.20)
16
11. Convex Sets and Functions
(ii)
f’(5; ar) = af’(5;r) for every a (20) and every admissible r. (5.21)
(iii) If r and r are admissible, then so is r = (1 - 2)r A
1
0
0
+ k1 for any 1
between 0 and 1, and
(iv) If both r and -r are admissible, then
(v) then
(5.23) f’(5; r>2 -f’(5; -9. For a fixed r, if u B 0, p >= 0, a > p, 6 + c(r E 6,and 5 + pr E 6,
-f‘(5
+ ur; -r)
Zf’(5 + pr; r)
(5.24)
and
f’(5 + ar; r) Z f ‘ ( 5 + pr; r).
(5.25)
PROOF. (i) and (ii) are obvious from the definition off’(6; r). (iii) follows from the relation
f { 4 + hC(1 - 4 0r + Arll -f(U 1 5 (1 - 4Cf(S + hr) -f(5)1 0
+ X f ( S + hr) -f(S)1
by dividing by h and taking the limit h -+ +O; (iv) follows from (i) and (iii) because
W ( S ; r) + +f‘(S;
-r)Z f ’ ( 5 , O )
= 0.
If we take an h such that 0 < h < u - p, then, by Lemma 5.1, we have
f ( 5 + 4 -f(S + ar - hr) ,f(S + ur>-f(S a
- (a - h )
+ fir)
u-B 2
-
f(S + pr + hr) -f(5 (B + h) - B
+pr>. (5*26)
Taking the limit h --f +O, we obtain (5.24) of (v). (5.25) follows from (iv) and (5.24). Q.E.D.
17
5. Convex Functions
REMARK 5.1. If the function f(5) is partially differentiable in the ordinary sense, then
af f ' ( 5 ; r) = , =1I rK at"
(5.27)
Y
so that (i)-(iv) in Theorem 5.5 are reduced to the trivial consequences of the relation (5.28)
Iff( 5) is twice-differentiable, then
so that (v) is equivalent to the positive definiteness of the matrix [azf/atl atK]( K , A = 1 , ...,n). Finally we add a few words on the relations between convex functions and convex sets.
Theorem 5.6. If f(5) is a convex function defined on a convex set the set 6 ( ~ ( 5 : )of those points 5 for whichf(5) 6 0
(5: (sR"),then
6 = (515 E (5:,f(5)5 01
(5.30)
is a convex set that is relatively closed in (5:.
+ A5
PROOF. For any 5,5 E 6 s KandanyA(0 S A 5 l), 6 = (1 - A)k 0
belongs to
(5:
1
1
0
1
and
f(5) s (1 - am) + A f (5) 5 0, 1 0 1 so that
5 belongs to
G. Therefore, 6 is convex. Sincef(5) is continuous
1
(Theorem 5.3), 6 is closed relative to
(5:.
Q.E.D.
A linear function n
l(5) = I(=
1
aKt"
+ a,
(a,, a, : real numbers)
(5.31)
is obviously (not strictly) convex and, at the same time, concave. Hence, from Theorem 5.2, follows
Theorem 5.7. Iff(5) is a convex function (on 6)and l(5) is a linear
18
11. Convex Sets and Functions
function (on R“),
is a convex set relatively closed in
(5.
PROOF.f ( Q - f(5) is a convex function.
Q.E.D.
5.2. Convex Functions with One Variable In this section, we consider the special properties of convex functions of one variable. It is obvious how the properties of convex functions investigated in the preceding section are specialized in the case of convex functions with one variable. In particular, a convex function with one variable f(5) defined on an interval Z is continuous at every point of I , and it has both the right derivative
.f‘(+’(t) =f’(5;
+ 1)
(5.33)
and the left derivative
= -f’((;
f’(-’(()
- 1)
(5.34)
at every interior point 5 of I. (It has only the right or the left derivative if 5 is the left or the right end of Z,respectively, cf. Theorems 5.3 and 5.4.) By virtue of Theorem 5.5, f’“’(5) as well as f ’ ( - ’ ( < ) is monotone nondecreasing with 5, and, at every interior point 5 of I, f ” + ’(5) 2 f” - ’(5).
(5.35)
Furthermore,
(5.36) Theorem 5.8. For any convex function f ( 5 ) defined on I, there exist in Z at most a countable number of 5’s at which
>f”-’ (5).
ft{+)( rl >f“-’(5)). 5 # 5 (5, 5 E Eo), J ( 5 ) n J ( 5 ) = 0, due to (5.36). 1
2
1
2
1
5
(5.38) Since each J ( 5 )
2
contains at least one (in fact, countably infinite) rational number and the totality of real numbers R [ 2 U J ( 5 ) ] contains only a countable number C€Z0
5. Convex Functions
19
of rational numbers, Z,, cannot contain more than countably infinite elements. Q.E.D. We may represent a convex functionf(5) by a curve vl =f '(5)
(5.39)
on the plane with abscissa 5 and ordinate q, which curve we shall call hereafter the characteristic curue off(5). In more precise terms, it is defined as follows. Definition 5.3. The characteristic curve of a convex function f(5) defined on Z is the set C of points (5, q) such that 5 is an interior point of Z and f'(-)(c) 5 q S f ' ( + ) ( t )5, is the left end of Z and - 03 < q Sf'(+)(C), or 5 is the right end of Z andf'(-)(t) S q < co.
In what follows, we shall consider only such convex functions as are defined on " closed intervals," because it suffices for later applications. As is exemplified in Fig. 5.1, the characteristic curve C of a convex function f(5) defined on a closed interval Z = [b, c] [b may be - co and
Fig. 5.1. Characteristiccurve and the associated convex functions.
20
11. Convex Sets and Functions
where f " + ) ( c )or f ' ( - ) ( b )is assumed to be 00 or - CQ, respectively. Obviously, P + , P-, and C are mutually disjoint and together cover the whole (5, q) plane. Equations (5.35) and (5.36) may be rephrased as follows: (i) For any points (5, q ) E C and (5, q ) E C, 1
2
1
2
From (i), i.e., the monotonicity of C, and the fact that a point ( 5 , q ) sufficiently far away northwestward from the origin belongs to P+ and a point sufficiently far away southeastward from the origin belongs to Pfollows another property of C: (ii) For any real number I , the straight line ((5, $15 sects C at one and only one point.
+ q = I } inter-
Conversely, if a set of points C on the (t, q) plane satisfies both (i) and (ii), C is a monotone continuous curve on the plane dividing it into two parts P+ and P - . Furthermore, if we define the functionf(5) by the integral along the curve C from a fixed point (5, q) to a variable point 0
0
(t, vl), i.e., by 1
1
f(5) 1
=
f($.a,"';d5 + an integration constant,
(5.41)
thenf(5) is a convex function, as will be seen without difficulty. [Note that the existence of the integral (5.41) is also assured by (i) and (ii). See Remark 5.3 at the end of this section.] The characteristic curve of the functionf(5) defined by (5.41) coincides with the C itself. It will also be evident that two convex functions differ from each other only by an additive constant if and only if they have one and the same characteristic curve. Although we have adopted the assumption that the domains of convex functions to be dealt with are closed, their range may not be closed. In view of the symmetry of conditions (i) and (ii) with regard to 5 and q and for the purpose of making the descriptions to follow also symmetric, we
21
5. Convex Functions
shall impose the following condition on C,i.e., we shall restrict ourselves to consider only those functions whose characteristic curves satisfy (iii) : I
I
(iii) The projection of C to the ( axis as well as that to the q axis is a closed interval. From (iii), it immediately follows that (iv) If the domain I of a functionf((), i.e., the projection I of its characteristic curve C to the 5 axis, is unbounded to the right (to the left), then either sup f’(+)(()= co [inf,f’(-’(r) = -a] or 5 (all 0
f”+’(t) C f ’ ( 0 =f“-’(5)1. 0 0
5 < < ) , f ’ ( t )=
0
0
By virtue of the symmetry of (i), (ii), and (iii) with respect to ( and q, we can associate with a curve C, besides the functionf(5) in (5.41), also the convex function g(q) defined by the integral along C :
S($.a, 5 ( € 9
g(q) = 1
11)
dq
+ an integration constant.
(5.42)
f ( 5 ) and g(q) are defined, respectively, on the interval I , which is the projection of C to the 5 axis, and on the interval J, which is the projection of C to the q axis. In summary, we can associate with every curve C with the properties (i), (ii), (iii) a pair of convex functionsf((), g(q) (determined to within an additive constant) by the integrals of the form (5.41), (5.42), and, conversely, if a convex function f ( 5 ) or g(q) defined on a closed interval and with the property (iv) is given, then we can determine uniquely a curve C (its characteristic curve) with the properties (i), (ii), (iii) by differentiation by ( or q :
(5.43) The two convex functionsf(5) and g(q) connected with one and the same curve C in this way are said to be conjugate. Next, we shall obtain a relation that connects conjugate functions directly without resort to the characteristic curve. Let us consider a curve
22
IT. Convex Sets and Functions
C with properties (i), (ii), (iii) (whose projection to the 5 axis is denoted by I and that to the q axis by J ) , fix a point 0 = (5, q) E C. For an arbitrary point E = (5, q) with along C,
5EI
0 0
and
u] E J
(not necessarily on C), two integrals
(5.44.1) and (5.44.2) are defined. The value of (5.44.1) or (5.44.2) depends only on 5 or q, respectively, but not on the way of choosing the point B = (5, q) or 1
D = (l,9). (The ambiguity of choice takes place only when C has a vertical I
or horizontal segment.) In each of the four possible cases of the relative position of E to C, it will be seen, from property (i), that
= area
BDE 2 0,
(5.45)
and that the left-hand side of (5.45) is equal to zero when and only when the point E = ( ,
(5.48.1)
(5 E 0.
(5.48.2)
l,
= (-
00,
and
c = ((5, ?)I? = at, 5 E 1, ? E J > , where a > 0 (see Fig. 5.3).
Fig. 5.3. Conjugate functions: example (1).
26
11. Convex Sets and Functions
Fig. 5.4. Conjugate functions: example (2).
Fig. 5.5. Conjugate functions: example (3).
6. MINIMUM OF A CONVEX FUNCTION ON A CONVEX SET
Definition 6.1. A point in the n-dimensional Euclidean space R" is called a local minimum point (or, simply, local minimum) of a function f ( 6 ) defined on a subset 0: of R", if there exists a neighborhood U ( t ) of f
6. Minimum of a Convex Function on a Convex Set
27
5 E ~ ( tn)6.
(6.1)
such that
f(5)~
f ( t ) for every
t
If (6.1) holds for every 5 E 6, is called a global minimum point (or, simply, global minimum or minimum). When f (5) is a convex function defined on a convex set 6,we have the following important theorem. Theorem 6.1. A local minimum of a convex function f (5) on a convex set 6 is a global minimum, and the set of global minima is a convex set relatively closed in 6. If.f'(t) is strictly convex, there exists at most one global minimum.
PROOF. Let ( be a local minimum off(5) and U ( t ) be a neighborhood as mentioned in Definition 6.1. If is not a global minimum, then there should exist a point 4 E 6 such that f ( 5 ) < f ( t ) . Sincef(5) is convex,
t
belongs to 6 due to the convexity of 6. Furthermore, we can choose 1 so small that 5 may belong to U ( t ) .This, however, leads to a contradiction a
[cf. (6.1) and (6.2)]. Let the set of global minima be denoted by %R. For any 5 and 5 in !lX and any 1(0 5 15 l), we have 1
0
Since 5 as well as
5 is a global
minimum, it is impossible for f(5) to be
1
0
smaller thanf(5) = f ( k ) , which means that is.,
5 E %R,
1
0
for every
5 is also a a
A (0 5 15 1). Therefore,
a
global minimum,
%R is a convex set. The
A
relative closedness of !IN follows from the continuity of f(5). Finally, let us suppose that f ( 5 ) is strictly convex and that there exist two distinct points 5 and 5 in !lX. Then 0
1
f (112 5 ) < 3 0m + 3 M1 ) =f ( 05 ) =f ( 41 ) , which is absurd.
(6.5) Q.E.D.
I11 Topological Properties of Networks
The common feature of many kinds of network-type problems is their essential dependence on a geometrical figure called a linear graph or, simply, a graph. We shall give a summary of graph theory in this chapter. A graph is a figure consisting of lines and points so that its properties are easy to investigate intuitively. In the standard textbooks on graph theory (see, e.g., Konig [l], Berge [l], and Ore [l]), “points ” are made to play a principal role, whereas “lines” are merely a subset of the set of pairs of points. However, in applications, it is often the case that lines are endowed with more physical significance, whereas points are merely their junctures. Our standpoint, from which the following expositions will be made, is to pay attention primarily to branches, i.e., lines, taking account of nodes, i.e., points, only when it is necessary to do so (cf. Kondo and Iri [l] and ~ r c11, i ~41). 7. GRAPHS AND VECTOR SPACES
Unless otherwise stated, graphs to be treated in the following are “finite,” i.e., they consist of a finite number of nodes and branches. 7.1. Definition of a Graph Intuitively, a graph is a geometrical figure consisting of points (which we shall call nodes) and lines or line segments (which we shall call branches)
28
29
7. Graphs and Vector Spaces
connecting a node to another. In the formal terminology, it may be defined as follows. A graph 6 is the composite concept { 111, 23, a+, a-} of (a) a set of nodes 111 = {nl, . . ., nM}, (b) a set of branches 23 = { b,, ..., bn}, (c) an incidence relation, where the incidence relation is a couple of functions domain 23 and the range in 111:
a-:
a + : 23-111,
a+ and a-
with the
23-a.
We sometimes call the cxth element n, of 111 “node a’’ and the Kth element b, of 23 “ branch K.” The intuitive interpretation of the functions a+ and a- is that nodes na and nB are the two ends of branch b, , or, more precisely, b, starts from na and ends at nB if and only if a+b, = na and a-b, = nB (cf. Fig. 7.1). We say that b, is positively incident to d’b,, negatively incident to a- b, , and not incident to all the other nodes.
Fig. 7.1. A branch and its endnodes.
An incidence relation can be represented by other functions. In fact, let 6+ and 6- be functions whose domain is 111 and whose range is in the power set 2” of 23 (i.e., the set of all subsets of 23):
a+: 111+29,
6-:
111-+29,
and which satisfy the conditions 6 + n a n 6+nB = 6-n, n 6 - n B = @ (empty set)
for every pair na , nB and M
U 6+na= a= 1
u M
a= 1
6-na=B.
(E
111, cx # p),
(7. I)
30
111. Topological Properties of Networks
Then we can define d + and S'n,
3 b,
6-n,
3
a-
uniquely by the relations if and only if d+b, = n a , if and only if a-b,
b,
= n,.
(7.3)
C(7.1) assures the single-valuedness of a+, a-, and (7.2) implies that the domain of a', a- is the entire 23.1 Conversely, if ' 8 and a- are given, then we can define 6' and 6- by means of (7.3), which satisfy (7.1) and (7.2). S'n, and 6-n, are intuitively interpreted as the set of branches positively incident to norand the set of branches negatively incident to nor, respectively (see Fig. 7.2).
Fig. 7.2. Set of branches incident to a node.
Sometimes, the functions
r+- a - 6 + :
r- = a + s - :
9t+2% ,
%+2%,
which satisfy the conditions na E
r+np
if and only if
np E
T-n,,
are used to represent the incidence relation of a graph (where a+, 8- are regarded as the mappings from 2' to 2', which are naturally defined by mcans of the original a+, 8- from B to '3).If a set % and a couple of functions r+,r- are given, we can construct a graph in the foregoing sense by defining B as the set of pairs (n,, na) (n,, na E %) such that n, E r - n ,
or
na E r + n ,
and the incidence relation by d+(nar na)
= nu
and
d-(n,,
nap) = na.
But the converse is not always possible, i.e., we cannot represent a graph having so-called "parallel branches" (i.e., the branches b, b, . . . with the common endnodes a+ b, = d'b, = , d - b, = d - b, = * * .) in this way.
31
7. Graphs and Vector Spaces
A node that does not belong to 8'23 u 8-23, or, equivalently, a node n, such that 8 + n , = 6-n, = 0, is called an isolated node. Usually it is convenient to exclude the isolated nodes from %. A branch b, such that a+b, = 8-b, is called a self-loop, which is a branch represented by an arrow starting from a node and returning to the same node. b2,d 2 + , a,-} Two graphs 6, = {%,, b,, a,', a,-} and 6, = {g2, are said to be isomorphic if there is a one-to-one correspondence between g1and %, as well as between bl and b2 and if, under these correspondences, 8,' and 8,- are isomorphic with a2+ and d 2 - . In what follows, however, we often make no distinction among isomorphic graphs, regarding them merely as identical. Now we shall introduce several concepts of transformations of graphs. a2= {ill2 B2, , a2+, a,-} is said to be obtained from = {%,, B,, a,+, a,-} by reorientation of a branch, say b,, of b,,if 5Q2 = g1,b2= b l (here, again, we use the equality for a one-to-one correspondence) and
a2+b,
= a, - ,b,
,
a2+b, = al+b,,
a,-
b, = al+ b ,, ,
a2-b, = a,-b,
for all
IC
#
I C ~ .
(7.4)
Intuitively, 6, is obtained by reversing the direction of (the arrow representing) branch ,b, . The reorientation of more than one branch is defined in a similar manner. B2= {a,,b2,d 2 + , a,-} is said to be obtained from 6, = {Sl, B1, al+, a,-} by open-circuiting a branch, say b, of b,,if S2 = Sl, b2= 23, - {bKo},and a,+, 8,- are the restrictions of a,+, 8,- to B2, where {bKo} denotes the set consisting of the single element b,, and by the restriction to A' of a functionfdefined on A (A' E A ) we mean the function g defined on A' which has the same value as f has at every element of A'. Intuitively, G2 is obtained by simply removing a branch b,, from (lil. The open-circuiting of more than one branch is defined similarly. (tj2 = {g2, b 2 ,d 2 + , a,-} is said to be obtained from 8 , = {%,, b,, a,+, 8,- } by short-circuiting a branch, say ,b, , of bl,if they are related to each other as follows. consists of the nodes of %, which are not incident to b, and of a node not in 8, that we shall denote by n o . We denote by f a function such that
f:
%1+%2,
f(nJ = n,
f(',+
'KO)
= 1f '(
if na is not incident to b, - bKO) = "0 *
(7.5)
32
111. Topological Properties of Networks
B, = Bl - { bKo},and a2+b, =f(a,'b,),
for all
dz-b, =f(a,-b,)
IC
# q,. (7.6)
Intuitively, 6, is obtained by identifying, i.e., combining into one node, the two endnodes of b, and then removing bKo.The short-circuiting of more than one branch is defined similarly. 6, is called a subgraph of G1 if the former is obtained from the latter by open-circuiting some branches. The complement of a subgraph (lj2 of G1 is, by definition, the subgraph obtained from 61by open-circuiting all those branches that belong to G 2 . (We sometimes exclude from consideration the isolated nodes resulting by open-circuiting.) 1.2. Vector Spaces
Let G be the ring formed of all integers. For a given graph 6 = {%, B,
a', 8-} (% = {nl, .. . , nM}, B = {bl, ...,bn}), we denote by V(G, 8)the totality of linear forms 5, with 23 as the basis and G as the domain of coefficients :
For two arbitrary elements n
5= C
rb,
and
2
,=l1
1
of V(G, B),their sum
g=
n
C rb, "=12
5 + 5 is defined as 1
2
and for an arbitrary integer h (E G) and an arbitrary element
crb,
6=
n
E V(G,
B), their product hg is defined as
K = i
hS=
2
I(=
1
(h5")b"
CEV(G,~)l,
(7.9)
where, on the right-hand side of (7.8) or (7.9), 5" + 5" or hl" is the sum or 1
2
product of integers in G. Thus, V(G, B) may be regarded as a module or a vector space, so that we shall call an element of V(G, 23) a vector. Furthermore, we often make use of the function called inner product which maps V(G, B) x V(G, B)to G, i.e., we define the inner product of a
33
7. Graphs and Vector Spaces
vector
6=
c Fb, n
c q,b, n
23) and another q =
E V(G,
,=l
E V(G, 23) by
K=l
- 1 c t"?, n
5
(EG).
=
(7.10)
K= 1
We shall resort to the obvious abbreviations without particular remark. For example, we shall denote by 0 the vector with all = 0, by b,, the vector with all 5" = 0 except for tK0 = i 1, etc. According to this convention, the summation on the right-hand side of (7.7) could be identified with that defined in V(G, 23) such as (7.8) and the product in each term under the summation sign of (7.7) with that defined between G and V(G, 23) such as (7.9). Similarly, we define the vector space V(G, %) as the totality of the vectors of the form
c Cana M
4=
(7.11)
(Ca
a= 1
in which the sum of vectors and the product of a vector with an integer are defined as before. Instead of G, we can adopt another commutative ring, with the unit element and without divisors of the zero, to form a vector space. Especially, we shall deal with V(R, 23) and V(R, 8)in the later chapters (where R is the field of real numbers). Since the results in the case of integer coefficients can easily and naturally be adapted to the case of other coefficients, we shall consider, in this chapter, mostly the case of integer coefficients. The incidence relation of a graph 6 = {a, 23, a+, 8-} induces two homomorphisms 8 and 6 between V(G, 23) and V(G, %):
a:
V(G, 23) + V(G, %),
6: V(G, %) + V(G, b),
defined by the basic relations: ab, = a+b, - a-b,,
6na =
c
b,
c
-
b, ~ d .n +
Now let us define a matrix incidence matrix, by
6," (a= 1, ..., M;
bn E 8 -
K =
(7.12)
1, ..., n), called the
if
na = a+b, #a-b,
= -1
if
na=8-b,#a+b,
=O
otherwise,
D,"=1
b,. n.
(7.13)
where M is the number of nodes and n the number of branches. It is
34
111. Topological Properties of Networks
obvious that, for a fixed K, the number of nonnull 6,”s is either 0 or 2, that it is 0 if and only if b, is a self-loop, and that, otherwise, one of the nonnull 6,”s is equal to I and the other to - 1. Hence, we have =0 a=
In terms of
D:,
for all K.
(7.14)
I
(7.12) is written as (7.12‘)
or, in general, we have the explicit expressions for d and 6:
Thus,
a
and 6 are mutually “contragredient.” Direct calculation will
show that, for arbitrary 5 =
n
M
2 0, and Cp 5 0, we have + q , > 0, which implies that b, E car q.] Thereforeq - ij is a cutset, and car(q - ij)c car q, since car(q - ij)$ b, . From the minimality of q, it follows that q = 5. We have shown also that the foregoing segregation {el bKl, .. . , el bKl}is elementary, since, otherwise, we should be led to a contradiction to the minimality of q. Conversely, the simple cutset q corresponding to an elementary segregation is minimal. For otherwise, there would exist a minimal cutset ij such that car ij c car q, and the segregation constructed from ij in the manner just described would be a proper subset of the given elementary segregation, which is absurd. Theorem 9.2. A minimal cutset is a multiple of the elementary cutset corresponding to an elementary segregation.
We have seen also that the intuitive image of an elementary cutset is an elementary segregation.
EXAMPLE.In the graph of Fig. 7.3, 6 = b, + b3 - b, is a loop [see Fig. 9.l(a)]. In fact, 86 = db, + db, - db, = (n, - n,) + (n2 - n3) (n, - n3) = 0. q = b3 - b, b, - b, is a cutset [see Fig. 9.l(b)]. In fact, if we take = n, + n, + n4 n,, we have 6c = an, + 6n, + 6n, + 6n,
+
c
+ + + b,j - b7) + (-b, - b2 + b3) + (b,
= (b, b, - b, b, - b, + b, - b, = q. It is verified that
6 * q = 0.
- b,
- b9) + b9 =
9.2. Rank and Nullity of a Graph The rank of a graph is defined to be the dimension of Y(G) [or, equivalently, of Y(R)], i.e., the number of linearly independent cutsets. The nullity of a graph is the dimension of X(G) [or X(R)], i.e., the number of linearly independent loops. n
Since a cutset q =
C q, b, I(=
1
is defined by
46
111. Topological Properties of Networks "2
(b)
Fig. 9.1. (a) Loop; (b) cutset.
with arbitrary
6,
the rank of a graph coincides with the rank m of its n
incidence matrix
DK3.Since a loop 6 =
1 ("bK is defined as a solution of K = l
the nullity of a graph coincides with the number of linearly independent
47
9. Loops, Cutsets, Trees, and Cotrees
solutions of (9.7), i.e., it is equal to n - rn (which will be denoted by k in what follows). Thus we have Theorem 9.3. The number n of branches of a graph is equal to the sum of its rank m and the nullity k. The orthogonality relation (7.21) between a loop and a cutset can be strengthened as follows. Theorem 9.4. The inner product 6 * q of a loop 6 [EX(G)] and a cutset q [E Y(G)] is equal to 0. Conversely, a vector 6 E V(G, 23) is a loop, if the inner product with an arbitrary cutset vanishes, and a vector q EV(G, 23) is a cutset, if the inner product with an arbitrary loop vanishes. PROOF. It remains to prove the second half of the theorem. Suppose that the inner product of a given 6 E V(G, 23) and an arbitrary cutset q E Y(G) vanishes. A cutset q is expressed as q = 86 so that we have, by virtue of (7.16), 0 = 6 * q = 6 * (86) = (86) Since
6
is arbitrary, 86 should vanish, i.e.,
- 5.
(9.8)
6 should
be a loop. Next,
q K b, E V(G, 23) and an
suppose that the inner product of a given q = K = l
arbitrary loop
6 E X(G)
vanishes. We determine
5=
M
lanu as follows. a= 1
Choose M - rn nodes nu,, . . . , nu,-,,, one from each connected component, i.e., nai E W i(i = 1, . . ., M - m),and put
rai=O
( i = 1, ..., M - r n ) .
(9.9)
For every node na other than nmi’s,there exists a path from it to one of ~ ...,E~ b,J. nai’s, of which the sequence of branches with signs is ( E b,,, Then, set (9.10)
We observe that the value of la is determined independently of the choice of the path from no to one of nai’s. For, if there is another path ( E l ’ b,,, . . .,Eh’bA,,) and
rl=
h
E i ? A ~ , j= 1
(9.11)
48
111. Topological Properties of Networks
then (elbKi, ..., el bKt, -eh'bAh, branches of a closed path, and
. . . , -cl'bA,)
is obviously the sequence of
h
1
(9.12) is a loop. We have, by assumption, (9.13) n
so that 5,' = l a . Let us consider 'the cutset Tj =
C 4, b,
= Sc
with
5
K=l
thus determined. If, for an arbitrary branch, we denote na = a'b, nB = 8-b,, we have
V,
= bK
*
(65) = ( n a - nfi)
*
5 = 5a -
*
and (9.14)
If (cl bKl, . . . , el bKJ is (the sequence of branches of) a path from nB to an n a i , then (b,, el bKl, . . ., el bKJis a path from nu to n a i , so that we have [a = VK
Therefore, ij, = q K for every shown that q is a cutset.
K.
+ 58.
Hence, q = T j
(9.15) = 85.
Thus, it has been Q.E.D.
9.3. Trees and Cotrees
A tree 2 on a graph 0 is a maximal loop-free subset of the branch set 8 of 6,i.e., 2 ( s 23) is a tree if and only if 2 is loop-free, and no loop-free subset of 23 strictly includes 2. Similarly, a cotree on a graph 6 is a maximal cutset-free subset of 23. As was shown in $9.1, for 2 to be loop-free it is necessary and sufficient that there is no closed path consisting of branches of 2 only, and for T to be cutset-free it is necessary and sufficient that there is no segregation consisting of branches of z only. It is also noted that the nonexistence of a segregation consisting of branches of % is equivalent to the existence of a path between any pair of nodes (belonging to the same connected component) which consists of branches of 23 - only. The practical algorithm for examining the loop-freeness or cutsetfreeness of a subset of branches was already given in $9.1. Thus, to obtain which is oba tree we may proceed as follows. We start from To = 0, viously loop-free. If there is a branch b, E 23 - ZiP1such that u {b,} remains loop-free, then we put 2,=Z i - l u {b,}. Repeating in this way
49
9. Loops, Cutsets, Trees, and Cotrees
.
for i = 1, 2, . ., we finally get to a maximal loop-free subset 2, with some E, which is a tree. A cotree can be obtained in a similar way. Theorem 9.5. For any given loop-free subset of 23, we can find a tree including it. For any given cutset-free subset of 8,we can find a cotree including it. PROOF, This is obvious from the definition. Q.E.D. Let 2 be a tree. For an arbitrary b, that is not in 2,2 u { b}, loop-free any longer. Consequently, there is a loop E, such that b,
(b, E 23 - 2).
E, E 2 u {b,}
E car
is not (9.16)
By virtue of Theorem 9.1, we may assume that E, is an elementary loop, i.e.,
E, = b,
+C
(tA= 0,1, or - 1).
tabb,
(9.17)
b i s l
Every nonnull loop whose carrier is in 2 u { b,} is a multiple of E,. For, if
is such a loop,
-
1
5 - pE,=
( f A - pta)b,
brsI
is also a loop whose carrier is in 2,so that it must be the null vector. Hence, corresponding to each branch in 23 - 2,an elementary loop of the form (9.17) is uniquely determined. Let us denote the number of branches of b - 2 by E and the set of those elementary loops by n
rp =
1 R,Kb,
( p = 1, ..., E),
(9.18)
K=l
where RpKis 1, 0, or - 1. If we renumber the branches in such a way that the first E branches constitute b - 2 and the remaining n - ]; branches constitute 2 and if we denote the renumbered set of branches by {vl, ..., vE,ul, . .,u,,-~}(={b,, ... , b,,}), then (9.18) is written as follows [cf. (9.17)] :
.
n-i
rp = vp
+ 1 M/u,
( p = I,...,
Q,
a=l
where M,"
= 0,
1, or - 1. Every loop f
c t"b,= c n
5=
tC=l
p= 1
xpvp
+
n-i
gaua a= 1
(9.18')
50
111. Topological Properties of Networks
is expressed as a linear combination of rp's: k
t = 1 xPrp
r" =
or
r;
RpKxP.
(9.19)
p= 1
p= 1
For r;
k
5-
1 xPrp= 1 (g a - 1 M / x P)u,
p= 1
a n= - k1
p=l
(9.20)
is a loop whose carrier is in 2,which must be the null vector. As is obvious from expression (9. IS'), the rp)s are linearly independent, from which it follows also that the expression of an arbitrary loop as the linear combination of rp)s is unique. Hence, I; is equal to the nullity k of the graph and n - E to the rank m. We shall call {rl, . . . , rk} defined as in the foregoing the primitive (or fundamental) set of loops associated with tree 2,and R," ( p = 1, . . . , k ; K = 1, . . . , n) the primitive loop matrix associated with 2. In entirely the same way, for a cotree 2,the elementary cutset whose carrier consists of a branch in 8 - Z and some branches of -L is uniquely determined. By renumbering branches, we assume that {ul, . . . , u i } form 23 - T, and {v,, . . ., v ~ - form ~ } Z ({ul, . . . , uiii, vl, . . . , v , , - ~ }= { b,, . . ., b,,}). Then, the primitive (or .fundamental) set of cutsets associated with Z, {d', . . . , a"}, is determined: n-iH
d" = u,
+ 1 N,"v, p= 1
n
=
C K=
DKabK
( a = 1 ,..., E),
(9.21)
1
where Npa, D," = 0, 1, or - 1. D," is called the primitive cutset matrix associated with T. An arbitrary cutset q is expressed, uniquely, as a linear combination of da's and iii is equal to the rank m of the graph and n - iii to the nullity k . The following theorem is obvious from the preceding considerations. Theorem 9.6. The number of branches of a tree on a graph is equal to the rank m of the graph, and that of branches of a cotree to the nullity k. Covollavy 9.1. A loop-free subset of m branches is a tree, and a cutsetfree subset of k branches is a cotree. PROOF. I t follows from Theorems 9.5 and 9.6. Q.E.D.
Not only is the sum of the number of branches of a tree and that of a cotree equal to the total number of branches (Theorems 9.3 and 9.6), but also we have
51
9. Loops, Cutsets, Trees, and Cotrees
Theorem 9.7. If 2 is a tree, then 23 - 2 is a cotree. If Z is a cotree, then 23 - T is a tree.
PROOF. 23 - 2 is cutset-free. For, if q is a cutset whose carrier is included in 23 - 2,i.e., if k
q=
c
(9.22)
YpVp,
p= 1
where the vp)s are branches of 23 - 2,then q must be orthogonal with every loop of the primitive set associated with 2 [cf. (9.1 S')] : rp-q=yp=O
( p = 1, ..., k),
(9.23)
so that q must be null. Since 2 has m branches, 23 - 2 has k branches and, consequently, is a cotree (Corollary 9.1). The latter half of the theorem is proved in the same way. Q.E.D. Theorem 9.7 states that a tree or cotree has always its complementary cotree or tree. Hence, in what follows, we shall always consider a dissection of 23 into a tree-cotree pair (2, 2) instead of a tree or a cotree alone. EXAMPLE.On the graph of Fig. 7.3, {bl, b5, b,, b, bll} is a tree, and { b, , b, , b, b, , b, , blo} is its cotree (see Fig. 9.2). The associated primitive loop matrix is 1
RpK=
1 2 3 4
1 0
0 0 0
65 1
2 1
3 1
0 0 0 0 0
0 1 0 0 0 0
4 0 0 1 0 00
5 0 1 0 1 1 0
6 0 0 0 1 0 0
7 0 0 0 0 1 0
8 0 0 0 0 1 0
9 1 0 1 1 0 0 0 0 0 0 0 0 0 , (9.24) 0 0 0 0 0 0 0 1 1
and the associated primitive cutset matrix is
1 2 D," = 3 4 5
1 1 0 0 0 0
2 3 4 5 6 1 1 0 0 0 0 - 1 0 1 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
7 0 0 1 0 0
8 0 1 1 0 0
9 1 0 1 1 0 0 0 0 0 0 0 0 0' 1 0 0 0 - 1 1 (9.25)
52
111. Topological Properties of Networks
Fig. 9.2. Tree and cotree.
The matrices M,," in (9.18') and N,," in (9.21) are, respectively, a\
1
p\
1 2 Mp"= 3 4 5 6
-
2
1 1 0 0 0 0
0 1 0 1 1 0
3 0 0 0 0
4 0 0 0 0
1
0
0
0
5 0 0 0 0 0 1
(9.26)
and )
(? E J = J ,
J d 7
(13.10)
as is obvious, whereas the relation among the functions cp([), q1(t1),and ( ~ ~ ( 5is, )somewhat more complicated. In order to obtain it, let us fix a 5 belonging to I (the projection of C to the 5 axis). Then there exists a point (5, q ) on C such that (13.11) 5= +
tl t2
with appropriately chosen points ( t l ,17) on C, and Theorem 5.9 (Chapter II), we have Vi(t')
(g2, q) on C, . From
+ $ i ( ~= ) till
(13.12)
for i = 1 and 2. Summing (13.12) for i = 1 and 2, and then substituting (1 3. lo), we have
cpdt')+ c p 2 ( t 2 ) = (el + t%- C$'W + 4%91 = 5rl
-
s maxC5rl - $(41= (P(5),
(13.13)
V E J
where (5.48.2) (Chapter 11) has been taken account of. On the other hand, for any 5' €1' and any 5 , € 1 , such that 5 = 5' 5 , and for any q E J , we have, again by Theorem 5.9,
+
(PI(5')
i.e.,
+ (P2(t2) 2 5v - $(d,
cpl(tl) + cp2(t2) 2 maxctll - $(dl= do.
( 13.14)
$ E J
Therefore, we have
d.
(b)
Fig. 13.9. Series connection of branches.
(13.17)
84
IV. Network-Flow Problems in General
The relation is abbreviated as 9
c = c ,+ c , .
(13.18)
Other properties we described for the parallel connections hold mutatis mutandis also for the series connections. The foregoing arguments can easily be generalized to the case of the series or parallel connection of more than two branches. (The reader should explicity write them out.) Now we are at the position to consider the characteristics of the branches formed as the series-parallel connections of (a) current sources, (b) voltage sources, and (c) diodes. (e) Current limiter: The parallel connection of a current source of value c and a diode such as shown in Fig. 13.10(a) has the characteristic of Fig. 13.10(b). A composite branch of this kind will be called a current limiter (with value c ) and denoted in abbreviation as shown in Fig. 13.10(c).
e
-ID--
5"
(a)
Fig. 13.10. Current limiter: I" = (-
q (77 2 0).
(b) CO,
c ] , J,
(c) =
[0, a),yK(,(5) =0
(e 5
c), p(7)=
(f) Voltage limiter: The series connection of a voltage source of value e and a diode such as shown in Fig. 13.11(a) has the characteristic of Fig. 13.11(b) and will be called a voltage limiter (with value e).
13. Constituents of a Network
85
(g) Single-step step-function : We often encounter the branches of the types shown in Figs. 13.12 and 13.13.
(h) General step-function: Any branch with a monotone nondecreasing step-function characteristic can be composed as a series-parallel connection of branches with single-step step-function characteristics. For
86
IV. Network-Flow Problems in General
example, the branch with the characteristic of Fig. 13.14(a) can be composed as the parallel connection of the branches of the kind Fig. 13.12 [see Fig. 13.14(b)] or as the series connection of the branches of the kind Fig. 13.13 [see Fig. 13.14(c)]. It can be composed in many other ways, of which two are illustrated in Fig. 13.14(d) and (e).
-t---
(e)
(d)
Fig. 13.14. Step-function.
The foregoing example will suggest the following theorem, of which the formal proof is left to the reader.
Theorem 13.2. Any branch with a monotone nondecreasing stepfunction characteristic can be composed as a series-parallel connection of tic current sources, n, voltage sources, and n, diodes, where n, is equal to the number of vertical segments of the step-function, n, to that of horizontal segments, and n, to that of corners. The numbers n,, n,, and t i D satisfy the relations
In, - n,l 5 1,
n,
= n,
+ n, - 1.
(13.19)
In concluding this section, we note that any branch with a monotone nondecreasing piecewise linear characteristic curve can be composed as a
15. Minimization Problems on a Network
87
series-parallel connection of current sources, voltage sources, diodes, and linear resistors. However, we shall omit the details about such branch characteristics. (The reader should work out the constructions analogous to those in Fig. 13.14.) 14. REMARKS ON DUALITY
The reader will probably have noticed that all the descriptions (except for those including the concept of nodes) in regard to networks in $13 have a perfectly dual structure, which is a natural extension of what we noted in Chapter 111 (see $10) for the topological properties of graphs. The dual correspondence of the graphical or topological concepts that is tabulated in $10 may be augmented with the following tabulation to involve also the network concepts already treated and to be treated in this chapter: flow current source current limiter (Kh.F.) diode resistor
tension voltage source c-) voltage limiter ++ (Kh.T.> c-) diode c-) resistor etc. ++
t ,
Almost all the descriptions in this chapter will be put in the dual structure. Although we shall not point out everywhere which statement corresponds to which in the framework of duality, the reader should always bear it in mind. Moreover, we shall sometimes omit the proof to a theorem whose dual has already been proved. In such a case, the reader is asked to supplement the omission or, at least, to convince himself of the possibility of doing it. 15. MINIMIZATION PROBLEMS ON A NETWORK
The problem of obtaining a compatible pair of flow and tension configurations on a given network can be expressed in the three seemingly different forms to follow (Problems 1-111). This section is devoted to the formulation of these problems as well as the discussions on their interrelations. By a “ network-flow problem,” we shall mean a problem of the kind to be treated in this section. We assume also that the specifications to the given network N ( S ;C,,. . . , C,) are the same as those given in $13.
88
IV. Network-Flow Problems in General
15.1. Problem I: Minimization Problem in Terms of Flows
c t"b, n
To obtain a flow configuration
6=
[E X(R)]
which, satisfying
,=l
the condition
5" E I"
for each branch b,
(IC = 1,
. ..,n),
(15.1)
minimizes
@D(t>
n
K=
(15.2)
qK('
1
+
GK(8K)
=
E
S,,,, then (15.10)
Z K q K
so that we have Q(f,
fi) = 0.
(15.11)
Conversely, if (15.1 1) holds for a $ E I and an fi E J, then (15.10) must hold for all K , so that, by virtue of Theorem 5.9, (15.7) must hold for all K. Hence, fi) E S,,,. Thus, we have
(c,
Theorem 15.1. If neither I nor J is empty, i.e., if both Problem I and Problem I I have a feasible configuration, then Q(6, q) is nonnegative on I x J. Furthermore, we have
s,,,= { k q ) I Q ( L q) = 0, (G? s)E I x J > .
( 15.1 2)
(c,
Let fi) E S,,, be a solution of Problem 111. Then, for an arbitrary feasible flow configuration 6 (E I), we have
@(5)= '(6,fi)
- Wfi)
L Q(6,fi)
- Wfi) =
w, (15.13)
and, dually, for an arbitrary feasible tension configuration q (E J),
Wq) = '(S, q) -
we) 2 Q(t,fi)- we) = Vfi).
(15.14)
Hence follows
(6,
Theorem 25.2. If fi) ES,,,is a solution of Problem 111, then f is an optimal flow configuration, i.e., a solution of Problem I , and fi is an optimal tension configuration, i.e., a solution of Problem 11. In other words,
s,,,c= s, x s,,.
(15.15)
The following theorem is the most fundamental in this context. Theorem 25.3. If Problem I has a solution 6, then there exists a solution fi of Problem I I such that 6) is a solution of Problem 111. Dually, if Problem I 1 has a solution Q, then there exists a solution $ of Problem 1 such that fi) is a solution of Problem 111.
(e,
(c,
91
15. Minimization Problems on a Network
PROOF. We shall give the proof to the first half of the theorem because the rest can be proved dually. Let us denote by 23, the set of branches for which g" is an interior point of I", by 23, the set of branches for which is the left end of I", and by 23, the set of branches for which g" is the right end of ZK(23 = 23, u 23, u 23,). For another feasible flow configuration 5 (E I, not necessarily optimal), we introduce the expressions
s"
E
A t K= 5" - g.
(E
> 0, b,
( 15.16)
E 23)
and A t K= A'tK - A-5"
(b, E
B,),
At''
(b,
SRn BLA
=0
where A'CK 2 0 and A-5" in terms of A*tK's as
c D," Atu
=
2
E
2 0 for all K. The feasibility of 6 is expressed D,"A-5" = O
D,"AfrU -
bKE!&U(m~-5~)
(a
= 1,
..., m),
b,EBru(8~-5~)
A'tK 2 0
[b,
E
231 u (23, - S,)],
A-5" 2 0
[b,
E
2 3 1 u (23, - BL)],
(15.18)
where D," is a (primitive) cutset matrix of the graph of the network. Making use of the notations cpL(*) introduced in $5.2 for the one-sided which means derivatives and also of the notation [XI', [XI'
=x
if x 2 0 ,
=O
if x 5 0,
(1 5.19)
5 as @(5>- @(5>= @tS + E AS) - @(S) we can express the optimality of
(15.20)
92
IV. Network-Flow Problems in General
where O ( E ) denotes a quantity such that account of the relation
O(E)/E
tends to zero as E does. On
[A*,
we have
cp;(-)(p") 8-5")+ O ( E ) 2 0.
A'5" -
cp:(+)(5^") '(b,EBI
323-Z)~)
b,
E BI U
(BR-SL)
(15.23) Hence, for an arbitrary set of A'5"'s and A-O
(C)
(d)
Fig. 15.1. Four kinds of networks.
Lemma 15.1. If a)@ has a lower bound on I (nonempty), then it attains the minimum on I, i.e., Problem I has a solution. If Y(q) has a lower bound on J (nonempty), then it attains the minimum on J, i.e., Problem I1 has a solution.
PROOF. The infimum, i.e., the greatest lower bound of @(Q on I, whose existence is assumed, will be denoted by ( 1 5.33)
95
15. Minimization Problems on a Network
Due to the definition of the infimum, there is a sequence of feasible flow configurations 6,6, . . . (E I) such that 0 1
lim
~ ( 6 =) 6.
i-m
(15.34)
i
If I is bounded, i.e., if it is compact, then we can choose a subsequence of 6's having the limit f for which i
~ E I .
and
O(f)=6
(15.35)
The case where I is unbounded requires further consideration. Let the set of branches 8 be partitioned into three subsets B,,B,, and B3, where 23, is the set of those branches bK's for which the sequence {r,5", . . .} has a point of accumulation, 23, is the set of those branches 0
1
b,'s for which the sequence {Y, 0
Y, . . .} has no upper bound (or no lower 1
bound) but for which J , is bounded upwards (or downwards), and 23, is 8 - (23, u 8,). Taking an appropriate subsequence if necessary, we may assume that the sequence (6, 6,.. .} has the following properties, where E 0
1
and 6 are arbitrary (fixed) positive numbers and n, is the number of branches of 8,: (1) For every branch b, E B,, Iim 5" = i-co
5" 5 5" 5 5" 5 ... 0
1
and
2
2-'c/n1 > 15" - PI,
for any
and
4" between P and r". 0
E
B2,
15" - 5" > 0
1
me-),
1
15" - 5"l > E, i i-1 5" = co
lim
(resp. Iim
i+m i
(15.39)
5 ,= - co),
i+m i
and
(15.40) [Here it should be noted that property (iii) in 55.2 (Chapter II), which we assume is possessed by every branch characteristic, plays an important role in the foregoing partitioning of S.]Next, let us consider the equisignum decomposition of 6 - 6 into minimal loops (see $9.1 and Appendix 2): i
6-5= i
O
0
(xij > 0; ryj = 0, 1, or - l),
xij rij
(15.41)
j
where the rii)s are elementary loops. Although the decomposition is not unique, there can appear, in any decomposition, no elementary loop rij such that (15.42) car rij s 23, , C a, r; < 0; K
for, if such an rijo appeared, the flow configuration
6 + xrijo would
be
i
feasible (i.e., have
E I)
for any positive x, and, by virtue of (15.38), we should
1
+ x r i j o ) = @(t> +x C i
r:jo
9
K
which would, however, contradict the assumption that @(6) is bounded downwards on I. Therefore, in a decomposition such as (15.41), if the carrier of an elementary loop rij is included in S 2 , the sum of the a,'s around it must be nonnegative : a, rrj 2 0 K
It is also obvious that, for every i,
C' x i j < E , i
(1 5.43)
15. Minimization Problems on a Network
where
c'
97
means the summation over all those j ' s
j
car rij n bl#
0. We split the summation
c' for those ri;s
in (15.41) into three, i.e., j
for which car rij n b, #
i
which car rij s b2,and and car r i j n Sj3# we have
those ri;s
c"'for those rii)s for which car rij i
0.From (15.36)-(15.40)
i
0,c" for i
2 cp,(t")
(PK(5")
for which
n 23, = 0
and the convexity of for
b,
E
b,,
uK
for
b,
E
23, ,
C,
for b,
E
b,,
-
for
(P,'S,
0
cp,(rK) = cp,(r") i
0
ij 1
+ C xijr;
~ ~ i( 52" c~,(r") ) 0 +
(15.44)
where
C
rrjc, >
for every b,
lall
E
b, such that
i-rj
# 0.
(15.45)
b r E 232
Therefore, we have
(1 5.46)
or, setting u =
c
bx E ' 8 2
0
= min
bx E 'Bi
1 4 1+
(
ICKI
c Ic,l c
(> 01,
bK E 23s
(15.47)
lull]
-
bn E 232
(>Oh
and taking account of (15.43) and of the obvious relation
we have
@(t)2 @(g) - 6 - EU i
0
- EV
+ min b,E'Bo
15" - Ylu. i
0
(1 5.49)
98
IV. Network-Flow Problems in General
The relation (15.49) is now independent of the manner of decomposition (l5.41),and, in addition, 6, as well as u and o, is independent of i. (15.49) indicates that the sequence {@(k), @(E,), . . .} would diverge to the positive 1
0
infinity if B, were nonempty [cf. (15.39)], contradicting (15.34). Thus we can conclude that B3 is empty. We then consider to modify each 6 into = i
5 + AG in i
i
such a way that
i -
^
tK = i" i or
AtK = tK- = lim ~ ( 5 =) 4.
i+co
i
(15.60)
i
i+co
The equisignum decomposition of f - f into minimal loops i
1
5 - 5 = c Zij Pij i
l
(15.61)
j
will yield the relations, similar to (15.44)and (15.46),
cp,t5"")
= cp,(?)
=
i
cp,(?)
= i
cp,(P)
for
b, E B , ,
1
( ~ ~1( 5 "+" )
(1 5.62)
(7
for b,
giji ;t)u,
E
23,
,
and
@(5) i
= a([) 1
+ c" j
1
Iij i;&u,, brE82
(15.63)
where it is taken into account that every Pij in (15.61)has its carrier in B 2 .
100
IV. Network-Flow Problems in General
It is shown as before that, for every iij,
(15.64) Therefore, we have
(1 5.65) From (15.60) and (15.65), it follows that
However,
lim
@(El)
i-tm
i
=
6 2 @(El.
(15.66)
1
6 is the infimum of @(t)on I, so that we finally have
@(E) = 6,
(1 5.67)
1
6 being an optimal flow configuration, i.e., a solution of Problem 1. 1
The second half of the theorem can be proved similarly.
Q.E.D.
By means of the foregoing lemma, we can now see the details of cases (a)-(d). In case (a), since there are 5 E I and q E J, we have, for an arbitrary 0
0
5 €1, or
W) 2
(15.68)
-Wq). 0
This means that
@(t)has
a lower bound -Y(q) on I, so that Problem I n
has a solution. Hence, by Theorem 15.3, Problem I1 as well as Problem I11 has also a solution. In case (b), @(g) can have an arbitrarily small value on I, for, otherwise, Problem I would have a solution (Lemma 15.l), and, consequently, Problem I1 would have a solution (Theorem 15.3), in contradiction to the assumption J = 0. Case (c) is the dual of (b). The foregoing considerations may be summarized in the following theorem. Theorem 15.5. For a given network-flow problem, one and only one of the following four cases takes place:
101
16. General Properties of Solutions
(a) There exist both a feasible flow configuration and a feasible tension configuration. In this case, all three problems, i.e., Problems I, 11, and 111, have a solution. (b) There exists a feasible flow configuration but not a feasible tension configuration. In this case, the objective function @(G) of Problem I is unbounded downwards on I. (c) There exists a feasible tension configuration but not a feasible flow configuration. I n this case, the objective function "'(1)of Problem I1 is unbounded downwards on J. (d) There exists neither a feasible flow configuration nor a feasible tension configuration. 16. GENERAL PROPERTIES OF SOLUTIONS
The definition of a network-flow problem was given in the preceding section, and the practical algorithm to obtain the solutions will be dealt with in the following chapter. In this section, the general properties of the solutions as well as the conditions for the existence of a solution are investigated. 16.1. Convexity The solutions of Problem I form a closed convex set S, in V(R, d), and those of Problem I1 a closed convex set S,, in V(R, d),as is evident from Theorem 6.1 (Chapter 11, $6). The set of solutions of Problem 111, i.e., S,,I,is also closed and convex in V(R, 23) x V(R, 23) due to (15.32). 16.2. Uniqueness The following Theorem 16.1, although it is rather trivial itself, is useful and powerful for the investigation of the approximation and uniqueness problems.
e,
Theorem 16.1. Let 9 be a solution of Problem 111 for a network N ( 8 ;C,, . . . , Cn).Then, it is also a solution of Problem 111 for any network N ( 8 ; C,', . . . ,C,') which has the same topological structure 8 as the original network but which has different branch characteristics Ci', .. . , C,' such that
(p,9,) E c,'
for every K.
(16.1)
From Theorem 16.1 follows the important uniqueness theorem.
102
IV. Network-Flow Problems in General
Theorem 16.2 (uniqueness theorem). Let
(5,q) and (g, q) be two solu1
2
1
2
tions of Problem I l l for a network N ( 6 ;C,, . . . ,C,,).Then, for each branch b, , either 4" = 5" or qk = 7". Consequently, if there is a cotree on 6, the 1
2
1
2
characteristic curves of whose branches have no horizontal segment, then the solution of Problem I is unique; similarly, if there is a tree on 8, the characteristic curves of whose branches have no vertical segment, then the solution of Problem 11 is unique. PROOF. Since S,,, is convex (25 + (1 - A)G, l q 2
1
+ ( 1 - l ) q ) is also a
1
2
solution of Problem 111 for an arbitrary l between 0 and I . Therefore, for an arbitrary 2 between 0 and I ,
(At" + (1 I
- AX", 2
h, + (1
- 4q,) E
1
2
c,
for ii = I , . . . , / I .This means that each curve C, must contain a straight line segment connecting (th,q K )and q K ) .However, by virtue of Theorem I
(c", 2
1
2
16.I , both (5,q) and (5,q) remain to be solutions of Problem I11 if we replace 1
2 2
1
C, by C,' such that both (tK, qK) and 1
and 1 1 > ~ q K for some 7 -
ii,
1
(c", q,) 2
are on C,'. If we had
2
5" > 5" 2
1
then we could choose, in many ways, a C,' such
1.
that it satisfies properties (i)-(iii) in $5.2 but that it is not straight between (t",qy) and (t",qK). Hence, we should have 5'' = tKor q, = qK (cf. Fig. 1
1
2
2
1
2
1
2
16.1). The remaining part of the theorem follows from Theorem 9.9 (Chapter 111, $9.4). Q.E.D.
Fig. 16.1. Proof of the uniqueness of solution.
103
16. General Properties of Solutions
16.3. Nonamplification and Reciprocity
We shall investigate the counterparts, in network-flow problems, of the nonamplification and reciprocity properties in linear resistor networks treated in Appendix 3. As we shall see, the nonamplification is related to the monotonicity of the characteristic curves of branches and the reciprocity to their smoothness. Let us begin with the nonamplification properties. We suppose that branch b, is a current source of value cK and that the value of the flow in = 1 or IC # 1) is ta.Our problem is to investigate the variation branch b, (IC in 5, as cK varies, with all the other branch characteristics fixed. We have also a dual problem. Since we cannot expect in general the uniqueness of the solution in the strict sense (cf. Theorem 16.2), we have to content ourselves with Theorem 16.3 (nonamplijkation theorem). Suppose that Problem I for a network Nl E N ( 6 ; C l , . . . , C,,, . .., C,) has a solution 6 where branch b,, is a current source of value cXo. Then, if Problem I for the . . . , C,) has a solution (where branch network N 2 = N ( 6 ; C1,. .., b,, is a current source of value cK0f AcKo, all the other branches having the same characteristics as the corresponding ones in the original network), it has a solution 5 A6 such that
e,,,
+
1At"I I IAcK0I
for every K.
(1 6.2)
Dually, jf Problem I1 for a network N ( 6 ; C,,..., C,,, ..., C,) has a solution where branch b,, is a voltage source of value e,, and if Problem I1 for the network N ( 6 ;C1,. . ., C,,, . . ., C,) has a solution (where branch b, is a voltage source of value e,, &a,, all the other branches having the same characteristics as the corresponding ones in the original network), then Problem I1 for the latter network has a solution q Aq such that
+
+
for every 1.
1Aqa1 I IAe,,l
(16.3)
PROOF. We give a proof to the first half of the theorem. The latter half will be proved in the dual manner. Let 5 = 6 be a solution of Problem I for 1
the original network and 6 be one for the modified network, and let q and q 2
1
2
be the corresponding solutions of Problem I1 (cf. Theorem 15.3). For each IC ( # K,,), we denote by C,' the straight line passing the two points (t",q,) and
(t",q,) 2
2
1
1
if they are different points, or the vertical straight line passing
104
IV. Network-Flow Problems in General
(t”,q,) if they coincide with each other. Then we consider the networks 1
1
Nl’= N ( 6 ;Cl’, . . . , C:o-l, C,,, C:,,,, . . . , C,’) and N 2 ’= N ( 6 ;C1‘, ..., C:o-l, C,,, C:o+l, . . . , C,’), where C,, and C,, are the characteristic curves of the current sources of values cK0and cK0+ AcK0,respectively. As is obvious from Theorem 16.1, 6 and 6 are solutions for Nl’ and N2’, 2
1
respectively, with tKo = cK0and 5““ = cK0+ AcK0.In considering the equa2
1
tions to be satisfied by A6 = 6 - 6 and Aq = q - q, we may assume that 2
1
2
1
none of C,”s (K # K ~ are ) vertical, since we may open-circuit in advance those branches with vertical straight-line characteristic curves if such exist. A6 is a loop (since both 6 and 6 are loops), Aq is a cutset (since bothq andq 1
1
2
2
are cutsets), and, for every K ( # K,,),
4, = r,A5r, where rKis the slope of C,’. Thus, the equations to be satisfied by the A r ’ s and AV,’S are those of a linear resistor network, say N 3(cf. Appendix 3), where b,, is regarded as the only current source of value AcK0,and the other branches are regarded as linear resistors (if r, > 0) or as voltage sources of value 0 (if r, = 0). If the set of branches with r, = 0 is loop-free, then, by Appendix 3, we can conclude that
1Ar1 I IAcK0I
for all
K.
If it is not loop-free, we proceed as follows. We classify the elementary closed paths consisting of branches with null resistances into two classes (cf. Fig. 16.2): (a) The incremental flows AtKaround one of such closed paths are in the same direction (i.e., either the A r ’ s in the branches lying in the positive direction in the closed path are positive, whereas those in the branches lying in the negative direction are negative, or the AtK’sin the branches lying
(4
(b)
Fig. 16.2. Elimination of a null-resistance closed path.
105
16. General Properties of Solutions
in the positive direction are negative, whereas those in the branches lying in the negative direction are positive). Since r, = 0 means q, = q , , the part 2
between
1
(r,q,) and (r,q,) is a horizontal straight-line segment of C, 1
2
1
2
as well as of C,'. Let us denote the elementary loop corresponding to the elementary closed path by p, and set (16.4)
where (16.5)
and the positive or negative sign is adopted in (16.4) according as the nonnull p K AtK's(which are of the same sign by assumption) are negative or in the branches not conpositive. Then the t'"s are the same as the
r's
2
2
tained in the closed path, whereas, in each of the branches in the closed path, t'" lies between t" and 5". Hence, (t'",q,) is on C, as well as on C,' 2
for every IC ( # K
2
1
~ and )
(IKo
2
=
t
+
2
2
= cK0 AcK0,so that
2
(S', q) is also a solu2
2
tion of Problem 111 for Jtr2 as well as for N2'. Moreover, in at least one of the branches in the closed path, we have
Therefore, if we take
6' for 6 , the corresponding linear resistor network 2
2
N 3 will have fewer elementary closed paths of the kind now in question. In this way, we can obtain a solution 6 of Problem I for N2such that the 2
corresponding linear resistor network N 3 has no elementary closed path that consists of branches with null resistances and around which the incremental flows A F are directed in the same direction. Thus, we have only to consider the following case (b).
Ar
around each of the elementary closed (b) The incremental flows paths consisting of branches with null resistances are not all in the same direction. Let us take up one of such closed paths and suppose that branch bAocarries the incremental flow AtAoof the maximum absolute value around the closed path. Denoting by p the corresponding elementary loop, we set (16.6) AS' = AS f (A~")P, where the plus or minus sign is taken in (16.6) according as pAO= - 1 or
106
IV. Network-Flow Problems in General
pAO= 1. Obviously, A t ‘ is a loop, and (At‘, Aq) is also a solution for the
linear resistor network N 3 .[Note that
(6 f (AtAo)p, q) is a solution for 2
2
N 2 but ’ is not necessarily a solution for A’, .] Since At’“ = A t “ in a branch b, not belonging to the closed path now in question and since there is, by assumption, a branch, say b, belonging to the closed path such that
1At’”l = 1AC”l
+ IA 0, = d,t
for
=O
for
t < 0, t = 0.
(1 6.15)
Furthermore, we write, for an arbitrary vector 6 [E X (R)] and an arbitrary vector q [E Y(R)], -
Y'(11)=
c
bxeB
V(V,),
W)=
c
b,ES
cp'dr").
(16.16)
109
16. General Properties of Solutions
It should be noted that 3" (or qK)may be regarded as one of the convex where functions associated (in the sense defined in $5.2) with C, (or cK), E , is the curve that consists of the horizontal segment coinciding with the axis on I" and of the vertical segments with abscissas b" and cK,and C is the curve that consists of the vertical segment coinciding with the r] axis on J, and of the horizontal segments with ordinates d, and eK(cf. Fig. 16.4). is then The other convex function @, (or p)associated with C, (or defined on I" (or J,) and has the value 0 everywhere on the domain.
c,)
5"
-c
(b)
(a)
Fig. 16.4. Modification of C, to
cKor
Theorem 16.5. A necessary and sufficient condition for the existence of a feasible flow configuration on a network N ( 6 ;C,, . .. , C,) is that -
'y(q) 2 0
(16.17)
for any cutset q [E Y(R)] in the domain of T.A necessary and sufficient condition for the existence of a feasible tension configuration is that (16.18) for any loop 6 [E X(R)] in the domain of 5. [Here, we shall regard (16.17) or (16.18) as being satisfied byanq or6 not in the domain of T or 5.1Moreover, a feasible configuration exists if (16.17) or (16.18) holds for every elementary cutset q or every elementary loop 6.
PROOF. We shall give a proof for a feasible flow configuration. Consider the network M ( 6 ; C,, . . . C,). It has evidently a feasible tension configuration, i.e., one in which the tension across every branch is y
IV. Network-Flow Problems in General
110
equal to 0, so that, by virtue of Theorem 15.5, a feasible flow configuration exists if and only if v(q)has a lower bound on its domain. Moreover, M ( 6 ; C,, . . . , C,) has a feasible flow configuration if and only if .,Y((C,; . . . , C,) has one, since C, and have the same I" in common. Since @,(t;) = 0 (( E l K )we , have
el,
e,
'(6)
(PK(5")
b, E S
=O
if a feasible flow configuration 5 exists. Hence, we must choose 0 as a lower bound of T(q),which proves (16.17) (Theorem 15. I). What remains to be proved is that, if (16.17) holds for every elementary cutset, then it holds for every cutset. To do this, we make use of the equisignum decomposition in Appendix 2. An arbitrary cutset q is decomposed into an equisignum sum: q = Y I q + Y z 9 + .. I
(16.19)
. 7
2
where y i > 0, the q's are elementary cutsets, and q 3 q. Since i
i
y], i
is either
null or has the same sign as q K , we have
so that we have (16.20)
Thus, we have proved that if (16.17) holds for every elementary cutset then Q.E.D. it holds for every cutset. 17. TWO-TERMINAL CHARACTERISTIC
I n $13.3, we investigated how the characteristic of a composite branch is related to the characteristics of component branches in the case that the composite branch is a series-parallel connection of component branches. I n this section, we shall consider the same problem for the general connections of branches. As is illustrated in Fig. 17.1, we consider a network with n - 1 branches, calling two specified nodes entrance and exit, respectively. At the entrance and the exit, and there only, flows can go into and out of the network from/to the outside. Our concern is the relation of the tension (i.e., potential difference) between the entrance and the exit to the flow from the outside. In order to investigate the relation, it is convenient to introduce an extra
111
17. Two-Terminal Characteristic
I
Internal branches b,, . . . , bn
I
I
---f
Reference branch b,
Fig. 17.1. Two-terminal network.
branch (to be named b,) that connects the exit node directly to the entrance. The extra branch will be called the reference branch and the other branches the internal branches. The characteristic of the “composite branch,” which is composed of the internal branches and which has the entrance and the exit as its two endnodes, can be measured by taking various kinds of branches as the reference branch, e.g., by taking a voltage or current source and changing its value parametrically. A network of this kind will be called a two-terminal network and be denoted, e.g., by N ( 6 ;ref., C , , . . . , C,), where 8 is the graph containing the reference branch as well as the internal branches, the CK’sare the characteristics of the internal branches, and “ ref.” means that the first branch is the reference branch, i.e., that its two endnodes are the entrance and the exit. Let us denote by 5 the total flow that enters the entrance, passes the internal branches, and goes out of the exit, and by q the difference of the potential at the exit from that at the entrance. 5 and v are regarded as the flow in and the tension across the composite branch, respectively. Then, the flow in the reference branch is equal to that in the composite branch, and the tension across the former branch is equal to the negative of that across the latter:
5=t’,
v=-q1.
(17.1)
Our problem is to obtain the set C of (5, q)’s, i.e., ( 6 5 6 min
K=2
q,=-1
n
(17.5)
x=2
n
I], bK such that
=
,= 1
ql = 1 or - 1. (Note that there are a finite number of such cutsets.) (17.5) gives a necessary and sufficient condition for the 5 to belong to I. Therefore, the projection Z is a closed interval. Similarly, the projection J of C to the q axis is also a closed interval. Thus, we have
Theorem 27.2. The two-terminal characteristic of a two-terminal network of an arbitrary structure possesses all the properties (i), (ii), (iii) (in $5.2) which a branch characteristic should have. We shall postpone the development of practical algorithms for obtaining the two-terminal characteristics until Chapter V, and study a macroscopic relation between the tension and the flow of a two-terminal network such as follows.
Theorem 27.2. Let C be the two-terminal characteristic of a twoterminal network N ( 0 ;ref., C,, . . . , C,), let ((, ?) and ((, ?) be any two points on C, let the (t”,qK)’s and 1
the C,’s
( K = 2,
1
(t”,q,)’s 2
1 1
2 2
be the corresponding points on
2
...,n) [i.e., let (6,q) and (5,q) be the corresponding 1
1
2
2
114
IV. Network-Flow Problems in General
+ c {"b, n
6 = tb,
solutions of Problem 111, where
i
i
and q = -qbl i
~ = 2 i
i
+
n
1I], b,,, ~
let 43 and $ be the convex functions associated with C,
= i2
and, finally, let the q K ' s and $,'s be those associated with the CK's ( K = 2, ..., n). Then, we have
(17.6)
n
n
PROOF. We shall prove only the first equation, since the second can be proved similarly. First of all, we note that the right-hand side (of the first equation) of (1 7.6) does not depend on the choice of (t",I]")'s and (t",11")'s. 1
2
1
2
In fact, if we take as the reference branch a current source of value 5 i
( i = 1 or 2), then we have cp,(t) = 0, so that we have i n
(17.7) which, being the minimum value, is evidently independent of the choice of We have to prove that
(t",11,)'s. i
i
(17.8)
where the integrals are taken along the C and C,'s, respectively (cf. Remark 5.3 in $5.2). Since we may assume, without loss in generality, that 5 > 5, 2
we can choose, for an arbitrary positive number (5, ij), . . ., i j ) on C such that 0
(e,
E,
1
a sequence of points
N N
0
t = f g t s . * . s f s[=t,
At=
~ = i i s i j s . * N*ii- 1s s iNj = q2 ,
Aij= i j - i j < ~ .
1
1
0
0
N-1
1
1
N
2
i
i
5
i+l
i+l
-(<E, i
(17.9) i
The corresponding values F" of the flows in the internal branches as well as i
those ijK's of the tensions may not be monotone. However, as will be seen i
if we take as the reference branch a current source (voltage source) and
115
17. Two-Terminal Characteristic
change its value successively from
t to Nt ( iOj to Nij), we can choose them in 0
such a way that
- FI 5 A t ,
1AFI = I i
i+l
i
IAij,I
i
=
1 i j - ij,l
i
Aij
i
i+l
(17.10)
i
(cf. Theorem 16.3). Obviously, we have (17.1 1)
(cf. Fig. 17.2), and, similarly,
5 IAijKl 1AF1
E
*
i
At.
i
(17.12)
i
C
Fig. 17.2. Proof of (17.11). n
Furthermore, since the tensionconfigurationq i
difference of flow configurations Ag i
i
= Atb, + i
i.e.,
5 E At i
+ ( n - 1 ) A~t = ne A t , i
+ K = Z ij, b,
E - ijbl
i
i
and the
c A F b , are orthogonal, n
K=Z
i
116
IV. Network-Flow Problems in General
and, hence,
Since, in (17.13), n and
2
t are fixed, whereas E is arbitrary, we are led 1
to (17.8).
Q.E.D.
Theorem 17.2 affords means to calculate the increment of the sum of the cp,(t")'s of the internal branches by means of the two-terminal characteristic without knowing the flow configurations of the internal branches. 18. PROBLEMS OF APPROXIMATION
Practical algorithms for solution of network-flow problems are well developed, especially in the case where all the branch characteristics are step-functions (and, sometimes, piecewise linear functions). Therefore, we often have to solve a problem with general branch characteristics by approximating these characteristic curves by means of simpler curves. Or, it will often be the case that we are unable to know the exact forms of the cp,, functions or the C, curves when we formulate problems of the actual world in mathematical terms. In any case, it is important to investigate the manner of dependence of the solution upon the variations in branch characteristics. There are two ways to express the degree of approximation when a feasible configuration 6 (or q) does not necessarily coincide with an optimal (or lq, - f),I); the one f (or 4). One is to measure the differences 15" [or ul(q)] from a({) [or Y(fi)]. other is to estimate the difference of @(t) We begin with the latter, which is easier. $K
eKI
Theorem 18.1. Let 6 be a feasible flow configuration, let q be a feasible tension configuration, and let (f,4) be a solution of Problem 111, respectively, for a network M ( 6 ; C,, . . . , C,,). Furthermore, let cK denote the area enclosed by the characteristic curve C, of branch b, , the horizontal and the vertical straight line passing the point (t",q,) (cf. Fig. 18.1). Then we have n
c a".
1@(5) - @({>I+ IVq) - Y(4)I I
(18.1)
K = l
PROOF.
Since
@(k) - @(Q 2 0,
Y(q) - ~ ( f i 2 ) 0,
@(f)+ ~ ( 4 =) 0,
18. Problems of Approximation
117
Fig. 18.1. Definition of a x .
and
5 . 1 = 0, we have
C@W- @@I + CWS) - Wil)l - 5 - 1 = + V1) - 5 * 1 n
=
CVK(5")
K=
-k
$K(VK)
- 5"1K19
(18.2)
1
where each term in the brackets on the right-hand side of (18.2) is equal to Q.E.D. 0, [cf. $5.2, (5.46), and Fig. 5.21. Let (c, 4) be a solution of Problem 111 for N ( 6 ;C,, (c',4') be one for N ( 6 ;C1',.. . ,Cn').Then we have
Corollary 28.2.
.. . , C,) and let
where @ and Y are the objective functions for the former network, and (18.4)
(cf. Fig. 18.2).
Fig. 18.2. Definition of T
~ .
118
IV. Network-Flow Problems in General
Corollary 18.2. For a given branch characteristic C,, let C,' be a step-function approximating C, such that every point on C,' is at a distance, at most 6 horizontally and at most E vertically, from C, (cf. Fig. 18.3). Then the T,, defined in Corollary 18.1, does not exceed ES.
Fig. 18.3. Step-function approximation.
Theorem 18.1, as well as its corollaries, affords means to evaluate the difference of the value of the objective function for a nonoptimal feasible configuration from that for an optimal one. Next, we shall investigate methods of evaluating the difference of the value of the flow or tension in a branch corresponding to a nonoptimal configuration from that for an optimal one. Theorem 18.2. Let 6 and q be a feasible flow configuration and a feasible tension configuration of a network N o= N ( 6 ;C,, . . ., C,,),such that for each K , point (t",q,) is at a distance 6" horizontally and E, vertically from C,, i.e., that
6" = min
It'' -
5" E,
= min
[(g", q,)
E
C,], (18.5)
lVK
- i.1
C(5", ii,) E C,l.
rl"
Then there is a solution (&G) of Problem I11 such that, for each K,
(see Fig. 18.4).
PROOF. It suffices to give a proof for flows, since the proof for tensions is similar. We denote by CK'(6,)or C,'(-6") the curve obtained by the horizontal translation of C, by 6" to the right or to the left, respectively. Then either C,'(SK)or C,'( - 6') passes the point (F, q,). The modification
119
18. Problems of Approximation C,
Fig. 18.4. Horizontal and vertical distances from a point
(p,7.)
to C,.
of C, to C,'( 6,) corresponds to the attachment of a current source of value fa" in parallel with the branch b,. Furthermore, we denote by CK'(tK, q,) the curve which, satisfying properties (i), (ii), (iii) in $5.2, lies as near C, as possible (see Fig. 18.5), i.e., we set
{(t",
(t",
qK)l
f K )
' K ' ( q K
-
- VK) 2
qK)(qK
u {(F, qx)I3 (gK, VJE C K : ( t " - E")(e"- 8.)2 O>* (18-7) Set
5 = 5,
q =q,
6" =6"
1
1
1
and consider the network N l
C,,'( 0). Obviously, we should have
t1= r1 + 8 > p,
i+l
i
(20.10)
i
i.e., the total entrance-to-exit flow is increased by 8, and
6 satisfies all i+l
the capacity restrictions.
136
V. Linear Network-Flow Problems
Roughly speaking, the algorithm for attaining a maximum flow consists in repeating the foregoing process. In the process of determining 6 from
6, the
if1
most essential step is to find a conductive path P i from the
i
entrance to the exit. This problem is a kind of time-honored “labyrinth problem,” for which the following algorithm would be computationally most efficient.
Labyrinth Algorithm 1. To each node na we assign a pair of signed numbers (kA, , +pa). They are determined in accordance with the rules described below, and, at the final stage, pa (or Au) is the node number (or the branch number) of the node (or branch) adjacent to the node nu along a conductive path from the entrance to node n, so long as such a path exists. (i) Initialization: To begin with, we assign (+ 00, -0) to the entrance node n, and (+ co, co) to all the other nodes n, (a # s). (ii) We take up a node n, whose pa has the minus sign, convert the minus sign before the pa into the plus sign, and perform the following operations for each branch b, in 8+n, v 6-n,: (iia) If b, E 6+n, is conductive in the positive direction and if the pair (+ co, co) is assigned to the node no. = 8-b,, then we convert the pair for n,, into (+ K, -a); otherwise we do nothing. (iib) If b, E 6-n, is conductive in the negative direction and if the pair (+ 00, +co) is assigned to the node n,. E P b , , then we convert the pair for n,. into ( -IC, -a); otherwise we do nothing. (iii) We repeat (ii) until we cannot decrease any longer the number of nodes that have the pair (+ 00, co). If p, # 00 for the exit n t , there exists a conductive path P from the entrance n, to the exit n, . In fact, we put a,, = t and determine ai’s, ti's, and K ~ ’ Ssuccessively by
+
+
+
q + 1
=pa,,
Ei+lKi+l=+IZ-,i
( i = o , l ,...)
(20.11)
from the pairs of (+A,, +p,)’s thus obtained. Due to the manner of determining the pairs, we should have a, = s for some r. Then the sequence of nodes (n,s = n a r , na,-l, . .., nal , nao = n,) and the sequence of signed branches ( E , bKr, .. . ,c1 bKl)define a required conductive path P. If p, = 00, we assert the nonexistence of a required path. For, if one existed which had the node sequence (n, = na,, . .., nao = n,) and the branch sequence ( E , bKr,. . . , ElbKI), then we should have pa,+, # co and pa, = co for some i (in fact, pa, = 0 and /la,= a);then, because of the conductivity of the path, b,, should be conductive in the positive or negative direction
137
20. Maximum Flow
(according as ei = 1 or - 1); in such a case, however, operation (ii) could be performed to convert Bai into a finite number, i.e., into c ( ~ + ~ .
EXAMPLE.Let us solve the maximum-flow problem for the network of Fig. 20.4. We set
60 :
(51; 5 2 , 0
0
...,
56) 0
= (0; 0, 0,0, 0,O).
The residual capacities (which are the same as the capacities) are as tabulated in (20.12): K
%-b"
Cr-% 0
2
6
3 4 5 6
2
0
4 1
7
0 0 3 0 0
(20.12)
The process of searching for a conductive path Po according to Labyrinth Algorithm 1 is performed as shown in (20.13), where we rewrite all the pairs of (*Aa, &fia)'s [except for the pairs ( + m , +a)]each time an operation (ii) is performed and an arrow indicates the node for which we perform operation (ii) :
(20.13)
Since fP4 = - 2 # co,we have a conductive path P o , which is determined as follows: go
= t = 4,
a1 = p4 = 2, u2
= p2 = 1 = s,
Po: ( n s = n 1 , " 2 , n 4 = n , ) ,
EIKl
=
&A4 = + 5 ,
E2K2
=
&A2
(+b2,
=
+b,).
+2;
138
V. Linear Network-Flow Problems
The incremental flow is assigned to b, and b, along P o , whose amount is equal to
8 = min(c2 -
c2, c5 - r5) = min(6, 1) = 1.
0
0
Thus we have 5=5+A5=(1;1,0,0,1,0), 1
0
0
where At' = 8 = 1 is the increment of the total flow. 0
The residual capacities for
5 and
the process of searching for a con-
1
ductive path are shown in (20.14)-(20.16) : P-b"
cK-%
K
1
2
5 2 4
3 4 5 6
I
s=l s=l 2 3
= 4,
1 0 3 1 0
0
a
a0
1
(A, -+m (+a, -0)c +O) (+2, - l)+ (+3, -1)
(+a),
s=l 2 3
(+a,+O) (+2, + l ) (+3, -l)+
s=l 2 3 r=4
(+a,+O) (+2, +1) (+3, +1) (+6, -3)
a, = p4 = 3, a 2 = p 3 = 1 = s, p1:
(20.14)
(n1, n 3 , n4),
E
(20.15)
~
E~ K~
(+ b3,
= K
&A4 ~
=
+6,
= +A3 = +3;
+ b6).
(20.16)
20. Maximum Flow
139
The amount of the incremental flow to be assigned to b, and b, along PI is
8 = min(c3 -
c3, c6 - 5,) 1
= min(2, 7) = 2,
1
and we have
6 = 6 + A6= 2
1
(3; 1,2,0, 1,2).
1
Proceeding in a similar manner, we have the residual capacities (20.17) for 6 and a conductive path P2 shown in (20.19) by means of the labyrinth 2
search (20.18) : K
$-b"
c"-$ 2
2
5
3 4 5 6
0 4 0
5
2
1 2 3 1 2
(20.17)
(20.18)
140
V. Linear Network-Flow Problems
The incremental flow is assigned to b, , - b, , b, , whose amount is 6 = min(c2 - t2,t4 - b4, c6 - 5,) 2
so that we have
E,
= E,
3
2
= min(5,3,
5) = 3,
2
2
+ A& = ( 6 ; 4,2, -3,
1, 5).
2
The residual capacities for
5 is as shown in (20.20) and the labyrinth 3
search algorithm proceeds as shown in (20.21): K
c"-% 3
2 3 4 5 6
5"-b" 3
4 2 0
2 0
7 0
1
2
5
(20.20)
(20.21)
Since we have j?, = p4 = co (not explicitly shown) in (20.21), we assert that there is no conductive path, so that E, gives the maximum total entrance-to3
exit flow t1 = 6. The cut of the minimum value consists of the branches that 3
connect node n, or n2 with finite j?, to n3 or n4 with infinite 8,. We have two things to prove. We must first show that the flow configuration obtained by means of the foregoing algorithm indeed gives the maximum value of the total entrance-to-exit flow, and second, we must prove that we never fail to attain a flow configuration giving the maximum total flow, or to know the possibility of the total flow becoming infinitely large, after afinite number of operations. Let us begin with the firstproblem. Let be a feasible flow configuration for which no conductive path can be found from the entrance to the exit, and suppose that there were If we another feasible flow configuration [ that had 5' greater than
p'.
141
20. Maximum Flow
t
consider the equisignum decomposition (see Appendix 2) of A6 = - f into minimal loops,
~6 =
- { = ~4
-+ ~6 -I-
1
then some Ays, say
At,
should have a positive At'. There exists an ele-
1
i
,
2
1
mentary loop of which the minimal loop A6 is a multiple. The branches 1
of the elementary closed path corresponding to the elementary loop, excepting the reference branch, form a path from the entrance to the exit. Since the AtK'shave the same sign for a fixed K and i
bKsgKgcK, b = 5
K < * K
- min(c@~a2 -pimi+ I > ,...,
p ~ a r
ca2b3
Y
Q.E.D.
Setting r = 3 in (20.27), we get
- min(cam, >
(20.28)
which sometimes might well be called the triangular inequality for terminalpair capacities. (20.27) for general r can readily be deduced from (20.28). The inequality (20.27) shows that we cannot in general construct a communication network whose terminal-pair capacities are arbitrarily given. In fact, it is known that (see Gomory and Hu [I], Ford and Fulkerson [l], and Berge and Ghouila-Houri [l]) in a symmetric network (i.e., a network in which cK = -b" for every K) with m 1 nodes, at most m out of all the m(m + 1)/2 terminal-pair capacities can have different values. This " triangular inequality " is concerned with the case where the reference branches form a closed path. For the case where the reference branches form a segregation, we have other kinds of inequalities.
+
Theorem 20.3. Let us consider a network JV in which branches b,,, . . ., bKPform a segregation such that r
- b,, +
c
i=2
b,,
(20.29)
is a cutset and of which the branches other than b,, , . . ., bKPare provided with the characteristics of the kind shown in Fig. 20.1 (see Fig. 20.11). Let .Mi be the two-terminal network derived from JV by short-circuiting bK1, .. ., b,,-, , bKi+ .. ., bKr, with b,, as the reference branch, and let
Fig. 20.11. Reference branches forming a segregation.
152
V. Linear Network-Flow Problems
p ibe the value of the maximum flow through N i (see Fig. 20.12). Then we have
c
f"'5
(20.30)
fKi.
i=2
PROOF. Let
- bK; +
.cd i K
(20.31)
bK
K
be the elementary cutset corresponding to the segregation consisting of
(a)
(b)
Fig. 20.12. Illustration of a triangular inequality.
bKi and the cut of the minimum value in the two-terminal network Xi (cf. 520.2). Then we have
f
Ki
=
c 3i"(di,).
(20.32)
K
The sum of the cutset of (20.29) and those of (20.31) with i = 2, (regarded as cutsets in N ) , i.e.,
.. . r ,
(20.33) is also a cutset, in .Af (which may be regarded also as a cutset in .MI), the segregation corresponding to which contains b, in the negative direction, so that the internal branches of the segregation form a cut in N,which is not necessarily of minimum value. [Note here that the diK's in (20.31) vanish for K = K ~ .,. . , K , .] Hence we have (20.34)
2Q. Maximum Flow
153
Since p(q)is convex and linear for the q's of the same sign, we have, for arbitrary q and q',
P(?+ r'>= PC4(2r + 2491 5 %CV(21)+ V(2q')I = Pol)+ V(r').
(20.35)
From (20.34) and (20.35), it follows that
The special case (r = 3) of (20.30), i.e., f"'
f"' + f K 3 ,
is of the same form as the ordinary triangular inequality. It will be made clear in 521.4 that it is in fact the "dual" of the ordinary triangular inequality for distances. 20.5. Applications
Besides the obvious applications, such as the problem of planning the transportation of as much commodity as possible through a network of roads with limited transportation capacities or of sending as much information as possible through a network of data-communication channels with limited information transmission rates, there are a great variety of applications of the maximum-flow problem. This section is devoted to the review of those applications. RELATIONS 20.5.1. SUPPLY-DEMAND
This problem concerns a kind of multiterminal network. The network JV with which we are concerned consists of branches provided with the characteristics of the kind somewhat more special than that in Fig. 20.1, i.e., in which the amount of flow is restricted by 05
ly
5 CK,
(20.36)
with given cK's.(It is not very difficult, however, to extend the following arguments to the case where the lower bound for 5" is 6" instead of 0.) Among the set of nodes % of JV we specify two mutually disjoint subsets asand S t ,calling their elements entrances and exits, respectively. Through a node na of %, a flow xa goes from the outside of N into N , through a
154
V. Linear Network-Flow Problems
node n, of %, a flow y" goes to the outside of N , and at every node of % - (YlS u %J no flow goes in or out between N and its outside. We further require xa's and ya's to satisfy 0 5 sa 5 xu 5 sla
(n,
E 'ills),
5fa
(n,
E %J,
0 5 t a 5 y"
(20.37)
where the sa, s'", t', and t" terms are given quantities. Our problem, called a supply-demand problem, is to find a set of conditions under which there exists a flow configuration in JV satisfying (20.36) and (20.37). This problem has an obvious application where we regard N as a transportation as the network with routes of limited capacities (20.36), a node of location of a producer of a commodity, a node of %, as the location of a consumer, and [s", s'"] and [t", t'"] as the desired ranges of production and consumption of the respective producers and consumers. The above problem can easily be reduced to the standard form we have so far investigated as follows (cf. Fig. 20.13). We prepare new branches,
(a)
(h)
Fig. 20.13. Supplydemand network.
one corresponding to each of the nodes of 8, u %,, and a new node n o , in addition to those already existing i n N , and connect the branch correbetween the nu and the new node no sponding to a node n, of XS(or a,) in the direction from no to na (or nmto no), providing the new branches with the characteristics of (20.37) where the x"'s (or y " ' ~ are ) regarded as the flows in the new branches. We shall denote the network thus obtained by calling the new branches and the new node the additional branches and the ndditiotml node, whereas we shall call those of JV the intrinsic braticlies and the intrinsic nodes. The supply-demand problem of N is
J,
155
20. Maximum Flow
evidently equivalent to the existence problem of a feasible flow configuration of j. Here we note a relation (20.38)
y.
which holds for any flow configuration on Now we shall investigate what results are obtained if we apply Theorem 16.5 in $16.4 to $. Let q be an elementary cuset on 2.If car q contains no additional branches, we have always
-
Wq)
e 0,
since, for an intrinsic branch,
V($e 0 because
V(v])= cKil 2 0
if
v]
20
and
J;"(v]) = bKv] = 0 if
v]
5 0.
If car q contains additional branches, we consider the dissection into two subsets of the node set % u {no} of 2 corresponding to q (cf. $9.1), denoting the dissection of % u {no} by u {no}, %,) or (!R1, %, u {no}) according as to which of the two subsets the additional node no belongs. Let us further introduce the notation T(YIl,%,) to denote the sum of the cK's of the intrinsic branches which start from a node of 8,and end at a node of %, and s ( ' W , s'('%), s(a2), s'(%,), W,),Wl),t W 2 ) , f'(%,) to denote the sum of sa, s'", fa, t" of the additional branches corresponding to the nodes of %, n %,, %, n %, %* n Sl, 92,n %, respectively. All these quantities are nonnegative by definition. As is seen from Fig. 20.14, in case q dissects % u {no} into (Sl,8,u {no}), we have
-
Wq) = TWl, a,)- s W 1 )
+ t'(%l).
(20.39)
Similarly, in case the dissection is (91, u {no}, %,), we have
-
wl)= T(%,
%2)
+ s'(W - @2).
(20.40)
Thus we have Theorem 20.4. For the require'ments (20.37) of supplies and demands to be satisfied by the network JV with branches of capacities cK, it is necessary and sufficient that for any dissection (sl,%,) of the set of nodes
156
V. Linear Network-Flow Problems
Fig. 20.14. Supply-demand theorem.
91 of A?, the relations
hold. The necessity of the conditions (20.41) might intuitively be evident, since the first inequality states that .N should have at least the capability of transporting the excess of the lower bound of the total amount s(Yt,) of commodity produced in 'illl over the upper bound of the total amount t'(%,) consumed in %,, and similarly for the second inequality. What interests us is the fact that the conditions are sufficient. It is worth noting that, if we set
sa = 0
for all
n,E
%,s,
t" = 00
for all nu E 'illr, (20.42)
then the first inequality of (20.41) holds identically so that only the second is necessary and sufficient, whereas, if we set stu = co
for all
na E !TIs,
la = O
for all n u € gr, (20.43)
then the second one holds identically so that only the first is necessary and sufficient. Therefore, we see that the original problem may be decomposed into two problems (20.42), (20.43) of more special kinds.
20. Maximum Flow
157
Two examples from among the many problems that can be formulated as supply-demand problems will be shown in the following. The first is the so-called " boys-and-girls problem." Suppose that there are a number of boys and the same number of girls among whom the relations of friendship are defined, i.e., any couple of a boy and a girl are, by definition, either friends or not. The problem is to examine whether or not it is possible to establish a partnership in such a way that each of the boys and girls may participate simultaneously in dancing with one of his or her friends. The network representing this problem may have the following structure (see Fig. 20.15). It has one node corresponding to each boy and one node to each girl, the nodes of the former forming the set asand :ndr
Fig. 20.15. Boys-and-girlsproblem.
those of the latter a,, and it has no node other than = asu %,. It has a branch with capacity c" equal to 1 connecting a node of asto a node of a, if and only if the boy corresponding to the former node and the girl corresponding to the latter node are friends. (More generally, the following arguments will not be affected even if we take as the capacities of branches an arbitrary value greater than or equal to I .) Furthermore, the 8''s and the S'"S of n, E as are all put equal to 1, and so are all the t "s and the r '"s of na E %,. The network thus defined admits an integer solution if it admits a solution at all (cf. Remark 20.7 in §20.3.1), where it is noted that in an integer solution, the amount of flow in a branch is equal to either 0 or 1, since it should lie between 0 and 1 (= cK). (If we put C" > 1, then we have to derive this fact from the condition that the sum of the flows in the branches incident to a node of as[or a,] should be equal to 1 .) We may thus conclude that a branch has a unit flow if the boy and the girl corresponding to its two endnodes are combined to form a couple, and that it has a null
158
V. Linear Network-Flow Problems
flow if they are not. I n this way, the problem is reduced to a supply-demand problem, which can be solved by means of the algorithm in 920.3.2. Since the intrinsic branches in the network representing this problem have nonnegative capacities and the additional branches are mere current sources (s’ = s” = 1, t’ = t’‘ = I), the transformation shown in Fig. 20.10 is highly simplified. I t can readily be shown that if each boy has in girl friends and each girl has 111 boy friends, then the problem has a solution, i.e., all the n boys and the 17 girls can participate simultaneously in dancing. In fact, we have an obvious noninteger solution for the corresponding network problem in which every intrinsic branch carries I/nz unit of flow, so that the problem has an integer solution (cf. Remark 20.7). As the second example, we take up the famous theorem by G. Birkhoff and J. von Neumann:
J?
A doirbly stochastic matrix cat? be expressed as a itveighted mean of pertnutation matrices,
where by a doubly stochastic matrix of order n we mean a matrix P = (pup) (a, P = 1, . . . , n) such that (20.44) and by a permutation matrix we mean a doubly stochastic matrix whose elements are 0 s and 1’s. To prove this theorem, we consider a solution of the boys-and-girls problem where the ath boy and the Pth girl are friends if and only ifp,, > 0 in the given doubly stochastic matrix P. The solution, if it exists, may be expressed by a permutation matrix Q = (quo),where qup= I if the ccth boy and the Pth girl are combined to form a couple and equals zero otherwise. Except for the integrity of the qua elements, the conditions to be satisfied by such a Q are (20.44) and (20.45): 4,s > 0
only if Pup > 0,
(20.45)
and it is obvious that Q = P satisfies these conditions. Therefore, by virtue of Remark 20.7, we have an integer solution Q , i.e., a permutation matrix satisfying (20.45). Let puopobe the smallest among the pupelements of P for which qup > 0. Then, as is easily seen, we can set (20.46) P = ~ n ~ p+ ~(1 Q- P U , ~ ~ ) R , where R is doubly stochastic and has a smaller number of nonnull elements than P has. Continuing the similar decomposition for R,we can obtain the required expression of P.
159
20. Maximum Flow
20.5.2. THEORY OF MATCHING In this section, we shall deal with the combinatorial-mathematical problems connected with the names of Konig, EgervBry, Menger, Hall, et al. The typical problem of matching is formulated as follows. We consider two mutually disjoint sets '3, and '3, and a binary relation p defined between the elements of '3, and those of '3, (Le., p specifies a subset of 9Isx a,), and we need to choose as many pairs ( n a , ns) as possible such that n a p nfi,
"a€'%,
BE'^,,
and such that no element of '3, or '3, is chosen in more than one pair, where na p nB is read as " nu in relation of p to ns." In terms of a matrix, the problem may be stated as follows. Let P = (pus)be a matrix with rows corresponding to the elements of '3, and columns to those of W,, in which pas = 1 if nu p ns and equals zero otherwise. Then we require to choose as many nonnull elements (i.e., 1's) in such a way that from each row (and each column) at most one 1 is chosen. We shall call a set of pairs or 1's satisfying the foregoing requirement of choice an admissible or a matching set. Thus, our problem may be said to be that of obtaining a maximum admissible set. Like the supply-demand problem in the preceding subsection, the matching problem can also be formulated as a maximum-flow problem. The structure of the two-terminal network Jlr is as follows. In addition to the nodes corresponding to the elements of Wsu '3,, N has two nodes n, and n , playing the roles of the entrance and the exit, respectively. JV has a branch connecting n, to each node of '3, (with unit capacity in the positive direction and null capacity in the negative direction), a branch connecting each node of '3, to n , (with unit capacity in the positive direction and null capacity in the negative direction), and a branch connecting a node na of '3, to a node nB of '3*if na p nB (with infinite capacity in the positive direction and null capacity in the negative direction); and it has no other branches. We shall call the branches of the first and the second kind additional branches and those of the third kind intrinsic branches (see Fig. 20.16). The integer solution of the maximum-flow problem for JV corresponds to the solution of the matching problem in an obvious way where the intrinsic branch corresponding to a chosen pair ( n a , ns), or the chosen pap = 1 , carries the unit flow, and the total flow from n, to n , gives the maximum number of pairs of an admissible set.
160
V. Linear Network-Flow Problems
Fig. 20.16. Matching problem.
Let us now investigate what the maximum-flow minimum-cut theorem (Theorem 20.1, 420.2) will give in the present case. Since the value of the maximum flow through the two-terminal network JV now under consideration is evidently finite (in fact, it cannot exceed the cardinality of Ws or %,), we have to search for a minimum cut among the cuts of finite values. If a cut separating ns from nr dissects the node set % = asu 'illru {ns, n,} into W, and 8,(n, E %,, n, E W2) and if there is an intrinsic branch contained in the cut in the positive direction, i.e., one which starts from a node of W, n W, and ends at a node of W tn W2, then its value is infinite. Therefore, a minimum cut should contain no intrinsic branch in the positive direction, but it should consist of: (1) branches connecting ns to the nodes of 'S2n (contained in the positive direction), (2) branches connecting the nodes of W l n %, to n, (contained in the positive direction), and (3) branches connecting the nodes of %, n 9Is to those of W l n W t (contained in the negative direction),
where its value is equal to the sum of the numbers of the branches of the first and second groups (cf. Fig. 20.16). In order to express a cut of this kind, it is convenient to introduce the concept of covering set. A covering set Wc is by definition a subset of Wsu %, such that every intrinsic branch has an endnode in it, or, in terms of the original form of the matching problem, that if na p np , then either
161
20. Maximum Flow
n, E Wcor nB E Wc. In terms of the matrix representation, a covering set is a subset of rows and columns such that every 1 is on one of those rows and columns. We can establish the one-to-one correspondence between the covering sets and the cuts in N of finite values as follows. For a given cut associated with the dissection (al,W,), we set
W, = (92, n W,) u (Wln at).
(20.47)
Since the intrinsic branches connect the nodes of W, = (Wln 8,)u (W, n W,) to those of W t= (Wln W J u (Wzn 8J,whereas there is no intrinsic branch connecting Wl n W, to 8, n Wr,every intrinsic branch should have an endnode in (%, u %,) u (TIl n !TIt). Conversely, for a given covering set Sc, we set
8,= {ns} u (Wcn Wr)u (W,- W, n WJ, %, = In,> u
(’% n 8,) u (W,- 8,n W,
(20.48)
defining the cut associated with the dissection (Wl, WJ.Then we have
(8, n 8,) n Wc= (W, n %J n W, = 0.
(20.49)
There is no intrinsic branch connecting W ln W, to W 2 n !Rr, for, if one such branch existed, one of its endnodes would be in W,, in contradiction to (20.49). In the foregoing terminology, we can restate Theorem 20.1 for the present problem as follows. Theorem 20.5. In a matching problem, the number of pairs of a maximum admissible set is equal to the number of elements of a minimum covering set, where by a ‘‘maximum (or minimum) set” we mean a “set with the maximum (or minimum) number of elements.’’ A practical means to obtain a maximum set of pairs as well as a minimum covering set is afforded by applying the algorithms in $20.3.1 to a network of the kind illustrated in Fig. 20.16. The computations are naturally simplified due to the special network structure of the problem. It will be of use to expound the simplified form of the algorithm in terms of the matrix representation. (The reader should make detailed comparison of the following algorithm with the algorithm in $20.3.1. In the following algorithm, the intrinsic branches are treated as if they had unit capacity instead of infinite capacity, which, as will easily be seen, has no influence on the problem other than simplifying the algorithm.)
162
V. Linear Network-Flow Problems
Algorithm for a Matching Problem. To each row (corresponding to an element of a,) as well as t o each column (corresponding to an element of ’ill,), we assign a signed number +pa, and we encircle some 1’s of the matrix (which correspond to the intrinsic branches carrying unit flow). We start from the given matrix with none of its elements encircled, and then increase the number of encircled l’s, one by one, according to the following rules (i)-(iii): (i) Set f pa = -0 for every row nu having no encircled I , fPa = - 00 for every column nu having no encircled 1, and +Pa = co for all the other rows and columns. (ii) Repeat (iia) and (iib) alternately so long as it is possible. (iia) We take up a row nu whose pa has a minus sign, convert the minus sign before the pa into a plus sign; and, if there is an unencircled 1 in the row nn and if that 1 is in a column nu, with +pa. = -co, then we go on to (iii); if there is an unencircled 1 in the row nu and if that 1 is in a column nu, with +pa. = +co, then we convert the fp,. = +co into +pa, = - a , and we may try another row or go on to (iib). (iib) We take up a column nu whose pa (Zoo) has a minus sign, convert the minus sign before the /?, into a plus sign; and, if there is an encircled 1 in the column nu and if that 1 is in a row nap with +pa. = + co, then we convert the +pa. = +co into +pa. = -a. Then we may try another column or go on to (iia). (iii) Repeating the operations of (ii), we shall encounter the situation in which we either find a column with no encircled 1 [as it happens in (iia)], or we cannot decrease the number of the rows and columns with i-pa = + co any further. I n the latter case, the encircled 1’s form a maximum admissible set of pairs, and the rows with +pa = + co together with the columns with i-& # +co form a minimum covering set. In the former case, let the column finally attained be nao.Then we determine the sequence of rows nu,, n u , , . . . and columns nar, na4, . . . by
+
@i+l
=Psi
(20.50)
to arrive at Pa,,,,
=o
for a certain r. Due to rule (ii), the ( u 2 i + l ,uzi)elements of the matrix are unencircled 1’s ( i = 0, . . . , r ) , whereas the ( u 2 i - l , uZi) elements are encircled 1’s (i = 1, . . . , r). We encircle the former 1’s and remove the circles around the latter 1’s.
163
20. Maximum Flow
EXAMPLE.To find a maximum admissible set of l’s, as well as a rflinimum covering set of rows and columns, of the matrix (20.51), where we number the rows 1-3 and the columns 4-6:
Fl. 4 5 6
: 3
tc
*pa
1 -0
1 0 0
2 -0
4
3 -0
--a3
5
6
-a! - m .
(20.52)
(& = 0, r = 0).
(20.53)
-1
+O
a,, = 4,
(20.51)
a1 = p4 = 1
Thus the 1 to be encircled is the (1,4) element alone. The resulting matrix is shown in (20.54):
(20.54) 3
1 0 0
For the matrix of (20.54), we perform operations similar to the above, i.e., we determine the initial values of the f P a ’ s as shown in the second line of (20.55), modify them as shown in the third line, and then stop, to obtain
164
V. Linear Network-Flow Problems
the ai’s shown in (20.56) as well as the matrix of (20.57): a
+&
1
2
3
4
5
foo
-0
-0
+co
-co
+O
6
(20.55)
-00,
-2
4 5 6 @ I 0
(20.57)
0 0 1 1 0 0
For matrix (20.57), the initial values of the +pa’s are determined as in the second line of (20.58). Finding +p3 = -0 having a minus sign and an unencircled 1 in row 3 in column 4, we change +p3 and +p4 to + O and -3, respectively, as shown in the third line of (20.58). Then we find an encircled 1 in column 4 with +p4 = - 3 in row 1 to modify +p4 and +PI as shown in the fourth line. Repeating similar processes, we finally arrive at column 6 with + / j 6 = -- 00. The ai’s are determined as shown in (20.59), starting from a. = 6: a 1
1
2
3
4
5
6
+00
+co
-00
-3
I
-4
I
+4
+3
Y
(20.58)
-1
I
-5
I
+5
-2
Thus we add a circle to the (2, 6), (1, 5), and (3,4) elements of the matrix
20. Maximum Flow
165
of (20.57) and remove the circle from the (2, 5) and (1,4) elements to have (20.60): 4
5
6
I
I
1
1 0 0
2
0
1
0
.
(20.60)
The initial values of the &pa’s for the matrix (20.60) are as shown in (20.61), for which we can no longer perform any modification operations : 1
(20.61) Therefore, we have obtained a maximum admissible set of 1’s (those encircled) in (20.60). Gathering the rows with pa = GO and the columns with pa # GO, we obtain a minimum covering set, i.e., the set consisting of rows 1 , 2, and 3. Also famous is the following theorem in the theory of matching, where we make use of the notation 11?311 to denote the cardinality, i.e., the the subset of %, number of elements, of the set 9 , and we mean by r’(%’) consisting of those elements each of which is in relation of p with some element of a given subset %’ of SS,i.e.,
r“(W)
= {nB I nBE ‘91t,
3 na E W( s % ~na)p: np}.
(20.62)
Theorem 20.6. A matching problem has a solution in which all the elements of ‘91sappear in the chosen admissible set if and only if for every we have subset %’ of
II%’II 5 lP-+(WIl.
(20.63)
PROOF. The necessity of condition (20.63) is too obvious to require any explanation. For sufficiency, we have only to show that if some elements of ‘91sare not chosen, then there is a subset %‘ of 9lssuch that
Il%’II > llr+(~’)ll.
(20.64)
In fact, Theorem 20.5 assures the existence of a covering set ‘iRCsuch that
II%II < II%sll
(20.65)
166
V. Linear Network-Flow Problems
in such a case. If we set %‘ = 9Is - %, n
(20.66)
r+(%’) 5 aCn a,,
(20.67)
we have due to the definition of the covering set. From (20.66) follows the relation
Il%’II
=
II%ll - 11%
n WI,
(20.68)
and from (20.67),
IIr+(%’)II 5 II%c
(20.69)
n
Subtracting (20.69) from (20.68) and taking account of the identity %c
= (%c n
as) u
n
we have
IIa’II - IIr+(fi’)II L IIPII - ( I I m c n WI + IIytc n %II> = Il%sll - I I ~ U *
(20.70)
(20.70), combined with (20.65), yields the required inequality (20.64). Q.E.D. Theorem 20.5 can be extended in two ways, as follows, in regard to the underlying network structure. Let us consider a graph with arbitrary topological structure in which two mutually disjoint subsets, %, and of the set of nodes % are specified and each of whose branches is defined to be conductive in the positive or negative or both directions. A path from a node of asto one of S t is called, as before, a conductive path if every branch is conductive in the direction in which it is contained in the path. A set of such conductive paths is said to be branch-admissible if they have no branch in common, and node-admissible if they have no node in common. Then, the problem is to find a maximum branch- or node-admissible set of paths. The basic form of the matching problem, as we have treated so far, may be considered a special case of the problem of obtaining a maximum branch-admissible set (where the underlying graph is the entire graph of the kind shown in Fig. 20.16 consisting of intrinsic branches and of additional branches, and the subsets Yls and in the latter problem are taken as the single nodes ns and n, , respectively, in the former), or as a special case of the problem of obtaining a maximum node-admissible set (in which the underlying graph is that part of the graph of the kind shown in Fig. 20.16 which consists of intrinsic branches alone, and the ‘8, and in the former problem themselves are the and Srin the latter).
20. Maximum Flow
167
The problem of obtaining a maximum branch-admissible set as well as that of obtaining a maximum node-admissible set can be translated into a maximum-flow problem by means of the same technique used previously when we translated the supply-demand or matching problem into a maximum-flow problem. The prohibition of a common branch is accomplished by imposing the capacity restriction ojg"s1,
(20.71.1)
-ls("so,
(20.71.2)
-1Sg"Sl
(20.7 1.3)
or
on the flow g" in a branch b, which is conductive in the positive or negative or both directions, whereas the prohibition of a common node (note that this automatically implies the prohibition of a common branch) is accomplished by giving to each node the unit capacity (which in turn is realized by a suitable modification of the network structure such as illustrated in Fig. 20.3). The maximum-flow minimum-cut theorem, Theorem 20.1, when applied to such a network, yields the following theorems, the details of the proofs of which are left to the reader. Theorem 20.7. The number of paths of a maximum branch-admissible set is equal to the number of branches of a minimum branch-cut, where a branch-cut means such a set of branches that, if we open-circuit all of them, we can no longer find any conductive path from a node of !TIs to a node of !TIt. Theorem 20.8. The number of paths of a maximum node-admissible set is equal to the number of nodes of a minimum node-cut, where a node-cut means such a set of nodes that, if we open-circuit all the branches incident to them, we can find no conductive path from a node of !TIsto a node of !TIt.
The theory of matching has a large number of applications to combinatorial mathematics and we shall take up two, i.e., the systems of distinct representatives and the decomposition of a partially ordered set. The problem of the system of distinct representatives is stated as follows. We consider a finite set { E ~ E, ~ .., .} and a finite number of its subset {ol, 02,. . .}. An element of oimay be specified as the representative of the
168
V. Linear Network-Flow Problems
a,. The problem is to choose a representative for each subset such that the representatives thus chosen are mutually distinct. This problem can be reduced to a matching problem by putting !TIs= {a,},!TIt = {ci} and writing a,p c j if and only if e j belongs to ci,as will be obvious. For example, Theorem 20.6 may be restated as follows:
A necessary and sufficient condition for the existence of a system of distinct representatives is that the union of an arbitrary number of subsets aicontains at least as many distinct elements as that number.
The proposition given at the end of the descriptions of the boys-and-girls problem in $20.4.1 may be rephrased as follows: A set of distinct representatives exists if each of the subsets ai contains exactly m (>O) elements and each of the elements c i belongs to exactly m subsets.
The problem of distinct representatives has many variations which are easily translatable into network-flow problems. For the details of such variations, we suggest that the reader consult Ford and Fulkerson [l]. The second problem we shall deal with concerns the decomposition of a partially ordered set that was first treated by Dilworth. A partially ordered set 9l = {n,} is by definition a set provided with a relation (called a partial order) and satisfying
+
n,
+ n,
for every n, E 9l,
> n,,
if
n,+
n,
and
n,
if
n,+
n,
and
n,>
n,,,
(20.72.1)
then
n, = n,,
(20.72.2)
then
n,$
ny.
(20.72.3)
It will be noted that in the problem of project scheduling in 42 of Chapter I, the jobs form a partially ordered set with regard to their precedence relation. We construct a graph by regarding the elements of a given partially ordered set as the nodes of the graph and assuming the graph to have a branch from n, to n, if and only if n, > np (i.e., n, $ n, but n, # n,). The graph thus constructed is characterized by the property that it has no closed path in which every branch is contained in the positive direction. Conversely, we can construct a partially ordered set from a given graph having such a property. Usually we do not write explicitly those branches representing the order relation that follows from others by means of (20.72.3), i.e., we omit a branch from na to nB, if na $ n, and if there are
169
20. Maximum Flow
nu,, ..., n., such that the n a , nB, and nui'sare mutually distinct and such n., 3 nB. However, in the following exposition we that nor3 nu, 3 * shall take account also of such branches for the sake of convenience. (The results obviously remain valid, however, if those branches are omitted.) We call a sequence of r distinct elements (nu,, .. . , nu$ of a partially nu, a descending chain of length r. In ordered set such that nor, particular, we regard a single element as a descending chain of length 0. Here we pose the problem: Find the minimum number of mutually disjoint descending chains such that every element of % belongs to one of them. In the graphical terminology, a descending chain of length r is an elementary path of length r - 1 such that all its branches are contained in the positive direction, and the problem is to find the minimum number of such mutually disjoint paths covering all the nodes. In terms of the precedence relations among jobs in a project, the problem is to find the minimum number of workers necessary for completing the project, where we assume that a worker can do a sequence of jobs that forms a descending chain in the above sense. Let us use the graphical terminology in the further consideration. A descending chain of length r corresponds to a path of length r - 1 which contains r - 1 branches. Therefore, if a partially ordered set with n elements is decomposed into rn mutually disjoint chains, then the corresponding paths contain n - m branches in all. Hence, we may search for a set of paths (with the desired property) whose total number of branches is as large as possible. The subset of branches contained in a set of paths (with no common node) can be characterized as a subset wherein each node of the graph is positively incident to at most one of the branches of the subset and negatively incident to at most one of the branches of the subset. Thus, the problem is reduced to that of obtaining a subset of the kind having as many branches as possible. This problem is equivalent to the following matching problem, as is easily seen. We consider two replicas %+ and %- of the set of elements % of the given partially ordered set, denoting by nu+ or nu-, respectively, the elements of %+ or %- corresponding to the element na:of %. Between the elements of %+ and those of %-, we define the relation p such that
-+
+ + -
nu+ P "6-
0
.
if and only if nu 3 nB and
nu # nB.
Then, the problem now under consideration may be regarded as the and p ; i.e., we must obtain a maximum matching problem for %+, 8-, admissible set of pairs (naf, ns-). In fact, as is easily seen, an admissible
170
V. Linear Network-Flow Problems
set of pairs of %+ x %- corresponds to a set of mutually disjoint descending chains in %, and vice versa, if we make a pair ( n u + , n s - ) correspond to the branch connecting nu to ns . This reformulation of the problem allows us to apply Theorem 20.5. Let the maximum number of pairs or branches chosen in the foregoing be n - m o, i.e., let the minimum number of mutually disjoint chains be m, . Theorem 20.5 states that the number n - m, is equal to the number of elements of a minimum covering set which is a subset of %+ u %-. Obviously, Ilfncll 5 min(Il%+II, Il%-Il)
=
11%+II
=
11%-II
=
11%211
= n.
We denote by SUthe subset of % consisting of such elements of % that neither their correspondents in %+ nor their correspondents in %- belong to Sc. By virtue of the definition of a covering set, there is no pair ( n u + , n p - ) such that nu+ p n p - ,
nu+ E %+
-
nD- E %- -
aC.
Therefore, no two distinct elements of flu are comparable, i.e., if n u , np E flu and nu # n p , then we have neither n u + np
nor
np
>nu.
Let us consider a maximum subset '9Iv (of %) whose elements are mutually noncomparable. Obviously, we have
Il%ull 5 Il%ll 5 mo.
(20.73)
Next, in case n = 11%11 > 1 (the trivial case n = 1 may be excluded), let us consider the correspondence between % and %., For each nu E 91 - %", either nu+ or nu- belong to '3, due to the definition of g U . But it is impossible for both nu+ and nu- to belong to gC.[In fact, if nu+, nu- E %,-, then there is an element n y - E %- distinct from nu- such that nu+ p n y - ;for otherwise, all the elements of %- which are in relation of p to nu+ would belong to a,, which would mean that - { n u + } could be a covering set in contradiction to the assumption of the minimality of '3,. Similarly, if nu+, n,- E fl,, then there is an element n8+ E %+ - SC distinct from nu+ such that n d + p n u - . The elements n u , n y , nd of % corresponding to these nu', n y - , n d + then satisfy the relations nu+ny,
which imply nd
%>nu,
> n y or n d + p n y -
.
(20.74)
20. Maximum Flow
171
(20.74) contradicts the assumption that gCis a covering set.] Therefore, we have
11%
- %,I1
=
Il%cll = n - m,
or
Il%,l
=n
- (n - m,) = m,.
(20.75)
Combining (20.73) and (20.75), we have:
Theorem 20.9. The minimum number of mutually disjoint descending chains containing all the elements in a partially ordered set is equal to the number of elements of a maximum subset whose elements are mutually noncomparable. 20.5.3. APPLICATIONS TO GRAPH THEORY It sometimes happens that a purely graph-theoretic problem can better be treated by transformation into a network-flow problem. Theorems 20.7 and 20.8 are two such problems. We shall give another example. The problem is to find a subgraph sj of a given graph 6 (i.e., a graph sj obtained from 6 by open-circuiting some branches of 6)such that to each node na of 6, the number of the positively incident branches of sj lies between sa and s'" and the number of the negatively incident branches of fi lies between t" and f a ,where sa, s'", t", and t'" are given numbers. This problem can be reformulated into a supply-demand problem as follows. We shall make use of a technique analogous to that which we have resorted to in order to formulate the problem of decomposing a partially ordered set into descending chains. We consider a network Jf having the set of nodes %+ u %- where %+ and %- are two replicas of the set of nodes % of the given graph 6. We assume that Jf has the same set of branches 23 as 6 has (exactly speaking, the two sets are put in one-to-one correspondence) and that, if a+b, = n a , 8-b, = nB in 6, then a+b, = na+, 8-b, = nB- in N , where na+ is the correspondent in %+ of n, in % and nB- is the correspondent in %- of nB in %. Furthermore, each branch of N is provided with the unit capacity in the positive direction and the null capacity in the negative direction. If the %+ and %- are regarded as the set of entrances and exits and if sa, s'" and t", t" are regarded as the lower and the upper limits of the supplies at the entrances and the demands at the exits, then we have a supply-demand problem (cf. 820.5.1). The relation between this supply-demand problem and the subgraph problem now in question is as follows. If a subgraph fi of 6 satisfying the required conditions is known, then we can obtain a solution of the supply-demand
172
V. Linear Network-Flow Problems
problem by assigning the unit flow to each of the branches of N which correspond to the branches of fi. Conversely, if an integer solution of the supply-demand problem is known, then we can construct fi by opencircuiting those branches of 0, which correspond to the branches of N carrying null flow. In this way, the subgraph problem now in question can be reduced to a supply-demand problem. Let us consider in more detail the implications of Theorem 20.4 in this case. In regard to a dissection (!Ill, 9Iz) of %+ u %-, we shall make use of the abbreviations
= g1n %+, flz+ = %, n %+,
G %l
n %-,
flz-= ’illz n %-.
Due to the special structure of N , the quantities appearing in (20.41) may be interpreted in the present case as follows: -
“(fl,, f12)
= the
of
number of branches connecting the nodes + to those of
s(%,) = s(%, +),
s’(%z) = S ’ ( S Z + ) ,
t(fll) = t(fll-),
t’(%z) = t ’ @ - ) .
Hence, if we denote by aZ-)llthe number of branches in N conthen (20.41) becomes in the necting the nodes of 9Il+ to those of SZ-, present case :
Il(%l+, 11(%+,
2 e l + ) - t’(%-), h w 2 - ) - s‘(%+).
fl2-111
%z-)ll
Let us then consider the minimum value of . We have fixed
!R2-)ll
(20.76)
+ t’(%,-) with
+
ll(%+, ‘%)I1
+ t’(fl1-1
= nB-
2
1 ll(%l+, “/J->ll +nB- c t’B 1 min[II(%l+, ns-)ll, t B ] (20.77) ~911-
~g12-
“ 8 - E%-
np-)ll means the number of branches b, such that a+b, E 9Il+ where for a given fll+ such that and 8-b, = n p - . If we choose s 1 -
= {np-
I f P < Il(%+,
n/J-)ll>,
(20.78)
then (20.77) holds with the equality instead of the inequality sign. Therefore, the requirement that the first inequality of (20.76) should hold for an
173
20. Maximum Flow
arbitrary dissection (illl,a2) of '3' u 3-is equivalent to the requirement that 1 minCII(Wl +,np-)II, t"1 2 s(9tl + I , (20.79) na-sm-
should hold for an arbitrary subset 'illl+ of %+. (20.79) may be rewritten in terms of quantities in Q as (20.80) np)ll means the number of where Sois an arbitrary subset of % and branches b, of 6 such that d + b, E 'illo and d - b, = nD . Similarly, the requirement that the second inequality in (20.76) should hold for an arbitrary dissection ('illl, 9L2)of %+ u W - is seen to be equivalent to the requirement that C minCll(n,, %o)ll, 2 tp (20.81)
c
AT'"]
n p E%
n,E%
should hold for an arbitrary subset Soof % (in (t), where / [ ( n u ,%,)I] means the number of branches b, of 6 such that d + b, = nu and 8- b, E %o. Thus, we have seen that the validity of (20.80) and (20.81) for an arbitrary subset Wo ( & %) is necessary and sufficient for the existence of a subgraph Sj with the required property. [The reader should prove the necessity of (20.80) and (20.81) in a more direct way.] In case s" = s'"
and
for all a,
t" = t'"
(20.82)
the preceding conditions can be somewhat simplified. In this case, it is obviously necessary that
C s" = rips% C tp,
i.e.,
s(%+)
= t(%-).
(20.83)
n,sB
Since (20.82) and (20.83) imply $('ill1
+) - t ' ( % l - ) = s(%1 +) - t(%n, -) = {S(W+) = t(%,
-)
- s(W,')}
- { t ( K ) - I(%,-))
- s(9I2 +) = t(!R2-) - S'(%,J,
it follows that the validity of (20.83) together with that of either (20.80) or (20.81) for an arbitrary W, is necessary and sufficient for the existence of a subgraph Sj. A factor of a graph is usually defined as a subgraph which is the union of elementary closed paths which have no node in common and in which
174
V. Linear Network-Flow Problems
the branches are contained in the positive direction. It will be seen without difficulty that, in our terminology, a factor may be defined as a subgraph J3 with sa = S" = t a = t'" = 0 or 1 for every node n a . If a factor @ which contains all the nodes of Cfi is required, we may put sa = d a = t a = t'" = 1 for all a. In that case, it readily follows from the above considerations that: a necessary and sufficient condition for the existence of a factor containing all the nodes is that for an arbitrary '$lo ( E %), we have
llr+(%o)ll 2 II%olI
3
(20.84)
where
r+(%J = (J r + n , . n, t S o
[The reader should derive (20.84) from (20.80) or (20.81).] It should be noted that the practical algorithm for obtaining a subgraph or a factor with the required property is naturally derived from that for the maximumflow problem when we apply the latter to the respective networks. Sometimes we encounter the problem of finding a factor containing as many nodes as possible. In this case, we may modify the network N constructed above as follows.'For each a, we add a branch which connects nor- to na+ and which has the unit capacity in the positive direction and the null capacity in the negative direction, to represent the constraint sa = - t a = t" = 0 or 1. On the network thus modified, we may search for a flow configuration such that the sum of the flows in the newly added branches is as large as possible. In fact, the sum represents the number of nodes contained in the factor corresponding to the flow configuration. If we assign the convex function q,(t) = 0 to each branch of .,If and q,(x)= --x to each of the newly added branches, then the problem is to find a flow configuration that minimizes the sum @ of those functions. The problem of obtaining such a flow configuration is beyond the scope of this section, but it will be dealt with in $24. (Note that here we are assuming the validity of Remark 20.7 under somewhat more general circumstances.) 21. MINIMUM ROUTE
21.1. Presentation of the Problem The problem to be dealt with in this section is formally dual to that in $20. It is to obtain the projection to the q axis of the two-terminal characteristic curve of a two-terminal network .,If (6;ref., C,, . .. , C,) for which each C, (K = 2, . .. ,n) is a characteristic curve such as shown in
175
21. Minimum Route
Fig. 21.1. In a more natural expression, the problem is to obtain both the maximum and the minimum values for qI (the tension across the reference branch, i.e., the difference of the potentials at the entrance node and at the exit node) when the tensions qKacross the internal branches (K = 2, .. ., n) are subject to the constraints:
v, E
or dK6 qK 5 eK
JK
(J, = Cd,, e K l , e, 2 dK).
In the foregoing, it is understood that we put eK= co and/or d, when there is no upper and/or lower bound for qK. b,
= - co
-
b, e, - (1,
~
(21. I )
+fyJ+ c4tf'> =
- d,
- (IK
(4 b,
=
(b)
t-
+ e k q4 q + e, -
(d b, =
*
#- - ?
$*7?-+- (1, (d )
(e)
Fig. 21.1. Spanned branch.
We can specify the problem also in terms of nodes and node potentials as that of obtaining the maximum (as well as the minimum) possible value of the difference 5, - 5, between the potentials at the entrance ns and the exit n t when the node potentials [, satisfy
d, 5 la-
c8 5 eK
if ab, = nor- nS.
(21.2)
In the following, we shall call eK the span in the positive direction of branch b, and -d, the span in the negative direction. In most cases, the spans are nonnegative, but we shall not exclude the more general case where some of them are negative. In this connection, it should be noted that composition (d) in Fig. 21.1 is valid only if the spans of the branch are nonnegative. Furthermore, we shall call the quantity 5, - 5, = -ql the separation of the entrance from the exit.
176
V. Linear Network-Flow Problems
21.2. Maximum-Separation Minimum-Route Theorem Our arguments in this section proceed in a way perfectly dual to those in $20.2. In brief, the problem is to obtain the maximum value of -el such that when the reference branch is the voltage source of value el (i.e., when -ql = - e l ) , then there is a feasible tension configuration n
q=
q, b, over the entire network. (The problem of obtaining the mini,= 1
mum value can be reduced to that of obtaining the maximum value by reorienting the reference branch b, , i.e., by exchanging the roles of the entrance and the exit node; see Fig. 21.2.) The condition for the existence Internal branches
/
/
‘
I
I
I
/
Fig. 21.2. Minimum-route problem.
of a feasible tension configuration was established in Theorem 16.5. Since the number of elementary loops is finite, we can write out the relations (16.18) for all the elementary loops 6.Let us assume that (16.18) holds for every elementary loop 6 such that car 6 $ b, ;for otherwise, we can have no feasible tension configuration whatever value el may take. This assumption means the condition that: the sum of the spans eK and the -dK’s of the branches around every elementary closed path (we take the e, if branch b, lies on the path in the positive direction and the - d, if b, lies on it in the negative direction) should be nonnegative, which condition we shall hereafter call the nonnegative loop-span condition. The remaining relations in ( I 6.18) are concerned with the elementary loops corresponding to the elementary closed paths containing the reference
177
21. Minimum Route n
branch b,. For such an elementary loop or
6 = 1 Fb,,
where 5' = - 1
K= 1
+ 1, the relation (16.18) is of the form
where it is taken into account that (21.4) (21.3) can be summarized into
q',((")
-el (= -dl) 5 min 5
K=2
(5 = b,
+
("b, : loop)
(21.5)
K=?
to give a maximum for - e l . As is easily seen, an elementary closed path containing the reference branch b, in the positive direction consists of the b, and those branches which together form an elementary path from ns to nt . A path of this kind n
will be called a route from n, to n, . The quantity
1Q K ( t Kin) (21.5) is the K=2
sum of the e,'s of the branches contained in the route in the positive direction and of the - dK'sof those contained in it in the negative direction and will be called the distance from ns to n, along the route. In this way, we have seen that (21.5) yields a theorem that is the dual of Theorem 20.1 and is equally important though less famous. Theorem 21.1 (Maximum-separation minimum-route theorem). In a two-terminal network whose internal branches are provided with the spans e, and -d, in the respective directions, the maximum separation of the entrance from the exit is equal to the minimum distance along the routes from the entrance to the exit.
An illustration of this theorem is given in Fig. 21.3. As the reader has already noticed, if we consider a network with roads corresponding to branches, the eKand the - d , of a branch to the length or time required to pass the corresponding road, respectively, in the positive and the negative directions, then a route of the minimum distance
178
V. Linear Network-Flow Problems
i
Closed path
I
!
A.
I
(Distance of the minimum route
I
= 7)
(Maximum separation = 7; . d : tense branches)
Fig. 21.3. Illustration of the maximum-separation minimum-route theorem: Jz [-1,81, J 3 = [-1,21, Jq = [-3,4], 55 = 1-3, 11, Js = [-2,7].
=
(which may simply be called a minimum route) is a shortest route from the location corresponding to ns to the location nt . Thus, the problem we are now considering is an extension of the shortest-route finding problem. As for the relation between Theorem 16.5 in Chapter IV and the expositions in the present section, remarks similar to those given at the end of 920.2 hold. 21.3. Solution Algorithms Roughly speaking, we have two kinds of algorithms to solve the minimum-route problem. One is to start from a known feasible tension configuration q and then to increase -ql step by step in a manner dual to 0
that in 920.3.1. The other can directly find a solution if it exists or verify the nonexistence of the solution. We shall further discuss them in 421.3.1 and 421.3.2, respectively. Before entering into the details of the algorithms, we shall introduce a few technical terms. A branch b, is said to be tense in the positive direction
179
21. Minimum Route
or to be in state T + if the tension qK across it is equal to the span e, in the positive direction. It is said to be tense in the negative direction or to be in state T - if - q K is equal to the span -d, in the negative direction. Otherwise, i.e., if d, < q, < eK, it is said to be untense or to be in state T o (cf. Fig. 21.4). The tenseness is the dual concept of the saturatedness. If d, 5 q K 5 e,, then the q, is said to satisfy the span restriction. .When q K satisfies the span restriction, the quantities e, - q, and q K - d, are called the residual span in the positive direction and the residual span in the negative direction, respectively, in regard to the q K . Moreover, it is convenient to define a branch in state T + , T - , or To,respectively, as being conductive in the positive direction, conductive in the negative direction, or nonconductive.
7
T+
Fig. 21.4. Tenseness states of a branch.
21.3.1. ALGORITHM FOR THE SPECIAL CASE The algorithm to be expounded here is the dual of that given in 520.3.1, so that a brief explanation will suffice. For a tension configuration n
q = C q, b, that satisfies the span restrictions for all i
K = 2,
..., n,
we
~ = l i
search for a conductive path from the entrance to the exit (see the labyrinth algorithms in $20.3.1). If no such path is found, there is a dissection ('ill,,8,)of 'ill such that n, E 92, and nr E 'ill2, such that the corresponding i
i
i
i
segregation contains the reference branch b, in the negative direction and such that each branch contained in the corresponding cut (i.e., that segregation minus b,) in the positive or negative direction is not conductive (i.e., is not tense) in the positive or negative direction, respectively. Hence, in this case, the branches contained in the cut have positive residual spans in the respective directions. Let the minimum of those residual spans be 0
180
V. Linear Network-Flow Problems n
and define q =
qKbKby
~ = l i + l
i+l
qK = q,
+9
if b, is contained in the cut in the positive direction;
= q,
-0
if b, is contained in the cut in the negative direction;
i+l
i
i
(21.6)
otherwise, i.e., if b, is not contained in the cut.
=q K i
Then the q is a tension configuration satisfying the span restrictions for i+ 1
rc = 2, . . ., n. (The span restrictions are satisfied due to the definition of 9, and q - q is equal to the elementary cutset corresponding to the aforei+l
6
mentioned segregation multiplied by 0.) Here we have -
Vl i+ 1
’
(21.7)
-v1.
i
If a conductive path is found with regard to q, then it gives the maximum i
separation - q l , For, if there exists another tension configuration that -91
’
9 such (21.8)
-r19 i
then, in the equisignum decomposition (see Appendix 2) of Aq = fi - q, i
A1
= Aq
+ Aq +
* * *
,
2
1
some Aq will have -Aql > 0 ; therefore, Aq would be a multiple of an i
i
j
elementary cutset containing b, in the negative direction. Since it follows from the definition of the equisignum decomposition that
I 4 K I =14,-qKI
2 IAqKI, i
we have q, = 4, i
- Aq, 5 qK - Aq, < eK .i
q, = 9, - Aq, 2 9, - Aq, > d, i
i
if Aq, > 0, i
if Aq, < 0. i
(21.9)
181
21. Minimum Route
(21.9) means that in the cut corresponding to the afore-mentioned elementary cutset, a branch contained in the positive or negative direction is not conductive in the respective direction; however, this last proposition contradicts the existence of the conductive path. It is further noted that along the conductive path, each qK = eK or d,, respectively, and their sum (with appropriate signs) is equal to -q,, so that the conductive path we have i
found is a route with the minimum distance. REMARK 21.1. If e, 2 0 2 d, for all K ( = 2 , . ..,n), then we may put simplyq = 0. Hence, in this case, the preceding algorithm gives a complete 0
method of solution. REMARK 21.2. The computational labor required to obtain q from q i+ 1
i
or to know that q gives a minimum route is at most proportional to the I
number of branches since we have to perform a labyrinth algorithm and to compute 0 (cf. Remark 20.5 in 320.3.1). From the algorithmic viewpoint, there is a remarkable difference between the maximum-flow problem and the minimum-route problem, for, unlike the case of maximum flows, we need no antizigzag rule for minimum routes. In fact, as is readily seen, the dissections (’illl, ‘ill2),which we have according to the preceding algorithm, i
i
satisfy the following property: %5 i
3 2
i
i+l
23 2 ,
(2 1.10)
i+l
so that we must attain a solution q for an r less than the total number of r
nodes. Therefore, the computational labor necessary for solving a minimum-route problem is at most proportional to the product of the number of branches and the number of nodes. REMARK 21.3. The important remark of the same kind as we have made for the maximum-flow problem (Remark 20.7) holds equally well for the minimum-route problem. According to the foregoing algorithm, all the quantities we have to deal with are obtained by successive application of the operations of addition and subtraction to qK7s,e,’s, and d,’s. There0
fore, if the qK’s, e,’s, and dK’s are integers, rational numbers, algebraic 0
numbers, etc., then there is a solution (if there is a solution at all) consisting of integers, rational numbers, algebraic numbers, etc. As will be seen in 321.3.2, we can a fortiori assert that a solution is obtained by additions and subtractions of eK’s and dK’salone.
182
V. Linear Network-Flow Problems
21.3.2. ALGORITHM FOR THE GENERAL CASE By making full use of the concepts of node potentials, we can devise an algorithm by which we can solve the problem of obtaining a tension configuration in which the potential at each node has the highest possible value with the potential at the exit fixed to a given value (say 0). This problem is an extension of the minimum-route problem since its solution gives at the same time the maximum separations of all the nodes from the exit and the routes of the minimum distances from all the nodes to the exit. The algorithm is as follows, where C, denotes the potential at node n u . (i)
Initialization: Set
(, = O
la = co
and
(ii)
for
# t.
CL
(21.11)
0
0
Determine
la from C, by i
i+ 1
for every a, where nu = {h,,b,
. . .},
npi = a-bKi,
6 - n u = {b,,,
biz,.
. .}, (21.13)
nyi = a+bAi.
(iii) If for some r (less than the total number of nodes), we have
5,
r+l
= (,
for all CL,
r
then the tension configuration determined by [, = la is a solution. The r
maximum separation is given by [, - p,, and the minimum route can be found by performing a labyrinth algorithm for obtaining a conductive path from ns to n, with regard to the tension configuration thus obtained. (iv) If i, < i,for some a and some i greater than or equal to the i f 1
i
number of nodes, then we assert the nonexistence of solution. REMARK 21.4. The foregoing algorithm can be expressed in terms of matrices and vectors. We define matrix 0 = (Sap) by
9,"
=0
9,"
= mince,,
for all a,
, e , , , . . . ; - d L l , -da2, . . .], where db,, = nu - np and db,, = np - n u ,
= 00
if there is no branch connecting nu and n4,
(21.14)
183
21. Minimum Route
and calculate the vectors
6 = (Ca) by i
5
i+ 1
i
ra = min(9,8 + Cs)
=0* 5 :
i+l
i
(21.15)
i
I9
starting from
The operation (*) in (21.15) may be regarded as a kind of matrix multiplication where we use the operation of taking the minimum and the addition in place of ordinary addition and multiplication, respectively. For example, we may write i times
5 =(0* i
1 . .
* 0)* G .
(21.16)
0
[The interested reader may investigate the properties of the algebraic structure whose elements are real numbers and the symbol co, and in which two operations “ ” and “min” are defined. Introduce the matrix calculus over this algebraic structure and note that many formulas in ordinary matrix calculus remain to hold mutatis mutandis. In particular, consider the meaning of the powers of 0 with regard to “ * ”.I
+
REMARK 21.5. In the preceding exposition of the algorithm, we did not give a strict definition of the roles of the symbol co. Of course, we have to define co + x = x + c o = c o , min(x,
00)
= x,
min(co, co) = 00
+ co = co,
(21.17)
where x is an arbitrary real number. In this connection, it should be noted that although some dK’smay be - co and some ex’s may be co, we never encounter -co in the process of calculation according to the above algorithm. In the strict sense, the above algorithm works only when there is no pa equal to co. If some %.)sare co, we cannot determine definitely the tensions across the branches whose endnodes have infinite potentials. Nor can we detect a closed path around which the nonnegative loop-span condition fails to hold if the potentials at the nodes around it are given infinite values. Thus, in such a case, we can conclude only that if pa = 00, then there is a cut separating nu from n, in which the branches contained have infinite spans in the respective directions. Sometimes, however, this kind of conclusion is sufficient (e.g., for the application to the problems treated in $23).
184
V. Linear Network-Flow Problems
It is possible to modify the foregoing algorithm so as to be valid for the case where I, = co occurs. (The proof of its validity, which can be done in the same way as we shall d o below for the original form of the algorithm, is left to the reader, where it should be noted that the network under consideration is assumed to be connected.) For that purpose, we may deal with the linear forms xw + y instead of simple real numbers, where x and y are real numbers and o is a “very large quantity,” i.e., we assume
+(xo +y ) = min(x,w + y l , x2 w + y 2 ) 00
= x,o
00,
+y,
=x,o+y,
+ min(y,, y 2 ) min(co, x o + y ) = xw + y , = xco
co + 00 = 00, if x1 < x2,
(21.18)
if x, > x 2 , if x1 = x2 = x, min(co, co) = CO.
+
We simply write y , o,xw, etc., for Ow + y , lo 0, x o + 0, etc., respectively. In (21.12) or (21.14), we put eK = o or dK = -o wherever we should usually put eK= co or dK = - 00. I n contrast therewith, we put 5, = 0 and 0
[, = a, for all a ( # t ) at the initial stage. At the final stage of the compu0
tation of a solution, we may substitute a sufficiently large real number for o in the expression of every relevant quantity (simultaneously for all the occurrences of o). REMARK21.6. The computational labor required for soving a problem according to the algorithm in this section is estimated as follows. The labor to calculate ( from 4 by (21.12) is proportional to the number of i+ 1
I
branches. Since we reach a solution (or know the nonexistence of solution) before ( is calculated, where M is the number of nodes, the labor to solve a M
minimum-route problem is at most proportional to the product of the number of branches and that of nodes. It is worthwhile to note that this amount is the same in magnitude as the amount of labor estimated in Remark 21.2 with regard to the algorithm for the special case in 521.3.1. Let us now turn to the proof of the validity of the algorithm given previously, assuming the potentials [, are all finite.
185
21. Minimum Route
First, the [ i s are shown to satisfy the span restrictions for all the branches. In fact, for some r, we have
Pa = 5, = 5, r+l
for all u,
r
and, for an arbitrary branch b, such that db, = na - np, (21.12) implies the relations
or Second, it is to show that if the 5,’s are a set of node potentials which satisfy the span restrictions with [, = 0, then 5, 5 [, for all a. To show this, let us note that by definition,
5, 2 5,
for all a,
(21.20)
for all a,
(21.21)
0
and that if
5, 2 5 a i
then for a branch such that db, = n, relations (a
5 5 p + e, 6 5 p + e, ,
- np, the span restriction imposes the l p
i
5 C,
- d,
S 5, - d, .
(21.22)
i
(21.21) and (21.22), together with (21.12), yield
5,
s i +r,
for all u.
(21.23)
1
Therefore, by induction starting from (21.20), we have
5, s 5,i
for all u and all i,
so that we have Pa
2 5,
for all a.
Next, let us consider the meaning of 5,. We shall prove that i
(21.24)
5, is equal i
to the minimum of the sums of the spans (in the respective directions) of the branches along the (not necessarily elementary) paths of lengths not exceeding i from na to nt (or equal to co if there is no such path). This proposition holds for i = 0 and i = 1, as is evident from the definition.
186
V. Linear Network-Flow Problems
Let us assume that it holds for an i and consider the paths of lengths not exceeding i + 1. Each of those paths is either of length not exceeding i or consists of a branch b, for which d'b, = nu (or 8-b, = nu), and of a path of length not exceeding i from the other endnode of b, i.e., from F b , E nB (or d'b, 5 ns), to n,. This fact and the relation (21.12) prove the validity of the proposition for i + 1. In particular, pa is equal to the minimum of the sums of the spans of the branches along all the paths from na to n,. Finally, we have to consider the convergence of the sequence (Ca, [,, 0
1
[, , . . .). As we have just shown, the sequence is monotone nonincreasing 2
(beause the set of paths of lengths not exceeding i + 1 includes the set of paths of lengths not exceeding i ) . If r is greater than or equal to the number of nodes M, a path of length r contains necessarily a closed path. Therefore, if the nonnegative loop-span condition holds, the sum of the spans along a path of length r is not smaller than that along a path of shorter length, i.e., the path obtained by removing all the closed paths contained in it. This means that, for any c1 and an r greater than or equal to M , there is a number r' ( < r ) such that [, 2 [, . Taking account of the monotone nonr
increasing property of
r'
la with regard to i, we can conclude that for any a I
and an r 2 M, there is an r' < M such that [, = [, . Hence, there is an r
r'
r (<M) such that [a = [a = [a r
r+l
=
-
-
a
for all u,
r+2
if the nonnegative loop-span condition holds. Let us then consider the case where the condition fails, where there is a closed path along which the sum of the spans is negative. In that case, we can find from one of the nodes along the closed path, say nu, to n, ,a path that contains, i.e., passes, the closed path as many times as we want, so that we can find a path along which the sum of the spans is as small (i.e., negatively large) as we want. Therefore, the sequence (5,) decreases infinitely as i increases. i
REMARK 21.7. It should be noted that in the foregoing proof of the validity of the algorithm, we have also given a direct proof of Theorem 21.1 as well as a constructive proof of the tension part of Theorem 16.5, i.e., the sufficiency of the nonnegative loop-span condition for the existence of a feasible tension configuration. Furthermore, we note that if the nonnegative loop-span condition holds, [,is equal to 0 for every i. i
187
21. Minimum Route
EXAMPLE.Let us solve the problem illustrated in Fig. 21.3 of 521.2. For that network, the matrix 0 defined in (21.14) is of the form shown in (21.25), where s = 1 and t = 4:
@=
1 2 3 4
0
8
1 1
0
t
o
c = (a,
00, CO,O),
2 3
4
0
3
2
(21.25)
to.
1 7 0
5 = (9, 1,5,0>,
0
2
51 = (CO, 1,7,0),
5 = (7, 1, 5,O) = 5 3
4
c.
(21.26)
From (21.26), we see that the maximum separation of ns from n t , as well as the distance from ns to n, along a minimum route, is equal to = 7. In Fig. 21.5, the branches for which
%,
Fig. 21.5. Minimum routes to n4.
4,
A
Ca
-
- l~= e,
(ab, = na - nS)
(21.27.1)
na - nS)
(21.27.2)
or
4,
G
pa - tS= -dK
(db,
=
are drawn by bold-line arrows. [A branch for which (21.27.2) holds is given an arrowhead opposite to that indicating its proper orientation, although there is no such branch in this case.] These branches form minimum routes from nodes nl, n2, n3 to n4.
REMARK21.8. When computing the node potentials according to (21.12) or (21.15), we must remember the values of the [:s until all the i
188
V. Linear Network-Flow Problems
(,’s are determined. It is possible to apply the alternative method accordif1
ing to which we discard the old value i,as soon as a new value Ca is determined, making use of the
5,
i
5, in
instead of the
i+ I
i+ 1
the subsequent
i
calculation of (21.12) or (21.15). This latter method is sometimes called the successioe replacement to distinguish it from the original method, called the siniultaiieous replaceinent. In general, we can attain faster convergence by the successive replacement than by the simultaneous, especially when the nodes near the exit are scanned earlier and those near the entrance later in calculation of (21.12) or (21.15). It is easy to see that the %s: obtained by the successive replacement are the same as those obtained by the simultaneous replacemenr. (The interested reader may make comparison of the relations between these two methods with those between the Jacobi iteration and the Gauss-Seidel iteration method for solving a system of linear equations.)
REMARK21.9. The essential part of the foregoing algorithm is to classify the paths from norto n t of lengths not exceeding i 1 with respect to the node next to na [i.e., the node na, or ny, in (21.12) of (ii)], and then to determine the minimum over all these paths as the minimum of the minima over the respective classes-the principle of optimality in dynamic programming (see Bellman [l] and [2]). Evidently, under the nonnegative loop-span condition, we may assume that a minimum route from ns to n t is an elementary path, i.e., it does not pass a node more than one time. Therefore, if we are concerned with the paths from ns to n,, we may exclude those paths from our consideration which contain the ns as an intermediate node. This corresponds to excluding from the right-hand side of (21.12) [or (21.191 those terms which contain CS, i.e., the terms for
+
i
which / l j or y j = s in (21.12) [or p = s in (21.15)]. This simplified algorithm is useful for the application to the two-terminal characteristic problem to be treated in $23.3. 21.4. Triangular Inequalities
A network &” consisting of branches with branch characteristics of the kind shown in Fig. 21.1 may be regarded as different two-terminal networks by specifying i n direrent ways the entrance and the exit nodes, i.e., by connecting the reference branch between different node pairs. Let us denote by egathe distance along a minimum route from na to np of M , i.e., the maximum separation for the two-terminal network
21. Minimum Route
189
derived from JV by specifying na and nb as the entrance and the exit, respectively. eaa will be called the terminal-pair distance from na to na . We usually put
eaa= 0
for all 01
(21.28)
for convenience.
Theorem 21.2. For any sequence of r nodes nu, , . .. nar (r 2 3), we have (21.29)
PROOF. Let us denote by Pia minimum route from nai- I to nai . A path obtained by concatenating P, , .. . , P, in this order is a route from nal to n, along which the sum of the spans of the branches is equal to the Q.E.D. right-hand side of (21.29). In a special case r = 3, we have e m 3 a1
5 ea3 a2 + ea2 , a1
(21.30)
which is an extension of the famous triangular inequality for distances. (21.29) can be obtained by successive applications of (21.30). Theorem 21.2 is concerned with the case where the reference branches form a closed path, all of them excepting one lying in the same direction. The triangular inequality for the case where the reference branches form a segregation becomes as follows.
Theorem21.3. Let us consider a network JV in which branches
b, , .. . , bKpform a segregation such that
(21.31) is a cutset and of which the branches other than bKl , ..., bKrare provided with the characteristics of the kind shown in Fig. 21.1 (see Fig. 20.1 1). Let N ibe the two-terminal network derived from N by short-circuiting b, , .. . b K i - ,, b K i - , ,. . ., b K r , with bKias the reference branch and with gKias the maximum separation or the distance along a minimum route for N i(see Fig. 21.6). Then we have
gK12 min(g,,
9
*.
9
SIC,).
(21.32)
190
V. Linear Network-Flow Problems
(a)
(b)
Fig. 21.6. Illustration of a triangular inequality.
PROOF.By virtue of the definition of g,, , there is in N 1a closed path containing b, in the positive direction around which the sum of the spans of the branches (except for bKl) is equal to g,, . Corresponding to this closed path in N , , a closed path in N can be found (cf. 99.5 of Chapter 111). Let the loop in JV corresponding to the latter closed path be (21.33) The cutset (21.31) is orthogonal to the loop (21.33) so that we have
c t"i
= 1.
i=2
Therefore, at least one of the SKi's(i = 2, . . . , Y) should be positive. Since we may assume, without loss in generality, that the loop (21.33) is elementary, one of the tKi'sis equal to 1. Let t K j o = 1. Then the loop (21.33) uniquely determines a closed path in N j ocontaining bKjo in the positive direction. Around that closed path in N j o ,the sum of the spans of the branches (except for bKjo)is evidently equal to g K ,. Hence, we have g K n
2
gKjo'
It is obvious that (21.32) follows from (21.34).
(21.34) Q.E.D.
REMARK21.10. Theorem 21.2 is the dual of Theorem 20.3, and Theorem 21.3 is the dual of Theorem 20.2. 21.5. Applications As was already mentioned, the minimum-route problem of this section has an obvious application to the shortest-path problem in a road network, about which no further explanations will be needed.
21. Minimum Route
191
The other typical application is the project scheduling problem. A branch of a network represents a job in a project. A node represents the event that all the jobs corresponding to the branches negatively incident to it have finished, and all the jobs corresponding to the positively incident branches are to start. (A network of this kind is called an arrow diagram.) We interpret the potential at a node as the time (instant) of the corresponding event and the tension across a branch as the negative of the time (duration) assigned to the correspondingjob. Then the relation of the tension across a branch to the potentials at its endnodes is exactly the relation of a job time to the time of its start and that of its finish. Let us consider a project consisting of a certain number of jobs among which an order relation (exactly, a partial order) is defined. The network, i.e., the arrow diagram (Fig. 21.7), representing the partial order relation among
Fig. 21.7. Arrow diagram of a project.
the jobs of the project involves no closed path having all of its branches contained in the positive direction. (Conversely, such a network can define a partial order among its branches.) We regard the node corresponding to the event of the start of the entire project as the entrance and that corresponding to the event of its completion as the exit, thus making the network a two-terminal network. Furthermore, we require that each job be done between a prescribed pair of times, i.e., that the job time -qK for job K should satisfy - d , L -qK2 - e K , (21.35) where d, and eK are given (d, 5 eK 5 0). Here arises the question: Is it possible to schedule the project, i.e., to assign times -qK to the jobs such that they may satisfy (21.35), and, if it is possible, what is the optimum schedule that makes the project time (i.e., the completion time of the project minus the start time of the project) shortest? As will readily be seen, this question is a special case of the minimum-route problem, where the project time corresponds to the negative of the separation of the entrance from the exit. If all the dK’sare - as is usually the case, then
192
V. Linear Network-Flow Problems
there is a solution because every closed path contains a branch in the negative direction so that the sum of the spans around it is equal to a, i.e., the nonnegative loop-span condition holds. The maximum separation (=the minimum distance) is of a negative finite value if there is a path from the entrance to the exit with all the branches contained in the positive direction and if the e,’s are finite (as is usually the case). In an optimum schedule, the job (i.e., the branches) along a minimum route from the entrance t o the exit are assigned the shortest possible times -eK so that these jobs are not allowed to be delayed. A minimum route, in this sense, is called a criticalpath. 22. RELATIONS BETWEEN THE MAXIMUM-FLOW PROBLEM AND THE MINIMUM-ROUTE PROBLEM
Comparing the solution algorithm for the maximum-flow problem in $20.3.1 with that for the minimum-route problem in $21.3.1, the reader will find a remarkable similarity between them. In either case, branches (directions taken into account) are classified into the conductive and the nonconductive, and a conductive path from the entrance to the exit or a nonconductive cut separating the entrance from the exit is sought. This is a natural consequence of the duality of the two problems, since a path is the dual concept of a cut (i.e., if the reference branch is added, the former becomes a closed path and the latter a segregation). Furthermore, both in $20.3 and in 521.3, a branch might have been defined as conductive in the positive direction, conductive in the negative direction, or nonconductive according to whether the point representing the flow or tension of the branch is on a horizontal segment of the characteristic curve but not at its right end, or is on a horizontal segment but not at its left end, or is an interior point of a vertical segment. Thus, if we have two networks with the same graphical structure and we have to solve the maximum-flow problem of one and the minimum-route problem of the other, and if in regard to a flow configuration on one and a tension configuration on the other, the conductivity of a branch of one network is the same as that of the corresponding branch of the other network, then a conductive path or a nonconductive cut can be found for both networks by one calculation. This fact will be made use of in $23. If the graph of the network is planar, a more explicit relation can be established between the two problems. Let Jlrl and Jlr2 be two networks whose graphs are mutually dual. Suppose that we have to solve the maximum-flow problem for N l with branch b, as the reference branch and the
23. Two-Terminal Characteristics
193
minimum-route problem for N z with branch b, reoriented (i.e., - b,) as the reference branch. Furthermore, we suppose that for each internal e,] branch b, of N l ,the I" = [b", cK] is numerically equal to the J, = [aK, for the corresponding branch b, of N z . Then the vector q numerically equal to the flow configuration 5 of a solution for N l is the tension configuration of a solution for N z, and vice versa. Moreover, the set of branches forming a minimum cut in N , corresponds to the set of branches forming a minimum route in N 2 ,and vice versa. In general, the minimum-route problem is easier to solve than the maximum-flow problem, as we see from the comparison of $20.3 and $21.3. Hence, in order to solve the maximum-flow problem for a planar network N l , we may first construct a dual network N z of N , (as shown in $12) and then solve the minimum-route problem for N z . 23. TWO-TERMINAL CHARACTERISTICS
A typical form of linear network-flow problem will be treated. Not only are there a great many problems that can be formulated in this form, but also the fundamental technique is afforded to attack a more general problem in $24. We shall investigate the problem from the algorithmic standpoint in this section in contrast with the theoretical considerations in Chapter IV, $17. 23.1. Introduction The problem to be treated in this section is to determine the twoterminal characteristic of a two-terminal network whose internal branches have step-function characteristics as well as the flow and tension configurations corresponding to the points on the two-terminal characteristic curve. We shall assume throughout the following that the step-function of the characteristic of every branch consists of a finite number of steps in order to assure the finiteness of computational process. The algorithm to be developed in the following will make full use of those algorithms established in $20 and $21. Conversely, the maximumflow problem and the minimum-route problem are special cases of the problem treated in this section. In fact, the maximum-flow problem is equivalent to that of obtaining the flow configuration (in the two-terminal network N consisting of branches with characteristics of Fig. 20.1) corresponding to a point with a positive tension on the two-terminal characteristic curve for N . [From the general properties of two-terminal
194
V. Linear Network-Flow Problems
characteristics ($1 7 of Chapter 1V) and the fact that there is no voltage source in N , it follows that the two-terminal characteristic of N should also be of the kind Fig. 20.l(e). Therefore, the flow in the reference branch takes its extremum value when the tension is nonnull.] Similarly, the minimum-route problem is equivalent to that of obtaining the tension configuration (in the two-terminal network N consisting of branches with characteristics of Fig. 21.1) corresponding to a point with a positive flow on the two-terminal characteristic curve of N . An evident but important note is to be added. Let (p', -9,) be a point on the two-terminal characteristic curve of N = N ( 6 ; ref., C, , . .., C,) and let { = C tKb, and 4 = C 4, b, be the corresponding flow and tension K
K
configurations on N.Then (6, 4) is also a solution for the network obtained by replacing the reference branch b, by the current source of value n
tl. Therefore, (Z2, . . ., tn)minimizes the function cp,(Y) under the K=2 condition that the flow t' in the reference branch b, be fixed to t' where it should be noted that
(pl(e') = 0
for the current source. Similarly, I
C t,bK(qK)under
(&, . . . , 9,) minimizes the function
the condition that
,=2
the tension q, across b, be fixed at 4,.
23.2. Fundamental Theorems To begin, let us introduce some preliminary concepts. Consider the flow t" in branch b, and the tension q, across it, which together form an admissible pair, i.e., (t",q,) E C, . According to the positions of the point (tK,q,) on C, , we distinguish the four following cases (see Fig. 23.1): is an interior point of a horizontal segment of C, . is an interior point of a vertical segment of C, . is at the left end of a horizontal segment, i.e., at the upper end of a vertical segment of C, . (d) (t",q,) is at the right end of a horizontal segment, i.e., at the lower end of a vertical segment of C, . (a) (b) (c)
(t",q,) (tK,q,J (t",q,)
In each of these four cases, AtKand Aq, satisfy the conditions shown in the tabulation of (23.1) if and only if the point (Y + AY, q, + Aq,) lies on the same vertical (At" = 0) or horizontal (Aq, = 0) segment of C, as the point (t",q,) lies, where - Ab", AcK, - Ad,, Ae, are the distances from q,) to
(r,
23. Two-Terminal Characteristics
195
Fig. 23.1. Conductivityof a branch. (a) Conductivein both directions: Ab" =< Ag" =< AC", Ad, = Aq, = Ae, = 0.(b) Nonconductive:Ab" = Ag" = AC" = 0, AdK5 AqK5 Ae, . (c) Conductive in the positive direction only: 0 = Ab" 5 A F 5 AC", Ad, AqK2 Ae, = 0. (d) Conductive in the negative direction only: Ab' jA F 6 AcK= 0, 0 = Ad, 5 Av, 5 Ae"
.
the adjacent corner point of C, (cf. Fig. 23.1): (a) (b) (4 (d)
Aq, = 0 AbK5 At" 5 AcK A t K= 0 0 A t K5 AcK Ab" 5 A.5" S 0
Ag"=O Aq, = 0 Ad, 5 Aq, 5 b e , Ad, 5 Aq, 5 0
(23. I )
0 5 Aqe 5 Ae,
In case (a), (b), (c), or (d), branch b, is said to be conductive in both directions, nonconduciive, conduciive in the positive direction only, or conduciive in the negative direction only, respectively, with regard to (Y, q,).
196
V. Linear Network-Flow Problems
Next, suppose that there is a given two-terminal network JV as well as a compatible pair of flow and tension configurations (5,q). Then, we define the associated maximum-Jow problem on A'- in regard to (5, q) as the problem of finding the incremental flow configuration A4 such that the pair (5 + A t , q) is compatible and that the incremental flow A t 1 in the reference branch b, takes its maximum (or minimum) value, i.e., solving the maximum-flow problem with Ac"'s and -Ab"'s as the capacities of the branches to obtain A t . In other words, with the tension configuration fixed the problem is to maximize the entrance-to-exit (or exit-to-entrance) flow through the internal branches of JV. Similarly, we define the associated minimum-route problem on JV in regard to (5, q) as the problem of finding the incremental tension configuration Aq such that the pair (5, q + A q ) is compatible and the incremental tension - Ar], across the reference branch b, takes its maximum (or minimum) value, i.e., solving the minimumroute problem with Ae,'s and -AdK's as the spans of the branches to obtain A q . In other words, with the flow configuration fixed, the problem is to maximize the entrance-from-exit (or exit-from-entrance) separation. It is obvious that these two associated problems always have a solution (finite or infinite). We are now in the position to state the fundamental theorem:
Theorem 23.2. For a compatible pair of flow and tension configurations, the associated maximum-flow problem admits a solution with max A 0 if and only if there is a conductive path from the entrance to the exit (i.e., a path in which every branch contained in the positive direction has a positive Ac" and every branch contained in the negative direction has a positive -Ab") or, equivalently, if and only if there is no nonconductive cut separating the entrance from the exit (i.e., no cut in which every branch contained in the positive direction has null Ac" and every branch contained in the negative direction has null Ab"). From Fig. 23.1 or (23.1), it is seen that the aforementioned path consists of branches (contained in the positive direction) with null AeK's and those (contained in the negative
197
23. Two-Terminal Characteristics
direction) with null Ad,'s and that the aforementioned cut consists of branches (contained in the positive direction) with positive AeK'sand those (contained in the negative direction) with positive -Ad,'s. Then, by Theorem 21.1 or the algorithm in $21.3.1, we can conclude that the existence of such a path (or the nonexistence of such a cut) is necessary and sufficient for the associated minimum-route problem to have no soluQ.E.D. tion with max( -Aql) > 0. Theorem 23.1 affords the basis for the two-terminal characteristic algorithm in $23.3 in which we solve the two kinds of associated problems alternately to determine the vertical and horizontal segments, one at a time, of the two-terminal characteristic curve. The following theorem, a special case of Theorem 17.2 (Chapter IV, $17), is useful for practical applications.
Theorem23.2. Let 6 and 6 + A k be flow configurations and q and q + Aq be tension configurations such that ( t'), Zi
2i
2i
(23.6)
= -ql). 2i
q ), the associated maximum-flow problem has 2i+l
no solution with A t 1 > 0. Solving alternately the associated maximum-flow and the associated minimum-route problems in this manner, we can determine the horizontal segments and the vertical segments of C, one at a time, from the lowerleft to the upper-right direction until we encounter a semi-infinite vertical or horizontal segment (cf. Fig. 23.2). The lower-left part of C may be
199
23. Two-Terminal Characteristics
obtained by computing the solutions of the associated problems with At1 < 0 and with -Aql 0 (see Fig. 23.2). Since is equal to the sum (with signs taken into account according
-=
Zi+ 1
to the directions of the branches) of the abscissas of the vertical segments of the characteristic curves of the branches which form the cut correspond-
Fig. 23.2. Two-terminal characteristic curve.
(6 , q), and 2i Zi since 5' > t', it is impossible for the sequence (tl, t1= t', 5' = ti, . ..) 2 i + l 2i-1 0 1 2 3 4
ing to the associated maximum-flow problem in regard to
to continue infinitely if the number of branches is finite and every C, has a finite number of vertical segments. Similarly, the sequence (ql = q l , 0
1
q1 = q l , . . .) cannot continue without end. Hence, for a certain finite r, 2
3
we must have either
t1 = a 2r- 1
or
-ql = a . 21
Theorem 23.3. The two-terminal characteristic curve C of a twoterminal network JV consisting of a finite number of branches, each of
200
V. Linear Network-Flow Problems
whose characteristic curves C, is a step-function with a finite number of corner points, is also a step-function with a finite number of corner points.
REMARK 23.1. Instead of beginning the solution algorithm with the maximum-flow problem with regard to (6, q), we may begin it with the 0
0
minimum-route problem with regard to the same (6,q). No essential 0
0
alteration occurs in the subsequent steps.
REMARK 23.2. As is seen from Fig. 23.1 or (23.I), the path (minimum route) which we find when we get a solution of the associated minimumroute problem with regard to ( 6 , q ) is conductive with regard to 2i-1
2i-1
(6 , q) so that in solving the associated maximum-flow problem with regard 2 i 2i to ( 6 , q), it may be used as the first conductive path along which an in2i
2i
cremental flow is assigned. Similarly, the (minimum) cut which we find when we get a solution of the associated maximum-flow problem with regard to ( 6 , q) is nonconductive with regard to ( 6 , q ) so that in Zi
2i
Zi+l 2i+l
solving the next associated minimum-route problem with regard to ( 6 , q ), it may be used as the first nonconductive cut across which the Zi+l 2 i + l
tensions of the branches are raised (or lowered). Hence, if we solve the associated problems by the algorithms of $20.3.1 and $21.3.1, we can search for a conductive path or a nonconductive cut according to the labyrinth algorithm in $20.3.1without considering which of the associated problems is being solved. We may alter the flows if a conductive path is found, whereas we alter the tensions if a nonconductive cut is found. In this way, the two kinds of associated problems play perfectly equal roles. This is a characteristic feature of the method widely associated with the names of Ford and Fulkerson [I]. In contrast with this, when we solve the associated minimum-route problem in regard to ( 6 , q ) by the algorithm of $21.3.2,we can disZi-1
Zi-1
pense with the values of q to determine the new q . [By virtue of this ~~
~
Zi
Zi-1
fact, we can start the solution algorithm with the associated minimum-route problem (see Remark 23.1) i f w e know only a flow configuration 6 for 0
which a partner tension configuration q exists although q is not numerically 0
0
known.] In fact, let e", and d", denote the ordinates of the corner points of the vertical segment with abscissa 5" of C,, and let [, , A[,, and 2i-1
c,
20 1
23. Two-Terminal Characteristics
denote the node potentials corresponding respectively to q , A q , and 2i-1
2i-1
9,then we have 2;
E, = qti 2i- 1
a, = 2i-1 ilti + Adti.
+ be,,
5" , qK ) is an interior point of a horizontal segment of 2i-1 set E, = d, = qti .] Since (21.12) takes the form (23.8) for A l Z , [If (
(23.7) C,, we
2i-1
2i-1
AC, = min[AC,; i- 1
ACp,
i
i
+ Ae,, , . ..;
A[,, - A d A , ,. . .],
(23.8)
1
and since
-
=rp,
ACYj - Addj =
+ E K j - r,
r,, -
dd,
-
r,
9
9
we can make use of the iterative formula [obtained by adding 5, to (23.8)] Ct
=O,
4'a 0
0
C,
i+ 1
= minCt ; i
=
i
(a Z t ) ,
+ ZKI . . . ;
Cut - ddl,...I,
(23.10)
i
r, = C, m
to determine the la's. [Similarly for (21.15).] (23.10) can be obtained also by recalling that for a given 5" , we have ( 5", q,) E C, if and only if 2i-1
2i- 1
d;, 5 q, 5 2,. Furthermore, in the next associated maximum-flow problem with regard to the ( 5 , q) thus determined, the search for a conductive path 2i 2i
is in general easier and more effective to perform than it is with regard to the ( 5 , q) determined by the algorithm in 921.3.1; i.e., starting from the 2i 2i
entrance node we can go through the network straight to the exit, seldom examining at a node na the worthless possibility of a conductive branch incident to na from whose other endnode there is no conductive path to
202
V. Linear Network-Flow Problems
the exit. I n fact, it will readily be seen from the way of determining the la’s in $21.3.2 [or (23. lo)] that if there is a conductive path from the entrance to a node n u , then there is necessarily a conductive path from nu to the exit. I t should be noted that whichever algorithm we may use, each of the new node potentials is not less than the corresponding one in the previous stages. REMARK 23.3. From the preceding algorithm, it can be concluded that the coordinates of a corner point of the two-terminal characteristic curve C are determined by repeated applications of addition and subtraction to tK’s,qK’s, and the coordinates of the corner points of the C, character0
0
istic curves of the branches. Thus, if the coordinates of the corner points of the C,’s as well as the t K ’ s and qK’s are integers, rational numbers, or 0
0
algebraic numbers, so are the coordinates of the corner points of C. Moreover, a flow configuration and a tension configuration corresponding to a corner point of C can be determined in the same manner. Actually,
(b)
b“
d.
-1 -1
-1
1
1
-2
-I
-1
2 I
2 1
-1 -1 -1 -1
-2 -2
1 2 4
1 1 1
-4
2
2
-I
(4
Fig. 23.3. A network and its branch characteristics.
203
23. Two-Terminal Characteristics
we can show a fortiori that the tK'sand q,'s may be assumed to be derived 0
0
from the coordinates of the corner points of the C,'s by additions and subtractions (see 824.1). These facts are generalizations of those noted in Remarks 20.7 and 21.3.
EXAMPLE.We shall compute the two-terminal characteristic curve C of the two-terminal network Fig. 23.3(a) where each branch b, (K = 2, . ., 7) has the characteristic curve C, of the form shown in Fig. 23.3(b), and the ordinates e, and d, of the horizontal segments as well as the abscissas cK and b" of the semi-infinite vertical segments are shown in Fig. 23.3(c). (The middle vertical segment lies on the q axis.) Obviously, we can start from the flow and tension configurations (5, q) = (0,O). In
.
0
0
the following, we shall indicate the ith associated maximum-flow problem by ( F i > and the ith associated minimum-route problem by ( R i ) . We shall make use of abbreviations 7
I
( F l ) : Since only 5" = 0 is compatible with q K = 0 for every IC, the first associated maximum-flow problem has the solution A t = 0 (At1 = 0) 0
0
so that we have
(Rl): The 2,'s and 2,'s have the same value as the e,'s and d,'s so that we have the matrix 0 in (23.12) [cf. (21.14)]:
@=
1 2 3
0
1 2 0
4 5 ~
0 ~~
3 3
3
4
5
1 0
2 1
co 1
co. co
2
0
2
1 0 4
4
1 0
3
2
(23.12)
2 0
~
Computation according to (21.15) with the improvement suggested in Remark 21.8 (the multiplication by l, is performed to the rows 5, 4,3, 2, 1
204
V. Linear Network-Flow Problems
in this order) proceeds as in (23.13)
(23.13)
to yield
0 = (4, 3,3,2, O), q
= (-4;
(23.14)
1, I , 1,0, - 1, 3,2).
2
Thus we have
K
2
3
4
5
6
7
8
Ac"
1 0
0
1
0
0
0
2
0
0
0
1
0
0
-Ab"
(23.16)
5 = 5 + A t = (1 ; 1, 0, 1 , 0 , 0 , 0 , l), 3
2
2
A5=At1=1, 2
2
t=1,
q=q=4,
3
3
2
(23.17)
205
23. Two-Terminal Characteristics
0) is the excess of exports over imports at the city ns E 'illt. Thus, the problem is
212
V. Linear Network-Flow Problems
reduced to the multientrance multiexit minimum-cost network transportation problem (such as just explained), where the flow 5" in route b, is the number of empty ships transferred through it and the objective function to be minimized is the sum of the rp,(r)'s for all the routes. Here q,(t") is defined by
23.4.2. SPECIAL KINDSOF TRANSPORTATION PROBLEMS There are a large number of practical problems represented by a network-flow problem with a special topological structure, and sometimes, the same problem has more than one different network representation. In the following, we shall show the examples illustrating these circumstances. (1) HITCHCOCK TRANSPORTATION PROBLEMS AND ASSIGNMENT PROBLEMS: We consider n? producers and n consumers of a commodity located at different places. The ath producer (a = 1, . ..,m) supplies the amount sa of the commodity and the Pth consumer (P = m + 1, ..., m + n) demands the amount t o . The maximum amount that can be transported from producer a to consumer P is cap (which may be 0 or a),and it costs as much as eorp(20) to transport the unit amount there. The problem is to find among the transportation plans which minimize the sum of the surpluses at the producers (or, equivalently, the sum of the shortages at the consumers) one plan which minimizes the total transportation cost. This problem, usually called the capacitated Hitchcock transportation problem, may be formulated mathematically as follows. The nonnegative constants sa, to, cap, and eap are given for a = 1, .. ., m and P = m + I , . . .,m + n, and the variables 5, y, tP,and r p are adopted (representing, respectively, the total amount of the commodity transported, the amount transported from the ath producer, the amount transported to the Pth consumer, and the amount transported from the ath producer to the Pth consumer). These variables are subject to the equality constraints
5"=
m+n
1 rfl
(a= 1,
..., m ) ,
(P=
+ I , ..., m + n),
p=m+ 1 rn
=
1y p
m
a= I
c
m
m+n
a=l
p=m+l
t;=.&y=
(23.42)
5"Z$fl a,p
which express the continuity of the commodity flow, as well as to the
213
23. Two-Terminal Characteristics
inequality constraints, ( a = 1 ,..., m),
saz5"zo t0 = > tfl>O =
(P=m+ 1, .. . , m+n),
(23.43)
(a= I , . ..,m ; fi = m + I , . .., m + n).
cap 2 cap>=O
Let the maximum value that 5 can take under conditions (23.42) and (23.43) be g. Then the problem is to find the set of values (5, r", t", Yp) which minimizes the total cost m
m+n
(23.44) under conditions (23.42), (23.43), and (23.45) :
5 = g.
(23.45)
A Hitchcock problem is formulated as a kind of multientrance multiexit network transportation problem as follows. I t will be obvious that constraints (23.42) are embodied by a network of the structure shown in Fig. 23.7(a) where we have m nodes {nl, .. ., nm} ( =al)corresponding to the m producers, n nodes {n,,,, . . ., nrn+,,}(=%,) corresponding to the n consumers, an entrance node no = n,, and an exit node n m + n + l= n,; m + n + 2 nodes in all (a= u %, u {n,, n,}). The set of branches 23 consists of m (additional) branches connecting n, to the nodes of illl (5" being the flows in them), n (additional) branches connecting the nodes of %, to n t (tpbeing the flows in them), and m . n (intrinsic) branches connecting the nodes of to those of % ' , (tap being the flows in them); m + m * n + n = (m + l)(n + 1) - I branches in all. [Since the network is a two-terminal network, the number of branches amounts to (m + l)(n + 1) if, in addition, the reference branch connecting n, directly to n, iscounted.] The restrictions (23.43) as well as the cost function (23.44) can be realized by providing the branches with the characteristics shown in Fig. 23.7(b). In the network .A-' thus constructed, the pair of flow and tension configurations (5, q) = (0,O) is obviously compatible so that we 0
0
can calculate the two-terminal characteristic of JV beginning from that pair. The flow configuration corresponding to the largest possible entranceto-exit flow t = ?, which is obtained by the algorithm explained in $23.3,
is a solution of our problem. If
g=
m
a=l
m+n
sa =
fp,
we have a solution
B=m+l
satisfying all the supplies and demands; whichis a solution for the problem
214
V. Linear Network-Flow Problems
Fig. 23.7. Hitchcock problem.
which has the constraint relations
sa = y,
to = t o
(or tP 5
tP)
(23.43')
instead of the first and second relations of (24.43). (The Hitchcock problem is sometimes defined in this form.) For the pairs (u,p) such that it is impossible to convey the commodity from producer a to consumer p, we may put czB= 0 (or/and eao = a). Since the structure of the network for the Hitchcock problem is highly special as just shown, the solution algorithm for it can also be much simplified. The details about this possibility of simplification will be discussed in $23.4.3. The special case of the Hitchcock problem where m = n, sa = l p = 1 (and we may put caP= 1 or cap > 1) for all a's and fl's is called the assignmetit problem. If all the calf's are finite, we obviously have [ = rn ( = n ) , r" = I , = 1 (for all CI and p) in every solution. Furthermore, by virtue is equal to 0 or 1 . of Remark 23.3, we can find a solution in which every tUo
23. Two-Terminal Characteristics
215
In such a solution, the value of is equal to the sum of the eaB’sfor which yp= 1. Since 5“ = 1, there is one and only one B for each a such that tUB = 1. Similarly, there is exactly one a for each fl such that = 1. This means that the rB, when regarded as an m x m matrix, is a permutation matrix. Hence, in terms of the e,is arranged in the form of a matrix, the problem can be formulated as one of choosing m elements out of mz eUB’s in such a way that exactly one element is chosen from each row, exactly one from each column, and the sum of the chosen e,,’s is as small as possible. In practical terminology, we may state the problem as follows. We consider m persons and the same number of jobs and assume that there is a loss e,, when person a is engaged in job p. What is the best one-to-one assignment of jobs to persons in order to ensure minimum total loss? If, instead of the losses e,, of assignment, the gains e:, are given and the maximization of the total gain is required, we may convert the problem as losses by setting into a minimization problem with the eUB’s Z = max ei,,
e,, = Z - e;,,
(23.46)
a. B
because, for any assignment yB,we have
and mZ is independent of the tap’s.An efficient computational algorithm for the assignment problem will be given in 923.4.3. To the assignment problem may be given another practical interpretation, as follows. There are m glasses nl, . .., n, and m persons ,n . . . , nZn,as well as a certain amount Q of liqueur, and it is assumed that E,, of the liqueur contained in glass n, has the unit utility for person nB (a = 1, . ..,m ;p = m 1, . ..,2m). Here arises the problem of dividing the liqueur among the glasses and then distributing them to the persons, one to each, in such a way that each person gets one of the glasses of the greatest utility for him. If we denote the amounts of liqueur in the glasses by zl, ..., z, and the utilities the persons obtain by z,+~, ..., z Z mand express the way of distributing the glasses to the persons by the permutation matrix 8 = (yfl),
+
yB= 1 =0
if glass na is assigned to person n,, otherwise,
216
V. Linear Network-Flow Problems
then the conditions to be satisfied by z,, z p , and
c
Ppare
m
a= 1
zu =
Q,
zp 2 za/cap
(a= 1, . . . ,m ; B
zp = zu/cap
if t a p > 0.
(23.47.1) =m
+ 1, ...,2m),
(23.47.2) (23.47.3)
Here it is noted that because of the homogeneity of (23.47.2) and (23.47.3) in regard to za and zp , only the ratios among the z’s are of significance so that (23.47.1) may be put out of consideration. If we set 5u
= log z a 9
5s = log zp
3
eap = log cap 9
(23.48)
the conditions (23.47.2) and (23.47.3) are written as
As will readily be seen, the relations (23.49) are exactly those to be satisfied by the tensions qalracross the intrinsic branches and the potentials 5, and u [a at the nodes of with the flows Cup in the intrinsic branches (see also Fig. 23.7), where we put cap = co for the intrinsic branches. Thus, the problem is reduced to an assignment problem where not only the flow configuration but also the tension configurations are given practical meanings. There is a strange relation between the general network transportation problems and the Hitchcock problems. Obviously, the latter problems are a very special case of the former. Strangely enough, some broad subclass of the former is proved to be equivalent to a very special subclass of the latter. The former subclass consists of the problems in which every branch has the characteristic curve C, ending with semi-infinite vertical segments at both ends and in which the flow in the reference branch is given, whereas the latter subclass consists of the uncapacitated Hitchcock problems, i.e., the Hitchcock problems in which all the cup’s are infinite. (Note here that the condition that a C, should end with semi-infinite vertical segments is practically no restriction because a C, ending with a semi-infinite horizontal
23. Two-Terminal Characteristics
217
segment at an end may be substituted for by the C,' obtained by bending the semi-infinite horizontal segment of C, vertically at a sufficiently distant place.) A network N of the former class may be assumed to consist of the branches of the structure shown in Fig. 13.12 with e nonnegative (in $13.3 of Chapter IV), since any step-function characteristic can be composed from such branches, as was illustrated in Fig. 13.14, and of the reference branch which is a current source. Let us denote by N ' the network obtained from N by removing all the current sources (including those in current limiters) where we regard the set of nodes of N'as consisting of those of N (whose set will be denoted by and of the middle points of the branches [expressed in the second form of Fig. 13.12(a)] of N (whose set will be denoted by S2). As follows from the construction of N ' , every branch of N' is either a diode or the series connection of a diode and a voltage source of a nonnegative value conto a node of a2.Furthermore, it is obvious that necting a node of finding a solution for N is equivalent to finding one for N' where the inflow at a node of 9l1is set equal to the sum of the values (signs taken account of) of the current sources connected with the corresponding node of N,and the outflow at a node of 'iR2 is set equal to the value of the current limiter (or the current source in it) contained in the corresponding branch of N [cf. the equivalence transformation of type 2.1(4) in $19, Chapter IV]. Thus, we have seen that a network transportation problem with M nodes and n branches (of the form shown in Fig. 13.12) is equivalent to an uncapacitated Hitchcock problem with M entrances and n exits. In Fig. 23.8, this equivalence is illustrated.
Fig. 23.8. Equivalence between the two-terminal problem and the Hitchcockproblem.
218
V. Linear Network-Flow Problems
( 2 ) WAREHOIJSING PROBLEM:We shall take up another example of special topological structure to illustrate that among the mutually equivalent network representations of a problem, some are intuitively natural but not suitable for theoretical considerations, while others are not natural but lead us to deeper insight. The so-called n3areliousing problem is defined as follows. We consider a sequence of 111 successive periods of time and a warehouse of capacity c for a commodity. In the ith period, we purchase x i units of the commodity, store them in the warehouse where ti-’units have been held over from the previous (i - 1)st period, sell y‘ units, and hold over ti( = ti-’+ x i - yi) units to the ( i + 1)st period. For the sake of simplicity, we assume that to= trn= 0, i.e., that the warehouse is initially empty and it should be made empty after the final period. The cost of purchasing a unit of the commodity in the ith period is di,the price of selling one unit is ei,and the cost of storing a unit during the ith period is f i . In each period the warehouse has to store, although temporarily, ti-’+ x i units (the sum of the held-over and the purchased amount) so that ti-’+ x icannot exceed the warehouse capacity c. Here the question arises: What kind of plan of purchasing and selling will maximize the total profit (i.e., the total selling price minus the total purchase cost minus the total warehouse cost) or, equivalently, will minimize the total loss which is equal to the negative of the total profit? The most straightforward network representation of the problem would be as shown in Fig. 23.9, where the two nodes with labels “entrance” and “exit” are short-circuited (i.e., they are regarded as a single node).
Fig. 23.9. Warehousing problem.
219
23. Two-Terminal Characteristics
In the network of Fig. 23.9, the continuity conditions for ti, xi, and y', (1
- y',
=
ti = t i - 1
+
xi
- yi
( i = 2,.
.., m - l),
(23.50)
O=tm-l+Xm-ym,
are to be satisfied (and there is no other constraint imposed upon them). Moreover, the function to be minimized, m
m- 1
m
~ ( x, t ,y ) =i 1 dixi + C f i t i- C eiyi, i= 1 i= 1 = 1
(23.51)
is exactly the total loss. To solve the problem, we may remove the short-circuited branch (connecting the exit directly to the entrance), regarding the network as a two-terminal network, and search for a pair of flow and tension configurations in which the potential difference between the entrance and the exit is equal to zero. Then the flow configuration thus obtained gives a solution. Since the voltage sources of values ei are placed in the direction opposite to the directions of the diodes in series, we cannot adopt (6, q) = (0,O) 0 0
as a starting pair of configurations. However, if we take for q such a 0
tension configuration that all the nodes other than the exit node have an equal potential of sufficiently large negative value, the potential of the exit being null, then obviously, all the branch characteristics are satisfied by (4, q) with 5 = 0. Therefore, we can start the two-terminal algorithm with 0 0
0
5 = 0 as the initial flow configuration (see Remark 23.2). 0
It will be shown, by applying the equivalence transformations in $19 of Chapter IV, that the warehousing problem can be treated in much simpler manner than the general two-terminal problem. We transform the network of Fig. 23.9 as follows. First, we combine the entrance and the exit into one node and remove (by short-circuiting) the diodes placed in series with the current limiters [because the diodes in which the ti's and xi's flow are sufficient to constrain the flows in the current limiters to be nonnegative; transformation of type 2.3(2) in $193. The resultant network can be drawn in the form of a fan of triangles (see Fig. 23.10). Incidentally, the representation of the form of Fig. 23.10 is convenient when we consider the problem of cyclic structure, i.e., when we admit to hold over some xm - ym)after the final mth period and regard it as amount 5" (= tm-' the hold-over to the first period (i.e., we put t1= tm x1 - y'). To the
+
+
220
V. Linear Network-Flow Problems
Fig. 23.10. Another representation of the warehousing problem.
network of Fig. 23.10, we can apply the transformation of type 1, specifically that which we illustrated in Figs. 11.4 and 11.5 ($11 of Chapter 111) to obtain the network of Fig. 23.1 1. Furthermore, the current sources in the network of Fig. 23.11 may be replaced by a single current source of value c which connects the exit directly t o the entrance [transformation of type 2.1(4) and (3)]. Thus, the original problem has been converted into that of obtaining a solution of the two-terminal problem (for the network of Fig. 23. I1 with the current sources removed) which corresponds to the total entrance-to-exit flow of value c. Every branch in the network of Fig. 23.1 1 has the characteristic curve with a downwards semi-infinite vertical segment on the q axis and a horizontal segment starting from a point on the q axis and extending infinitely to the right. Therefore, starting from the null flow configuration (i.e., all 5' = x i = y' = 0), we need solve
..
.ntrance
.. .. Fig. 23.11. Equivalent representation of the warehousing problem.
22 1
23. Two-Terminal Characteristics
the associated minimum-route problem only once. In fact, if the associated problem yields a solution with the maximum separation null, then we may assign c units of flow along the straight path from the entrance to the exit consisting of the diodes only. This corresponds to null purchase and null selling, and hence, null profit (or null cost). If the maximum separation is negative, then we may assign c units of flow along the corresponding minimum route. The maximum separation cannot be positive since there is a path consisting of the diodes alone from the entrance to the exit. Thus, we have seen that we may perform the algorithm of $23.3.2 only once to solve the warehousing problem. Actually, we know more about the problem, i.e., we can construct a solution of the warehousing problem such that each of the selling, purchasing, and holding-over amounts in a period is equal either to zero or to the capacity of the warehouse. SOLUTION ALGORITHMS FOR THE HITCHCOCK TRANSPORTATION PROBLEM AND THE ASSIGNMENT PROBLEM We shall develop the solution algorithms for the problems defined in (1) of $23.4.2. First, let us take up the Hitchcock problem where we shall use the same notations for constants and variables as before. We shall arrange in the tableau of Fig. 23.12 the constants and variables concerned, where 5, or is is the potential at node na or nD, q,,, (= 5, is the tension across the branch connecting norto n,, ,and q (= C0 - 5,n+n+l = is the difference of the potential of the exit node nrP,+,,+,from that of the entrance node no which is equal to the negative of the tension across the reference branch. Since we assume e,,, 2 0, we may adopt the starting configurations in which t = 5" = = Y P= 0, il = ia= is = rl,,, = 0 for all a (= 1, . . . ,m) and fl ( = m + 1, . . . , m / I ) . Then the solution algorithms for the associated minimum-route and maximum-flow problems on the network of Fig. 23.7(a) will be stated as follows if the obvious simplifications due to the special topological structure of the network are taken into account, where we are going to determine the values of the variables corresponding to ( 5 , q ) by modifying the values correspond-
23.4.3.
rs)
c0)
+
i+l
i+l
ing to (5, q) which are given in the tableau of Fig. 23.12. i
i
Solution of the associated minimum-route problem: We adopt the algorithm of $21.3.2, also taking account of Remark 21.9. To begin we set
c,,0 = 0 =
0, if t,, - t p = 0 , for all a,
(23.52)
222
V. Linear Network-Flow Problems
\ to -
...
E
...
. ..
*
.
. .
...
...
. s= -
. ..
.
.
.
5"
\
__
.
'i
...
.
. . .
...
40
...
4m
+n
Fig. 23.12. Tableau for the Hitchcock problem.
and calculate iteratively
+ cap>>
.. ., m )
(23.53.1)
(where the inner min' is taken over those p's for which cap -
> 0) and
Ca i+l
Ca
i+ 1
= min{C,, i
= min{Cp, min i
a
min'(Cp p
i
"(iC,+ l - cap)}
(a = 1,
(p = m + 1, . . .,m + n) (23.53.2)
223
23. Two-Terminal Characteristics
(where the inner min” is taken over those CL’S for which Y p> 0). We shall have for some r
5,
r+l
= 5, (= r
pa),
cs = csr ( E c,)
for all c1 and B.
r+l
Then we replace the old values of 5, and 5, on the tableau by these p:s and tp’s, and also the old values of q and (q,, - e,,), respectively, by
where the min”’ for 9 is taken over those a’s for which sa - Y > 0. (Note that, in the above calculations, the old values of 5 and q do not concern us.) REMARK 23.4. A rough explanation of the above algorithm will be given, but the detailed proof of its validity is left to the reader as an exercise. Since the existence of a solution is assured, i.e., the nonnegative = 0 for every i loop-span condition is a priori known to hold, 5, =
rm+,,+
i
i
so that we omit writing it and set q = 5, E C0. By taking account of Remark 21.9, we can calculate 9 = after all the other [ i s and ts’s have been determined. Those 5,’s for which t B - 5, 0 are set equal to 0 because if
to
0
=-
we put them initially equal to co, we should have them modified into 0 (i.e., 5, = 0) at the next step. Furthermore, we omit in (23.53.2) reference 1
to the spans of the branches connecting the nodes of ‘9I2to the exit because of the nonnegative loop-span condition and (23.52). (Consider also the fact that the spans of those branches are 0 or co.) REMARK 23.5. The contents of the tableau of Fig. 23.12 are somewhat redundant. Indeed, if 0 < FB< cap, then we should have q,, - e,, = 5, - 5, - e,, = 0, if qas - e,, < 0, then lap= 0, and if q,, - e,, > 0, then cap - Ta = 0. The possible patterns of signs in a unit square in the interior region of the tableau are those and only those listed in Fig. 23.13.
Fig.23.13. Sign patterns of the unit squares in the tableau.
224
V. Linear Network-Flow Problems
Solution of the associated maximum-flow problem: We search for a conductive path, i.e., for a sequence of row and column indices ( a o ,/lo, al, PI, . . . , a,, f i r ) such that sao - tao >0 and la0 = V , (23.55.1) p D i - taiDi > 0 and qaiDi- eaiai= 0 ( i = 0, . . . , r), (23.55.2) 5°L'+'Bi> 0 and qai+,si- e,i+,si = 0 (i = 0, . . , r - l), (23.55.3) and tflr - t f l v > 0 (Csr = 0). (23.55.4)
.
Figuratively speaking, starting from the square (containing sao - 5"" and p )in a row a, for which (23.55.1) holds, we proceed in the vertical and the horizontal directions until we arrive at the square (containing t P r- gsr and Ear) in a column 8, for which (23.55.4) holds, where we are permitted to turn from the horizontal to the vertical direction at a square with the sign pattern of Fig. 23.14(a) and from the vertical to the horizontal direction
0, and, therefore, we have found a conductive path, which is formally constructed as follows: 69 = 2 ,
62 = 8 ,
68 = 4 ,
(ao = 4 ,
Po = 8,
= 2,
64=0
or
p1= 9),
and which is indicated in Fig. 23.18 by a dotted line. The amount of incremental flow to be assigned along it is
A t = min(s4 - 5" = 7,
c48 c29
=
- 548 = 00, cz8 = 1, - 5 2 9 = 03, t 9 - t 9 = 1)
1,
r9
and 5, t", 5"', c28 - tZ8,529, are increased by A t = 1, whereas s4 - 5", tZ8,cZ9 - tZ9,and t 9 - t9are decreased by the same amount. It is easy to see that there is no conductive path on the tableau thus modified. Hence, we completed the associated maximum-flow problem. The resulting flow configuration is shown in the tableau of Fig. 23.19. (The tension configuration there will be calculated at the next step.) During the above process, t is increased by A t = 1 1 ,whereas q remains fixed to 0. Hence, we
c48 - t48,
0
have
a1'= A@.,' = q A( *
1
= 0.
0
The next step is to solve the associated minimum-route problem with regard to the flow configuration of Fig. 23.19. Since r a - > 0 for f l = 7 and 10, we initially set , 5 =(2,3,0,3; 3,2,0,3,3,0)=5 2
=
p,
3
and we have by means of (23.54), ti = [, = 3 and the values of qa,, - eaB shown in Fig. 23.19. On the tableau of Fig. 23.19, we search for the conductive path (indicated by a dotted line) which is (ao = 4, Po = 6, a, = 1, PI = lo),
233
23. Two-Terminal Characteristics
and along which
A t = min(,y4 - c4 = 6 , 10
c4p6 - 14,6= 4,
-
10
=
co,
t 1 y 6
t'O
= 3,
- ('0
= 2)
= 2.
If the necessary alterations are made on the tableau, we can no longer find any conductive path. Thus we have completed the associated maximumflow problem with the resulting flow configuration shown in Fig. 23.20.
1
4
1
3
0
Fig. 23.20. Tableau 4.
234
V. Linear Network-Flow Problems
Since q
=3
and A[ = 2, the increment of the cost function Q' is equal to 1
2
3 ~ 2 = 6 . The next associated minimum-route problem yields the tension configuration shown in Fig. 23.20 where the calculation of potentials is:
5 = (a, a,a,00;
00,
a, 0, a,a,a),
0
51 = (396, a,4; 6, 3 , 0 , 4 , 6 , I), 5=(3,4,1,4;4,3,0,4,4,1)=&=0, 3
2
q=
17
1
s s
c4 = 4.
235
23. Two-Terminal Characteristics
In the next associated maximum-flow problem, we find a path (ao = 4, Fig. 23.20, and nothing more. The modifications of the flows along that path give the flow configuration shown in Fig. 23.21 where we see that all the (sa - 5")'s as well as all the ( t B- ta)'s are equal to 0. Therefore, we have arrived at a solution f. (If we solved the associated minimum-route problem further, then we should obtain q = m.) The increment of the cost @' during the last step is q A t = 4 x 4 = 16.
Po = 7) indicated by a dotted line in
3
2
The corresponding total cost is
The solution algorithm for the assignment problem may be simplified further than that for the Hitchcock problem. Since we can perform the solution algorithm in such a way that every tZp is always either 0 or 1 , at most one r pis 1 for each a, and at most one tapis 1 for each p (cf. Remark 23.3), we have only to remember in which column is the nonnull tapin each row, or in which row is the nonnull Fpin each column, i.e., we make use of a vector v = ( v l , . .., vm;v , + ~ ,.. ., v Z m )to describe a flow configuration where v,
=
rP= 1 ,
v,
if Y P= 1,
vB
p if
=0
if
5" =
2m
tap= 0,
(23.62.1)
p=m+l
and v,
=a
m
=0
if tB= 1ys= 0.
(23.62.2)
a= 1
From the theoretical viewpoint, either v, (a = 1, . .., m ) or vB ( p = m + 1, . . . , 201) is redundant (i.e., v, = p if and only if vB = a), but from the practical viewpoint, it is convenient to deal with this redundant information. The entries for q,, - eUBmay be omitted because they are redundant (as was already pointed out). Hence, in solving an assignment problem, we may deal with vectors v for the flow configurations and 5 for the tension configurations, each with 2m components, besides the given cost matrix err,. We start the solution algorithm with all v, = vB = 0. Solution of the associated minimum-route problem: We set
[,,= 0
if vB = 0,
0
=a [,=a 0
if v p # O ; forall a ( = l ,
(23.63)
..., m ) ,
236
V. Linear Network-Flow Problems
is's and la’s by
and then calculate iteratively the
i
i
C,
i+ 1
= min[C,, i
min(l,
+ e,,)]
(a = 1 ,
...,m )
(23.64.1)
min(Cp
+ e,,)]
(a = 1 ,
.. . , m )
(23.64.1’)
p+v,
i
(when we set cap = 1) or
C, = min[Ii,, i
i+ I
/ 3 i
(when we set cap > 1) and by
5,
=
i+l
O), or we proceed to (iii) (in case i = 0). (iii) Set Po = m and l e t j be the smallest number such that [ , o + j = q and v , , + ~= 0 ( j z I , a. +,j 5 m). Then replace a. by a. + j and return to the beginning of (ii). If no such j can be found, we conclude that a conductive path is nonexistent. (iv) Replace p i by p i + j , and set r equal to i. The sequence ( a o , Po, . . ,a,, p,) represents a conductive path. Assigning the unit incremental flow along this path corresponds to setting v,; = pi and vDi = xi for i = 0, . . . , r.
eai
.
This process is repeated until we find an ultimate solution of the problem [in (i)] or a solution of the associated maximum-flow problem [in (iii)].
REMARK 23.10. It should be noted that in the above algorithm, the
pi’s correspond to the +aI)s in Labyrinth Algorithm 2 and the bS’s to part of the IS,’s, whereas we can dispense with the 6,’s because if (and only if) v, # 0, then there is exactly one p such that v,, = a (or v, = p). We can dispense with the signs before the xi’s in Labyrinth Algorithm 2 by virtue of the fact that the direction of the conductivity is evident. The information carried by the 0 ; s is automatically included by the ordering of the p’s. uI)s and
REMARK 23.1 1. In concluding this section, let us add a remark on the computational labor required to solve an H I x nz assignment problem. As careful examination of the algorithm of finding a conductive path (given above) will reveal, no pair (a, fl) is referred to more than once during the labyrinth search, so that we require the labor that is at most proportional to m 2 in order to find a conductive path (cf. Remark 20.5 in $20.3.1). On the other hand, solution of the associated minimum-route problem with regard to a flow configuration with the total number of assignments equal to 5 requires at most + 5) z t3additions and comparisons for the iterative calculation of (23.64.1) [or (23.64.1’)] and (23.64.2), in addition to requiring the labor that is at most proportional to MZ’ for other computations
{(c2
238
V. Linear Network-Flow Problems
(see Reinark 23.9). Therefore, in the worst case where we have to solve rn minimum-route problems, the leading term of the expression of the total amount of labor, i.e., the total number of additions and comparisons, required to solve an H I x I I I assignment problem is nz4/4.
PROJECT SCHEDULING PROBLEM 23.4.4. M INIMAL-COST I n all the examples of application thus far illustrated, " flows" have been given primary physical meanings while tensions have played an auxiliary or secondary role. I n the following. we shall give an example in which tensions arc our primary concern. This problem is a generalization of the one dealt with in 921.5 and it was roughly surveyed in $2 of Chapter 1. We consider a project consisting of a system of jobs represented by a given arrow diagram (cf. $2 and $21.5). As before, a branch of the arrow diagram represents a job, the tension across it represents the negative of the job time of that job, each node represents the event that the jobs corresponding to the negatively incident branches have finished and the jobs corresponding to the positively incident branches are going to start, and the potential at a node represents the time of the corresponding event. We regard the node representing the start of the entire project as the entrance and that representing the completion as the exit, thus making the network a two-terminal network. In addition to this characterization of the network, we shall take into consideration the costs connected with the jobs, i.e., we assume that the cost for a j o b i i to be completed in the time -q, is equal to $"(v],), where $"(q) is a piecewise linear convex function of v] [see Fig. 23.22(a)]. If we Put
5"
4f(~J/dqK
and regard 5" as the flow i n branch b, , then we have the relation between and described by a nondecreasing step-function [see Fig. 23.22(b) and (c)]. Thus we have a two-terminal network of the kind with which we are dealing in this section. The relations among the event times and the job times are exactly like those among the node potentials and the tensions across branches. The difference - q of the potential of the entrance from that of the exit corresponds to the total project time. Therefore, the plan of allocating the times to the jobs i n such a way that the total project cost
1, 0
(24.2)
0
with the (5,q) as the initial configurations [which obviously satisfy the 0
0
CK'(tK, qK)'s]. The two-terminal characteristic curve [which is the set of 0
0
points on the (t', - q l ) plane] is, when drawn on the(t', ql) plane, amonotone nonincreasing step function, which we shall denote by C,, calling it the iriverted tlt*o-terminalCharacteristic of N l . If El intersects C,, then we choose a pair (5,q) corresponding to a point ({I, q l ) ~ C n l C,. 1
I
1
1
[In passing, we need not determine the entire curve C,, but we may stop the calculation as soon as an intersection of and Cl- is found since our aim is to obtain a pair (5, q) such as the above.]
el
1
1
Obviously, (5, q) is a solution for 1
1
.Ir[@; c,,c2'(t2? 0
c.'(5",
q2)7 0
0
?.)I*
(24.3)
0
Then, with (6, q) as the initial pair, we solve the two-terminal characteristic 1
1
problem for
to obtain the inverted two-terminal characteristic curve C2 of choose (5, q) such that (t2,q 2 ) E C2 n C 2 . 2
2
2
N2, and
2
(5, q) is a solution for 2 2
In general, the inverted two-terminal characteristic curve CK+lfor A+1 = "Q;
c,,.
*
f
9
c, , ref., C:+2(tK+2,q2+2), c,ltr.,rJl * * *
K
9
K
K
K
(24.6)
is calculated with
(5, q) as the initial pair, K
K
and (
6,
K+1
q ) is chosen such K + l
247
24. General Linear Network-Flow Problems
that (
tK+',qK+')
K + l
E C ~ n+Cr+l ~ (see Fig. 24.3). Then, ( 6 , q ) is a
K+1
K + l
K + l
solution for
"6; C1, - * * CK CK+1, C:+2(tK+ 9
~,+z),***
3 '
K
Cn'(Y, 1 n ) I
K
K
(24.7)
K
and can be adopted as the initial pair when solving the two-terminal characteristic problem for
(24.8)
---_1 I
I-----
-I
m .
T(I 5"+'. K+l
%+I) I+l
'5""
I
L--, I I
1 L----
Y
cK+,:Inverted two-terminal characteristic of
Fig. 24.3. CKand
Proceeding in this way, if calculate the C, for
N,+I
eK.
E, intersects C,
for
IC
N,= N ( 6 ;C1,. .., Cn-l, ref.)
.
= 1, . ., n
- 1, we (24.9)
6 , q ) as the initial pair. Finally, if enintersects C,, we choose a pair (g, fi) = (6,q) such that (P,1,) E C, n C,. The pair of flow and n n n n tension configurations (f, fi) is obviously a solution for the original with (
n-1 n-1
network JV of (24.1). Thus, by solving the two-terminal characteristicproblem as many times as the number of branches according to the preceding algorithm, we can attain a solution so long as every E, intersects C, . We can show a fortiori that if E, does not intersect C, for a certain K, the nonexistence of the solution is asserted.
248
V. Linear Network-Flow Problems
e,
Let us consider the case where n C, = 0. By virtue of the monotonicity of C, and C,, there are two possibilities, in one of which we have J , n J, = 0 and in the other of which we have I" n I" = 0, where I" (or P) and J, (or J,) are the projections to the 5 and the q axes of C, (or C,), respectively (see Fig. 24.4). Since Jlr, can have no feasible tension configuration if the negative of the tension across the reference branch b, is outside J , , there is no feasible tension configuration in JlrC(r,;C,,...,CK --l)CK)C:+1(
~ , + 1 ) , . . * , C n lr", ( qn>I (24.10)
tK+'7 K - 1
K-1
K-1
K-1
in the former case. Furthermore, for any (t,q), the projection .I,(< q) of , C,'( 0, t" < 0, or t" # 0, respectively. Let us further introduce the symbol 3 to denote the relation between a pair of vectors in V(R, 23) defined by (A2.2):
6 36 1
2
if and only if car'
6 2 car' 6 1
2
and car-
6 2 car- 6. 1
2
(A2.2)
264
Appendix 2
The relation 3 will be called the equisignum inclusion, and has the following property :
6 9 6 for any vector 6 in V(R, b), if 6 3 6 and 6 3 6, then 6 3 6. 1
2
2
1
3
(A2.3)
3
A nonnull vector 6 [E V(R, b)] is said to be minimal in W if 6 E W and if no nonnull vector E,' such that car 6 2 car E,' belongs to W. Obviously, if 6 is minimal in W, so is a6 for any nonnull a in R. The following theorem, which is closely connected with the basis theorem in linear programming, was also suggested by Farkas [l]. Theorem of Equisignum Decomposition. Every nonnull vector 6 in W can be expressed as
6 = E, +
.**
1
where the 4's are minimal in W and
+ E,
(A2.4)
I
6 3 6 for every i.
i
i
To prove the theorem, we first establish the lemma. Lemma. For any 6 in W, there is a 5 such that 6 3 5 and that 4 is minimal in W. PROOFOF THE LEMMA. If 6 itself is minimal in W, then we may put 4 = 6. If it is not minimal in W, there is a nonnull vector E, E W such that 1
car 6 3 car 6,
(A2.5)
1
6 n car' 6 or car- 6 n car- 6 is 1 1 nonempty (because otherwise, we may adopt -6 instead of 5). In this case
where we may assume that either car'
1
1
we can find a maximum positive a (E R) such that 1
(A2.6) and for which we have car 6 z) car 5.
(A2.7)
1
5 belongs to W, and it is not null by virtue of (A2.5). If 51 is minimal in W, 1
265
Equisignum Decomposition of a Vector
then we may put nonnull
5 = 5. If 5 is not minimal in W, we can find similarly a
5 such that
1
1
2
(A2.8)
Proceeding in this way, we have a sequence of nonnull vectors
(6,g, g, ...) in W such that 1
2
6 3g 3g 1
car 6 3 c a r 5 3 c a r < . . .
and
*..
1
2
.
(A2.9)
2
However, the sequence cannot continue infinitely since 23 is finite. Therefore, we have a minimal for a certain I, which we may adopt I
as g. Q.E.D. PROOF OF THE THEOREM. If the given 6 is minimal in W, we may put I = 1 and 6 = 6 to obtain the desired decomposition. If 6 is not minimal 1
in W, the lemma assures that there is a minimal 5 such that we determine the greatest positive number
CI
6 3 6. Then 1
1
such that
1
6 3 6 - CI
6 = g.1
(A2.10)
1 1
5 defined by (A2.10) is then nonnull (if it were null, 6 would have been 1
minimal in W) and satisfies car 6 3 car 5.
(A2.11)
1
If 5 is minimal in W, then we may set 6 = 5 and I = 2 to obtain the desired 1
2
1
decomposition :
6 = c16 + 6. 1 1
2
If 5 is not minimal, we can find a minimal 5 such that g-3 t.and determine 1
2
the greatest positive number
CI
1
2
such that
2
g3g-at3g 1
1
2 2
(A2.12)
2
where 5 is nonnull and satisfies 2
car g 3 car 5. 1
2
(A2.13)
266
Appendix 2
Proceeding in this way, we have a sequence of minimal vectors
(5,5, ...) 1
as well as a sequence of nonnull vectors
0
-
g=O),
i i
F35, i-1
1
2
i
(A2.15)
535, i-1
i
and car 5 2 car 5. i- 1
(A2.16)
I
The sequences, however, cannot continue infinitely because of (A2.16) so that for a certain I, 5 will be minimal. We then set 5 = 5 . From (A2.14), I- 1
I
1-1
we have
and, from (A2.15) and (A2.3),
thus obtaining the desired decomposition by rewriting
CI
6 as 6.
i i
Q.E.D.
i
REMARK A2.1. The equisignum decomposition of a vector is not generally unique. REMARK A2.2. If we adopt the ring of integers as the coefficient domain instead of the field of reals or rationals and if we leave the definitions of the relevant concepts as they are in the foregoing [except for the definition of a submodule M hich should be strengthened by requiring the condition if ~6 E W (M # 0), then E,E W, (A2.1‘) in addition to (A2.1)], then we have the theorem slightly modified as fol I0w s.
5 in W can be expressed as a5 = 5 + + 5,
Theorem. Every nonnull vector
*.*
0
1
I
where a is a positive integer, the 5’s are minimal in W, and i
0
53 5 I
for all i.
(A2.17)
267
Theory of Linear Resistor Networks
The proof will be carried out by extending the coefficient domain to the quotient field (Le., the field of rationals), performing the decomposition in regard to the extended domain, and then clearing the common denominator. Moreover, if every minimal vector is an integral multiple of a simple vector (i.e., a vector each of whose components is 0, 1, or - l), then the theorem holds with no modification. This is verified by recalling that the foregoing proofs (of the lemma as well as of the theorem) are formally valid also in this case since the a’s are determined to be integers. i
APPENDIX 3: THEORY OF LINEAR RESISTOR NETWORKS
Using the terminology of $13.3. of Chapter 111, we shall call a network JI’ consisting of current sources, voltage sources, and linear resistors a linear resistor network. In spite of the adjective “linear,” the convex functions (cp and $) connected with a linear resistor are quadratic functions so that the network problem of this kind belongs to “ quadratic programming” rather than “ linear programming” from the standpoint of mathematical programming. In the following, we shall denote by B,, 23, , or 8,,respectively, the set of current sources, the set of voltage sources, or the set of linear resistors (so that we have 23 = BCu bvu 23,, where 23, n 23, = 23, n 23, = 8,n 23, = @), and by n,, n,, nR, or n the number of elements of dC,dV,23,, or 23 (so that we have n = n, nv n,). Furthermore, we assume that 23, is cutset-free and 23, is loop-free, since otherwise, no feasible flow or voltage configuration will be found if we assign arbitrary values to the current and voltage sources. Then, we can choose a treeon the graph 8 of the given network JI’ such that cotree pair (2,T) 2 2 23, and T 2 BC(see Theorem 9.8 in $9 of Chapter HI), where it is assumed that among the m branches of 2,the first m, = m - n, branches belong to 23, and the remaining n, constitute dV,whereas among the k = n - m branches of T, the first k, = k - n, = nR - m, branches belong to 23, and the remaining n, constitute 23,. As before, the tension across a branch b, will be denoted by q K , the flow in it by r“, and the resistance or
+ +
K
conductance of a linear resistor b,
E 23,
K
by r or g ( r * g = l), respectively. c
K
The value of a current source b, E 23, will be denoted by cK and that of the voltage source b, by eK. (We can assume, moreover, that every linear resistor has a nonnull resistance and a nonnull conductance, because a
268
Appendix 3
linear resistor of null resistance might be regarded as a voltage source of null value or be short-circuited, and a linear resistor of null conductance might be regarded as a current source of null value or be open-circuited.) D," (a = 1 , . ... m ;ti = 1 .. . , n ) and R," ( p = 1 , . . ., k ; ti = 1, ..., n) are, respectively, the primitive cutset matrix and the primitive loop matrix associated with the above-mentioned tree-cotree pair. We then have the set of equations (A3.1)-(A3.5) for P's and qK's (cf. $13 of Chapter IV):
c D&rK = O
(Kh.F.):
( a = 1 , . . ., m)
(A3.1.1)
blcE(B
or k
(Kh.F.) :
r" =p1 R/xP = 1
where x p is equal to the flow in the pth branch of Z (IC= 1, . . . , n ) ; (A3.1.2)
c R/q,
(Kh.T.):
=0
( p = 1 , . .., k)
(A3.2.1)
b,EB
or
c DKaya m
(Kh.T.):
q,
=
where ya is equal to the tension across the ath branch of Z (ti = 1, . ..,n ) ;
a= I
(A3.2.2)
gK = C"
(b,
E bc);
(A3.3)
= eK
(b,
E
%"I;
(A3.4)
YIK
K
K
gl( = g V K
(O <
0) be 81,. (If 4, = 0, there is no problem and we assume 9, # 0.) From the formula dual to (A3.1 l), it follows by superposition that IAq,J-+O
as E + O .
Fig. A3.2. Approximation of a current source by a linear resistor.
(A3.20)
214
Appendix 4
Let us note that the flow configuration and the tension configuration corresponding to cK= E * sgn 4, are equal to those which we shall obtain when we replace the current source bK by a linear resistor of resistance (4, + A ~ J E (cf. Theorem 16.1 in $16.2 of Chapter IV; see Fig. A3.2). Therefore, it follows from what we have just proved that
19, + AVKI 5 IeAoL
(A3.21)
from which follows, in view of (A3.20),
(A3.22) APPENDIX 4: DIGITAL AND ANALOG COMPUTATIONS
The reader who has some knowledge of computer programming will easily understand that the algorithms in this book for solving various problems concerning linear network-flow problems are presented in the form readily programmable for a digital computer. As an example, we shall exhibit a program for solving the two-terminal characteristic problems in $23, which is written in FORTRAN and is registered in the Program Library of the Computer Centre of the University of Tokyo. The names of variables used in this program do not always coincide with those we have adopted i n this book, but we believe that a program which has been debugged by many users will better serve the readers than one which, although being formally refined, might possibly contain bugs. In the following program, all the quantities, except for the variables POWER1 and POWER2 representing the values of the objective functions (D(5) and V(q), are expressed by the fixed-point (or integer) variables to get rid of the influence of rounding-off errors. Furthermore, it should be noted that the “internal branches” are to be numbered from 1 to n in the following program, whereas in Chapter V, we almost always reserved the branch b, for the “reference branch.” To use the memory space more efficiently and to remove the unessential limitation on the number of corner points of a characteristic curve, it is recommended to rewrite the program so as to replace the two-dimensional arrays JBRCHR and JBRNCH by onedimensional arrays. Furthermore, the suitable checks for input data as well as the rearrangement of the output forms (in subroutines RESULI, RESUL2, and RESUL3) might become necessary, depending on circumstances. The remarks on the usage as well as the limitations concerning the program are written on the comment cards preceding the main program, where the terms “current” and “voltage” are used for “flow” and
275
Digital and Analog Computations
“ tension ” (“ potential” being also called “ voltage ”), “ source ” and “sink” for “entrance” and “exit.” The meanings of the variables and of the subroutines used in the program are as follows (cf. the notations in $20- $23 of Chapter V) :
Simple Variables
POWER1 : POWER2 : NDNO: JBRNO : INND : JOUTND : JPRINT: INCR: I NVL :
JPRECR: JPREVL: INF:
the value of the objective function (D(5). the value of the objective function Y(q). the number of nodes in the network. the number of (internal) branches in the network. the node number, i.e., s, of the entrance node ns. the node number, i.e., t, of the exit node nt . the index for printing the intermediary results (see the comment cards preceding the main program). the entrance-to-exit flow, or the flow in the reference branch, i.e., the negative of the tension across the reference branch, or the where we assume potential at the entrance, i.e., u = [,= 0. the entrance-to-exit flow at the previous stage. the potential at the entrance at the previous stage. the large number, i.e., 999999, representing the infinity (co or 0).
r.
c,,
Subscripted Variables or Arrays
NDSTA(K) : NDEND(K) : JBRCR(K): JBRCPP(K) : JBRCPM(K) : JBRVL(K): JTHP(K) :
the node number c1 of the node nu = a+ b, which is positively incident to the Kth branch b, . the node number c1 of the node n, = a-b, which is negatively incident to the Kth branch b, . the flow 5” in the Kth branch b, . the capacity AcK in the positive direction of the Kth branch b, in regard to the incremental flow when solving the associated maximum-flow problem. the capacity -Ab“ in the negative direction of the Kth branch b, in regard to the incremental flow (see above). the tension q, across the Kth branch b, . the t, for the Kth branch b, used when solving the associated minimum-route problem (see Remark 23.2).
276
Appendix 4
the - d , for the Kth branch b, (see Remark 23.2). the number of branches ( S + n a u 6-n,) incident to the JAth node n,, i.e., the p a used in Labyrinth Algorithm 2 in Remark 20.4. the potential [, at the JAth node n,. NDVL(JA) : the ai in Labyrinth Algorithm 2, where the sign before JROUTE(1): the aiis ignored in the following program (subroutine CURINC), but the direction in which a branch lies on a conductive path is determined later when the maximum possible value of the incremental flow along the path is calculated. JBRCHR(J, K) : the numbers specifying the characteristic curve of the Kth branch, where JBCHR(1, K) is the abscissa of the leftmost semi-infinite vertical segment, JBRCHR(2, K) the ordinate of the left horizontal segment, JBRCHR(3, K) the abscissa of the middle vertical segment, JBRCHR(4, K) the ordinate of the right horizontal segment, and JBRCHR(5, K) is the abscissa of the rightmost semi-infinite vertical segment (see Fig. A4.1). JBRNCH(JW, JA): the branch number IC of the branch b, which is the JWth in order in the set 6+n, u d-n, of branches incident to the JAth node n, [if bKE6-n,, JBRNCH(JW, JA) is equal to the negative of the branch number of that branch].
JTHM(K) : JORDER(JA)
t
I
JBRCHR(4, K )
_-JBRCHR(1, K )
1
I I
= r,JBRCR(K) / JBRCHR(5, K ) JBRCHR(3, K ) JBRCH R(2, K )
Fig. A4.1. Specification of a branch characteristic.
Digital and Analog Computations
277
Subroutines RESULl, RESUL2, RESUL3 : the subroutines for printing the intermediary and final results in full or in abbreviated form. RESCAP : the subroutine for determining the J BRCPP(K)'s and JBRCPM( K)'s (i.e., the Ac"'s and -Ab"'s) corresponding to a given (compatible) pair of flow and tension configurations (see 923.2). THETA: the subroutine for determining the JTHP(K)'s and JTHM(K)'s (i.e., the 2"'s and -2,'s) corresponding to a given (compatible) pair of flow and tension configurations (see Remark 23.2). VOLINC : the subroutine for solving the associated minimum-route problem according to Eq. (23.10) in Remark 23.2, where a variant of the successive replacement (see Remark 21.8) is made use of. CURINC: the subroutine for finding a conductive path for the incremental flow according essentially to Labyrinth Algorithm 2 (see Remark 20.4) and assigning the maximum possible incremental flow along it (the associated maximum-flow problem is solved by the repeated application of this subroutine). Linear Two-Terminal Network-Flow Problem (FORTRAN Program)* Today's electronic digital computers are fast enough and powerful enough to deal with large-scale network-flow problems with sufficient accuracy in a manageable time, so that there will be no room for analog computers in practical computations. However, the discrepancy between a practical transportation or scheduling problem and its mathematical model is usually so large that only a limited accuracy is needed in solving the mathematical model. It will often be required to observe on real time how the flow or tension in/across a branch varies according to the variation of the parameters (i.e., capacities, costs, times, etc.) of some branches. On
* A reproduction of the program card deck is found on pages 280-287 at the end of this appendix.
278
Appendix 4
such occasions, an analog computer for solving network-flow problems will be of some use, or at least of “ instructive” significance. Historically, the Scott Paper Company constructed in the late 1950’s an analog computer called A L-PAC that can solve the uncapacitated Hitchcock transportation problems (cf. $23.4) with less than 25 producers and less than 108 consumers (see McCarty and Elmore [l]), and there is also a report about one for the project-scheduling problems (see Mauchly [l]). The present author once constructed a small model for instructive use (see Iri [Z]) which consisted of 14 diodes, 40 voltage sources of unit value, 10 current limiters (each with a diode connected in series) of variable value, and a patch-board with plugs and cords to interconnect these elementary branches. All the parts were those available on the market in Japan, i.e., we used ordinary gold-bond germanium diodes (SD14) for diodes, ZnNH,CI cells (UM5) for voltage sources, and the circuits of Fig. A4.4(a) containing high-frequency germanium transistors (2SA17) for current limiters. Their circuit diagrams as well as their measured characteristics
2vt 1
(a)
VL
(b)
Fig. A4.2. Circuit diagram of a diode and its measured characteristic.
(a)
(b)
Fig. A4.3. Circuit diagram of a voltage source and its measured characteristic.
279
Digital and Analog Computations
are shown in Figs. A4.2-A4.4. It will depend on the circumstances as to whether one regards these characteristic curves as good approximations of the ideal ones or not.
(4
(b)
Fig. A4.4. Circuit diagram of a current limiter and its measured characteristic.
280 C177
Appendix 4 H 1 I T C I N T W K L I N F P R TWO-TcRMIN4L
NFTWORK-FLOW
PROBLEM
C t C C
L I N F A R TWO-TFRMIN4L NFTWnRK-FLPW P R O R L F Y M4S4O 1013 KYOKO O K t I D A I R 4 12/1/66
C
C C C C C
C C
C C
C C C C
C C
C C C C
C C
C C C
C C C C C C C C
C C C
C C C
c C C C C
C C
C
c
C
C C
C C C
C C C C C C C C
C C
c C C C
C
T H I S PROGR4MME MUST 9s PROCFSSFO RY A M A C H I N F W I T H 4 MEMORY OF MORE THAN 78.70a FFFECTIVE WORDS. GFNERALITY S F C T I O N 1. T H I S PROGRAYME T R E A T S 4 G F N E R 4 L C 4 S E O F L I N E A R TWO-TERMINAL NFTWORK-FLOW PROSLEY. FOR T H F D E T A I L S O F T H E S I C N I F I C 4 N C E 6F T H E P Q O S L F H A 5 WELL P S FOR TMF R A S I C I D F A Z O F T H E S O L U T I O N A L G O R I T H M T H E USFR SHOULD R E F E R T O T H F D A D F R A NEW YETHOD O F S O L V I N G TRANSPORTATION-NFTWORK PROSLEMS T\Y H . I R I D U S L I S H E O I N THE JOURNAL O F T H E O P F R 4 T I O N S RCSFPRCH S O C I E T Y O F J ~ P A N I V O L ~ ~ r N O ~ l / 2 l O C T O P E1 9R6 0 1 . P~FS 27-n~. D F F I N I T I O N AYD S D F C I F I C b T I O N S O F T H E PROSLEM S C C T I O N 7. I N F L E C T R I C A L TFRMINOLOGY. THC P R O S L F H IS TO O R T A I N T H E VULTAGECURRENT R F L A T I O N BETWEEN A D A I R O F NODES I O Y E C A L L E D SOURCE AND THE OTHER S I N K ) O F A N O N - L I Y F A R R E S I S T O R NETWORK* E A C H O F WHOSE BRANCHES H A S A C H I R A C T E R I S T I C SUCH THAT THE R F L A T I O N BETWEEN T H E V O L T A G E ACROSS A N 0 T H F CURRFNT I N IT IS R E P R F S F N T E O B Y A MONOTONF NONO F C Q E d S I N G S T E P F U N C T I O N ON T H E PLAhlE W I T H THE CURRENT A N 0 T H E T H E PRESENT V E R S I O N O F V O L T d G F AS T H F A S S C I S S 4 4ND THF O R D I N A T F . T H F PQOGRAHHE CAN O F A L OWLY W I T H T H c S T E P F U N C T I O N S H A V I N G TWO H O Q I Z O N T A L SEGMENTS I A N 0 HENCE THREF V F R T I C A L SEGMENTSI ONE O F W H I C H GOF5 I N F I N I T E L Y UPW4RDS 4ND ANOTHER I N F I N I T E L Y OOWNWAROS). A STEP F U N C T I O N O F T H I S K I N D IS S P E C I F I E D 9 Y 4 SEOUENCE O F F I V E NUMRERSr O F W H I C H T H F F I R S T OFNOTES T H E A R S C I S S 4 OF THC L E F T M O S T V E R T I C P L SFGMFNT EXTENOINCI I N F I N I T E L Y DOWNWAR05 ( T H I S V A L U E IS SET EQUAL TO THE N F G A T I V F I N F I N I T Y I = - 9 9 9 9 9 9 9 1 I N CASE THE L E F T H O R I Z O N T A L SCGMENT F X T C N D S I N F I N I T F L Y TO T H F L F F T I . THC SFCOND DENOTES T H E O R O I N A T F O F THE L E F T 1I.F. L O W F R l H O R I Z O N T A L SEGMENT* T H E T H I R D D F Y O T F S T H F 4 R S C I S S A O F T H F M I O D L F V F R T I C A L SFGMENTI T H F F O U R T H DFNOTES T H E O R D I N 4 T F OF T H E R I G H T 1I.F. U P P E R ) H O R I Z O N T A L SEGMENT P N O T H F F I F T H DENOTFS T H F A q S C I S S A O F T H E R I G H T V E R T I C A L SEGMENT I T H I S V I L U F I S S F T FOUPL TO THF P O S I T I V F I N F I N I T Y I = 9 9 9 9 9 9 9 1 I N C 4 S F T H F R I G H T H O R I Z O N T A L SFGYFNT F X T F N D S I N F I N I T E L Y . T O T H E R I G H T I . I F T H F NUHRFR O F SFGHFIITS I5 L F S S THAN THAT M E N T I O N E D ABOVFI T H E NUM9ERS TOW4R9S T H F FN? nF T H F SFOUFNCF SHOULD R E P U T F O U A L TO T H E I N F I N I T Y I F O R FXAMPLFI 1-51017/9999999/9999999/ IS L E G A L SUT 1 - 5 1 0 1 4 IS N O T I . T H F R F S T R I C T I O N ON T H E NUMRER O F / C 1 7 / OR 1 - 5 1 - 3 / - 5 / 0 / 7 / S T C P S O F A F U N C T I O N IS NOT F S S F N T I 4 L . FOR 4 3 R 4 N C H W I T H A MORE C O M P L I C b T F O C F A R A C T E R I S T I C I 1.F. A RRANCH WHOSE C H 4 R A C T E R I S T I C IS A STEP-FtJNCTION d I T H MORF T H A N TWO H O R I Z O N T A L SEGMENTS* CAN 9 E COPPOSFO P Y C O N N C C T I N G I N S F R I F S 4ND/OR I N P A R A L L E L TWO, OR MORE. RRANCHFS W I T H S I M P L F R C H 4 R A C T E Q I S T I C S . THE MOST E S S E N T I A L C O N D I T I O N S W H l C H T H F PROCIRAMMF ASSUMFS A Q F AS FOLLOWS. F I R S T . THE C H d R d C T F R I S T l C S T E P F U N C T I O N O F 4NY SRANCH SHOULD H A V E A V F R T I C A L SFGMENT W I T H N U L L A B S C I S S A OR P H O R I Z O N T A L SEGMENT P A S S I N G T H E ORIGIN. T F C O N D I T H F R F SHOULD F X I S T P V O L T 4 G E C O N F I G U R A T I O N ( I . € . A S F T O F V A L U F S OF RR4NCH V O L T A G F S I S P T I S F Y I N G 4 L L T H E RRANCH C H I R A C T F R I S T I C S I N P A I R W I T H THE N U L L CURRENT C O N F I G U R A T I O N 1I.E. HOWEVERI T H F SET OF SRANCH CURRFNTS F A C H R E I Y G FQUAL TO ZERO). T H F S E C O N D I T I O N S PRE S A T I S F I F O SY ALMOST A L L T H E P R O B L E M WE 1 Y P A R T I C U L A R . MAXIYUM-FLUW PROBLEMS. D Q O I N A R I L Y FNCOUNTEQ. T Q 4 N S P O R T A T I O N P R O S L F M S t SHOQTCST-ROUTE PROSLFMSe C R I T I C I L - P A T H S C H E D U L I N G PRORLEMSI ETC.. I N O P E R A T I O N S RESEARCH S 4 T I S F Y T H E S E C O N D I T I O N S ( S E E S F C T I O N S 7. R. 9 4 N 0 101. S F C T I O N 1. R E L A T I O N TO Y I N I M l Z 4 T I O Y P R O B L E Y S T H E CURRFNT C O N F I G U R d T I O N 1I.F. T H F S F T OF V A L U E S O F BRANCH CURRENTS1 CORRESPONDING T O P C F Q T 4 I N V d L U E O F T H E I N P U T CURRENT 11.E. T H F O V F R 4 L L SOURCF-TO-SINK CURRENT1 COMPUTED B Y T H I S PROGRAMME IS T H E ONF TH4T. S A T I S F Y I N G THF C O N T I N U I T Y C O N D I T I O N O F CURRENTS 1I.E. T H E CURRENT LAW O F K I R C H H O F F I W I T H T H A T I N P U T CURRENT, M I N I M I Z F S T H E P R I M 4 L POWCRv WHFRE THC P R I M A L POWER A S S O C I A T E D W I T H 4 CURRFNT C O N F I G U R A T I O N IS n E F I N E D AS T H F SUM OF T H E RRANCH P R I M A L POWFRS ANT) T H F RRANCH P R I M A L POWER OF 4 BRANCH IS A F U N C T I O N I O F THE CURRENT I N T H 4 T PRANCH) FROH W H I C H T H F F U N C T I O N O F THE B R 4 N C H C H A R A C T F R I S T I C I W I T H THE CUQRENT PEGAROEO A S T H E I N D E P E N D E N T V A R I A B L E PND T H E V O L T d G E A S T H F D E P F Y D E N T l IS O B T A I N E D BY OIFFERFNTIbTION.
NTWKO000 NTWKOOOI NTWKOOO~ N T W K 0 005 NTWKOLO6 NTWKOb07 NTWKOOOB NTWK0009 NTWKOOIO NTWK0013 NTWK0016 NTWK0019 NTWKOOZ2 NTWKOO25 NTWKOO28 NTWK0031 NTWKOO34 NTWKOd37 NTWK0040 NTWKO043 NTWK0046 NTWK004C NTWKOO52 NTWKOG55 NTWK0058 VTWK0061 VTWK0064 NTWK0067 NTWK0070 NTWK0073 NTWKO076 NTWK0079 NTWKOO82 NTWKOO85 NTWKOO88 NTWK0091 NTWK0094 NTWK0097 NTWKO100 NTh’KOlOJ NTWKOlO6 NTWKOlO9 NTWKOll2 NTWKO115 NTWKO118 NTWKOl2l NTWKO 1 2 4 NTWKOlZ7 NTWK0130 NTWK0133 NTWK0136 NTWK0139 NTWKO142 NTWKO145 NTWK0148 NTWKOl51 NTWK0154 NTWK0157 NTWKO 160 NTWKOl63 NTWKO166 NTWK0169 NTWK0172 NTWK0175 NTWKO178 NTWKOl8l NTWK0184 NTWKO 1 8 7 NTWKO190 NTWK0193 NTWK0196 NTWK0199 NTWK0202 NTWK0205 NTWKO208
Digital and Analog Computations C C C C C C C C C C C
c C C
C C C C C C
C C C C C
C
c
C
C C C C C C C C C C C C C C C C C C
c
C c C C
C C C C
C
c c
C C
C
c C C C C C
T H E V O L T A G F C O N F I G U R A T I O N 1I.F. T H E SET O F V A L U E S O F BRANCH VOLTAGCS) CORRFSPONOINC TO A C F R T A I N V A L U E O F T H E I N P U T V O L T A G E 1I.E. T H E P O T E N T I A L D I F F E R E N C E BETWFEN T H E SOURCE NODE AND THE S I N K NODF) COMPUTE0 B Y THIS PROGQAMYF IS THE ONE THAT, S T A T I S F Y I N G THE T H E V O L T A G E LAW O F K I R C H H O F F I C O N T I N U I T Y C O N D I T I O N O F V O L T A G E S 1I.E. W I T H THAT I N P U T VOLTAGE. L I N I Y I Z F S T H E D U A L POWER. WHERE T H E D U A L DOWFR A S S O C I A T E D W I T H A V O L T A G C C O N F I G U R A T I O N IS D E F I N E D A S T H E SUM OF T H E SRANCH D U A L POWFRS AND THE RQbNCH O V A L POWER O F A RRANCH IS A F U N C T I O N ( O F T H E VOLTAGE O F THAT R R A N C H I FROM W H I C H T H E F U N C T I O N OF THC BRANCH C H b R A C T E R I S T I C [ W I T H T H F V O L T A G E AS THE I N D E P E N D E N T V A R I A R L F AYD T H E CUQRENT A S THE D F P E N D E N T I 1 5 O B T A I N E D 3 Y OrFFCRFNTlbTION.
NTWKO211 NTWKO2 14 NTWKO217 NTWK0220 NTWKO223 NTWK0226 NTWKO229 NTWKO232 NTWK0235 NTWK0238 NTWK0241 NTWKO244 NTWK0247 S F C T I O N L. NTWK0250 O U T L I N F O F THE C O M P U T A T I O N A L MFTHOD NTWK0253 T H I S DROGRAMME S T A R T S W I T H THF N U L L CURRFNT C O N F I G U R A T I O N AND COMPUTES T H E VOLTAGE C O N F I G U R A T I O N AND T H E CURRENT C O N F I G U R A T I O N NTWK0256 A L T E R N A T E L Y I N SUCH A WAY T H A T THE I N P U T V O L T A G E OR T H E I N P U T NTWK0259 NTWKO262 CURRENT I N C R E A S E S I N EVCQY STAG=. R C S D F C T I V E L Y I U N T I L EITHER THE NTWK0265 I N P U T VOLTAGE OR THE I N P U T CURRFNT IS NOT I N C R E A S E D ANY YORE* I.€. U N T I L T H E F N O O F T H E F F A S I B L E R F G I O N IS REACHED. THE I C U R R E N T AND/ NTWKO268 OD V O L T A G E ) C O N F I G U R A T I O N CV?RFSPONOING TO AN I N T E R M E D I A T E VALUE O F N T W K O 2 7 1 T H E 1NClJT CURRFNT OR V O L T A G E I I N T E R V F O I A T F SETWEEN TWO COMPUTED NTWKO274 NTWK0277 R F S U L T S I MAY BE O R T A I N F D B Y T H F L I N E A R I N T F R P O L A T I O N . F X C F P T FOR T H E P R I M A L POWER A N 0 T H E O U A L DOWERI A L L T H E V A R I A B L E S NTWKO28O NTWKO283 I N T H I S PROGRAMME ARE O F I N T E G E R TYPF. SO T H A T I T IS NECESSARY TO I N T R O D U C F A P P R O P R I A T F S C A L E F A C T O P S =OR 9 E S P E C T I V E Q U A N T I T I E S . NTWKO286 NTWK0289 SFCTION 5. D A T A CARDS AND OUTDUT NTWKO292 NTWK0295 T H E DATA CARDS FOR T H I S PROGRAMME SHOULD B E ARRANGE0 A S FOLLOWS. NTWKO298 ON THF F I R S T CARD, THE NUVRER O F YODFSI THE NULBER O F PRANCHESI T H F NODF NUMqER O F T H E SOURCE NODFI T H F NODE NUMRER O F T H E S I N K NOOF R T W K O 3 0 1 NTWKO304 AND T H F I N O F X FOR P R I N T I N G AQE PUNCHED I N T H I S ORDER R Y F O R M A T 1 4 1 8 r ? o X ~ I l l . I F O N L Y T H F C 0 4 F I G U Q A T I O N AT T H E F I N A L STAGE O F T H E NTWK0307 NTWK0310 C O ~ D U T A T 1 r ) N IS N F E D F D THE I N O E X FOQ D R I N T I N G IS S E T EQUAL T O 0 ( O R MAY B E L F F T B L P N K I . I F . I N A O O I T I O N I THE P R I M A L AND T H E D U A L POWER NTWK3313 O F I N T F Q P E D I A R Y S T A G E S O F T H E COMPUTATION ARE NEEDED I T IS SET EQUAL N T W K 0 3 1 6 TO 1 . AND I F A L L T H F CURQENT A W VOLTAGE C 9 Y F I G U R A T I O N S AT THE NTWK0319 THE NTWKO322 I N T ~ R M C D I A R YS T A G F S ARE NEEDED I T IS SET E Q U A L TO 2. NTWK0325 COMPUTATION IS C A R R I E D OUT WORF E F F I C I E N T L Y I F THE NODES ARE NUMRERFO I N T H F ASCFNDINCI OQDER FROY T H E S I N K T O T H E SOURCF I W H I C H I NTWKO328 HOWEVFR. IS NOT O R L I G A T O Q Y I . NTWK0331 ON T H E S U C C E E D I N G CAROSr THE BRANCH NUMBER. THE NODE NUMBER O F THE N T W K 0 3 3 4 NOOF FROM W H I C H T H F P R I N C H STARTS, T H F NODF NUMSER OF THE NODE AT NTWK0337 W H I C H T H F RRANCH F N n S AND T H F SFQUCNCE O F F I V E I N T E G E R S W H I C H NTWK0340 NTWKO343 S D C t I F Y THC C H A R A C T F P I S T I C OF T H F SRANCH A Q F PUNCHED I N THIS ORDER RY F O R M A T I R I R I . F A C H CARD C O N T A I N S T H F I N F O R M A T I O N S FOR ONE BQANCH. N T W K 0 3 4 6 THF OROCR O F C a R D S AND T H b T O F RRANCH NIJMPFRS MAY NOT N F C E S S A R I L Y P F N T W K 0 3 4 9 C O I N C I D E N T SO LONG AS THE BRANCHFS ARF NUM'IERED WITHOUT O U P L I C A T I O N N T W K O 3 5 2 OR VACANCY. NTWK0355 T H E 4 9 0 V c SLOCK O F CAROS I I T S NUMPFR IS F Q U A L TO THE NUMPER O F NTWK0358 'IRANCHFS P L U S I1 C O N S T I T U T E S THE NECFSSARY AND S U F F I C I E N T D A T A FOR A N T W K 0 3 6 1 PRO'ILFM. I F ONE WbNT5 T O S P L V F MORE THAN ONE PRORLEM I N A RUN, ONE NTWK0364 MAY MERFLY S T A C K T H E B L O C K S O F DATA CARDS FOR THOSE PROBLEMS. NTWK0367 NTWK0368 I T IS RECOMMENDFD T O AOD A RLANK CART) AT THE E N 0 OF THF D A T A CAQD DECK. NTWK0369 T H E F O L L O W I N G IS AN F X A M P L E O F A RLOCK O F D A T A CAROS FOR A PROBLEV N T W K 0 3 7 0 W I T H 6 NOOFS AND 7 PRANCHFS. NTWK0373 0376 7 5 1 2 0379 5 1 5 4 -1 -1 0 1 1 0382 2 5 ? -1 -7 0 ? 2 0385 3 4 2 -1 -1 0 1 1 0388 4 4 % -1 -7 0 1 1 0391 7 a -1 -1 0 2 1 0394 5 6 3 1 -1 -2 0 4 1 0397 7 2 1 -1 -4 3 2 2 0400
0403 0404
c
C C C
c C C C
28 1
S F C T I O N 6. R F S T Q I C T I O N S O F T H E DRFSCMT V E R S I O N OF T H F PROGRAMMF THE PQOGRbMPF M b K F S NO CHFOUF FOR T H F Y O N O T O N I C I T Y OF T H F RRANCH C H A R A C T C D I S T I C S NOR FOR THE D U D L I C A T I W OR THE VACANCY O F NODE AND QDANCH N U M R ~ Q 5 , YOR FOQ qTHER K I N D S O F I L L C G I T I M A C Y O F PRO'ILFM SPFCIFICATIOYS. T H r R F S I I L T Z FOR THF I L L E G A L D A T A ARE UNOEFINED. R F S I D F S THE R E S T R I C T I O Y S W F Y T I O N F O I N S F C T I O N 2 9 THE PRESENT V F R S I O N O F T H F P R O t R A V M F DOES NOT 4 D V I T T H F PROSLEM W l T H YORE THAN
NTWKO406 NTWK0409 NTWK0412 NTWK0415 NTWK0418 NTWK0421 NTWKO424
282 C
c c C
c C
c C
c C C
c C
c c C t
c c t C
C
c C c C
C
C C C
c C C
C
c
c c
C
c r
Appendix 4
1000 RRANCHES OR W I T H WORE THAN 501) NODES. ( B U T . T H I S MAY B E F R E E D FOOM @Y S I M P L Y R E W R I T I N G T H C D l M F N S l O N STATEMENTS A T THE B E G I N N I N G O F T H E M 4 1 N PROGR4MME I F T H F MFMORY C A P A C I T Y O F T H E P V A I L A R L E MORFOVFR. THE 4AXIMUM NUMRER O F RRANCHES CnMPUTcR 1 5 LARGF.1 (HOWFVFR. WF CAN F R E E I M C I O F N T TO A N O n F IS L I M I T C O W I T H I N 20. O U P 5 E L V C 5 FROM T H I S L I M l T 4 T I O N SY I N T R O D U C I N G F I C T I T I O U S NODES AND "FtANCHFS I N MOST CAqES.1
NTWK0427 NTWK0430 NTWK0433 NTWK0436 NTWK0439 NTWKO442 NTWK0445 NTWK0448 q F C T l O N 7. A P P L I C A T I O N TO A MAXIMUM-FLOW PRO3LEM NTWK0451 THE SFOIIFNCE OF F I V E NUMBFPS R E P R C S F N T I N G THE C H A R A C T F R I S T I C OF A NTWK0454 m9ANCH I S T O R E PUT EOUAL TO T H F N F G A T I V E OF THE C A P A C I T Y O F THE NTWK0457 ROUTE I N THE N F G A T I V E O l O E C T l O N . 0 9 THC C A P A C I T Y I N THE P O S I T I V E NTWK0460 DIRECTIONI I N F I N I T Y l = 9 9 0 9 9 0 9 1 AN0 I N F I N I T Y ( = 9 9 9 9 9 9 9 1 . THE I N D E X NTWK0463 THE I N P U T CURRENT I N THE F I N A L C O N F I G U R A T I O N N T W K 0 4 6 6 FOR P R I N T I N G MAY B E 0. 1 5 EOUAL TO T H E MAXIMUM F C A S I R L E FLOW FROY THE SOURCE TO THE S I N K , NTWKO469 AYO T H F BRANCH CURRENTS T O T H E F L W S I N THE R E S P E C T I V E ROUTES. NTWK0472 THOSE FIRbNCHcS WHOSF V O L T 4 G c S ARF FOUPL TO 9 9 9 9 9 9 9 (OR - 9 9 9 9 9 9 9 1 NTWK0475 r n N S T l T U T F T H F CUT-SFT '0 T H F Y I N I M U M CUT V 4 L U E 4NO A L L O F THEM ARE NTWK0478 SATURATCD. NTWK0481 NTWKO484 4 P P L I C A T l O N TO b YINIMUM-COST T R A N S P O R T A T I O N PRORLEM SFCTION 0 . NTWKO487 THE CURRFNT I N A RRANCH I5 COVPARcT) TO T H F FLOW OF COMMODITY I N NTWK0490 CORRESPONOIYG ROUTC. THC P R I M A L POWFR I S K W A L TO T H F T O T A L COST. NTWKO493 T H F SEQ'IFNCF O F F I V E NUMSERS R F P R E S N T I N G T H E C H A R A C T E R I S T I C O F A NTWK0496 RPANCH 1 5 TO E F P U T EOUAL TO T H E N E G A T I V E OF THE C A P A C I T Y O F THE NTWK0499 ROUTE I N THE N F G A T I V E D I P F C T I O N . THE N F G A T I V E O F T H E COST PER U N I T NTWK0502 NTWKO505 FLOW I N THE N E G A T I V F D I R C C T T O N v Z F R O t THE COST PER U N I T FLOW I N THE P O S I T I V F O I R E C T I O N ANO THE C 4 P A C I T Y I N THE P O S I T I V E D I R E C T I O N . THE NTWK0503 I N P I I T CURRCNT CORRcSPONOC TO THE T O T A L FLOW THROUGH T H F TRPNSPORTANTYK0511 I F T H F M 0 5 T FCONOMICAL NTWK0514 T l n N NFT#OOC FQOM THE SOIIRCF TO T H F q I N K . W4YS OF T R 4 N S P O R T I N G COYMOOITY 4RE NFFOFD FOR V A R I O U S V A L U E S O F NTWK0517 I F THE NTWKO520 TOTAL FLOW, T H F I N D E X FOO P R I N T I N G IS TO R F S F T F Q U 4 L TO 2. VALUE O F T H F T O T A L FLOW IS F l X E n TO P G I V E N VALUE, I T IS RFCOMYENOEO NTWKO523 TO AUGMFNT T H F G l V F N NFTWORK W I T H A F I C T I T I O U S SOURCE AND A NTWK0526 F I C T 1 T l r ) U S ROUTE. W H I C H L 4 T T C R . S T A R T I N G F 9 0 M T H F F I C T I T I O U S SOURCF N T W K 0 5 2 9 A N 9 E N O I N G AT T H F R F A L S O U R C F I HAS T H F N U L L C I P A C I T Y I N T H F N E G A T I V F N T W K 0 5 3 2 D I P F C T I O N . THE C A P A C I T Y I N THE P O S I T I V E D I R E C T I O N EQUAL TO THE G I V E N N T W K 0 5 3 5 NTWK053R TOTAL FLOW V A L U E AN0 THE N U L L COST, ANO THFN TO SOLVE THE PRORLEM FOR THF AUGMFNTEO NETWOQK W I T H THE I N D F X FOR P R I N T I N G SET FQUAL TO O.NTWK0541 NTWK0544 S F C T l O N 0. 4 P P L I C A T I O N TO A SHORTF