David G. Luenberger, Yinyu Ye - Linear and Nonlinear Programming International Series Episode 1 Part 8 pdf

25 337 0
David G. Luenberger, Yinyu Ye - Linear and Nonlinear Programming International Series Episode 1 Part 8 pdf

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

6.7 Minimum Cost Flow 165 found. In terms of network concepts, one looks first for an end of the spanning tree corresponding to the basis; that is, one finds a node that touches only one arc of the tree. The flow in this arc is then determined by the supply (or demand) at that node. Back substitution corresponds to solving for flows along the arcs of the spanning tree, starting from an end and successively eliminating arcs. The Simplex Method The revised simplex method can easily be applied to the generalized minimum cost flow problem. We describe the steps below together with a brief discussion of their network interpretation. Step 1. Start with a given basic feasible solution. Step 2. Compute simplex multipliers  i for each node i. This amounts to solving the equations  i − j =c ij (13) for each i j corresponding to a basic arc. This follows because arc ij corresponds to a column in A with a +1atrowi and a −1atrowj. The equations are solved by arbitrarily setting the value of any one multiplier. An equation with only one undetermined multiplier is found and that value determined, and so forth. The relative cost coefficients for nonbasic arcs are then r ij =c ij − i − j  (14) If all relative cost coefficients are nonnegative, stop; the solution is optimal. Otherwise, go to Step 3. Step 3. Select a nonbasic flow with negative relative cost coefficient to enter the basis. Addition of this arc to the spanning tree of the old basis will produce a cycle (see Fig. 6.3). Introduce a positive flow around this cycle of amount .As is increased, some old basic flows will decrease, so  is chosen to be equal to the smallest value that makes the net flow in one of the old basic arcs equal to zero. This variable goes out of the basis. The new spanning tree is therefore obtained by adding an arc to form a cycle and then eliminating one other arc from the cycle. Additional Considerations Additional features can be incorporated as in other applications of the simplex method. For example, an initial basic feasible solution, if one exists, can be found by the use of artificial variables in a phase I procedure. This can be accomplished 166 Chapter 6 Transportation and Network Flow Problems New arc indtroduces flow around cycle Arc driven out when net flow is zero Old New Fig. 6.3 Spanning trees of basis by introducing an additional node with zero supply and with an arc connected to each other node—directed to nodes with demand and away from nodes with supply. An initial basic feasible solution is then constructed with flow on these artificial arcs. During phase I, the cost on the artificial arcs is unity and it is zero on all other arcs. If the total cost can be reduced to zero, a basic feasible solution to the original problem is obtained. (The reader might wish to show how the above technique can be modified so that an additional node is not required.) An important extension of the problem is the inclusion of upper bounds (capacities) on allowable flow magnitudes in an arc., but we shall not describe the details here. Finally, it should be pointed out that there are various procedures for organizing the information required by the simplex method. The most straightforward procedure is to just work with the algebraic form defined by the node–arc incidence matrix. Other procedures are based on representing the network structure more compactly and assigning flows to arcs and simplex multipliers to nodes. 6.8 MAXIMAL FLOW A different type of network problem, discussed in this section, is that of deter- mining the maximal flow possible from one given source node to a sink node under arc capacity constraints. A preliminary problem, whose solution is a funda- mental building block of a method for solving the flow problem, is that of simply determining a path from one node to another in a directed graph. Tree Procedure Recall that node j is reachable from node i in a directed graph if there is a path from node i to node j. For simple graphs, determination of reachability can be accomplished by inspection, but for large graphs it generally cannot. The problem 6.8 Maximal Flow 167 can be solved systematically by a process of repeatedly labeling and scanning various nodes in the graph. This procedure is the backbone of a number of methods for solving more complex graph and network problems, as illustrated later. It can also be used to establish quickly some important theoretical results. Assume that we wish to determine whether a path from node 1 to node m exists. At each step of the algorithm, each node is either unlabeled, labeled but unscanned, or labeled and scanned. The procedure consists of these steps: Step 1. Label node 1 with any mark. All other nodes are unlabeled. Step 2. For any labeled but unscanned node i, scan the node by finding all unlabeled nodes reachable from i by a single arc. Label these nodes with an i. Step 3. If node m is labeled, stop; a breakthrough has been achieved—a path exists. If no unlabeled nodes can be labeled, stop; no connecting path exists. Otherwise, go to Step 2. The process is illustrated in Fig. 6.4, where a path between nodes 1 and 10 is sought. The nodes have been labeled and scanned in the order 1, 2, 3, 5, 6, 8, 4, 7, 9, 10. The labels are indicated close to the nodes. The arcs that were used in the scanning processes are indicated by heavy lines. Note that the collection of nodes and arcs selected by the process, regarded as an undirected graph, form a tree—a graph without cycles. This, of course, accounts for the name of the process, the tree procedure. If one is interested only in determining whether a connecting path exists and does not need to find the path itself, then the labels need only be simple check marks rather than node indices. However, if node indices are used as labels, then after successful completion of the algorithm, the actual connecting path can be found by tracing backward from node m by following the labels. In the example, one begins at 10 and moves to node 7 as indicated; then to 6, 3, and 1. The path follows the reverse of this sequence. It is easy to prove that the algorithm does indeed resolve the issue of the existence of a connecting path. At each stage of the process, either a new node is labeled, it is impossible to continue, or node m is labeled and the process is 2 2 5 5 8 8 6 3 3 6 7 7 10 6 4 9 1 1 1 x Fig. 6.4 The scanning procedure 168 Chapter 6 Transportation and Network Flow Problems successfully terminated. Clearly, the process can continue for at most n −1 stages, where n is the number of nodes in the graph. Suppose at some stage it is impossible to continue. Let S be the set of labeled nodes at that stage and let ¯ S be the set of unlabeled nodes. Clearly, node 1 is contained in S, and node m is contained in ¯ S.If there were a path connecting node 1 with node m, then there must be an arc in that path from a node k in S to a node in ¯ S. However, this would imply that node k was not scanned, which is a contradiction. Conversely, if the algorithm does continue until reaching node m, then it is clear that a connecting path can be constructed backward as outlined above. Capacitated Networks In some network applications it is useful to assume that there are upper bounds on the allowable flow in various arcs. This motivates the concept of a capacitated network. Definition. A capacitated network is a network in which some arcs are assigned nonnegative capacities, which define the maximum allowable flow in those arcs. The capacity of an arc i j is denoted k ij , and this capacity is indicated on the graph by placing the number k ij adjacent to the arc. Throughout this section all capacities are assumed to be nonnegative integers. Figure 6.5 shows an example of a network with the capacities indicated. Thus the capacity from node 1 to node 2 is 12, while that from node 2 to node 1 is 6. The Maximal Flow Problem Consider a capacitated network in which two special nodes, called the source and the sink, are distinguished. Say they are nodes 1 and m, respectively. All other nodes must satisfy the strict conservation requirement; that is, the net flow into these nodes must be zero. However, the source may have a net outflow and the sink a net inflow. The outflow f of the source will equal the inflow of the sink as a consequence of the conservation at all other nodes. A set of arc flows satisfying these conditions is said to be a flow in the network of value f . The maximal flow 2 1 12 6 3 3 4 4 5 Fig. 6.5 A network with capacities 6.8 Maximal Flow 169 problem is that of determining the maximal flow that can be established in such a network. When written out, it takes the form minimize f subject to n  j=1 x 1j − n  j=1 x j1 −f = 0 n  j=1 x ij − n  j=1 x ji =0i=1m (15) n  j=1 x mj − n  j=1 x jm +f = 0 0 ≤x ij ≤k ij  all i j where only those i j pairs corresponding to arcs are allowed. The problem can be expressed more compactly in terms of the node–arc incidence matrix. Let x be the vector of arc flows x ij (ordered in any way). Let A be the corresponding node–arc incidence matrix. Finally, let e be a vector with dimension equal to the number of nodes and having a +1 component on node 1, a −1 on node m, and all other components zero. The maximal flow problem is then maximize f subject to Ax −fe =0 (16) x  k The coefficient matrix of this problem is equal to the node–arc incidence matrix with an additional column for the flow variable f . Any basis of this matrix is triangular, and hence as indicated by the theory in the earlier part of this chapter, the simplex method can be effectively employed to solve this problem. However, instead of the simplex method, a more efficient algorithm based on the tree algorithm can be used. The basic strategy of the algorithm is quite simple. First we recognize that it is possible to send nonzero flow from node 1 to node m only if node m is reachable from node 1. The tree procedure of the previous section can be used to determine if m is in fact reachable; and if it is reachable, the algorithm will produce a path from 1 to m. By examining the arcs along this path, we can determine the one with minimum capacity. We may then construct a flow equal to this capacity from 1tom by using this path. This gives us a strictly positive (and integer-valued) initial flow. Next consider the nature of the network at this point in terms of additional flows that might be assigned. If there is already flow x ij in the arc i j, then the effective capacity of that arc is reduced by x ij (to k ij −x ij ), since that is the maximal amount of additional flow that can be assigned to that arc. On the other hand, the 170 Chapter 6 Transportation and Network Flow Problems effective reverse capacity, on the arc (j i), is increased by x ij (to k ji +x ij ), since a small incremental backward flow is actually realized as a reduction in the forward flow through that arc. Once these changes in capacities have been made, the tree procedure can again be used to find a path from node 1 to node m on which to assign additional flow. (Such a path is termed an augmenting path.) Finally, if m is not reachable from 1, no additional flow can be assigned, and the procedure is complete. It is seen that the method outlined above is based on repeated application of the tree procedure, which is implemented by labeling and scanning. By including slightly more information in the labels than in the basic tree algorithm, the minimum arc capacity of the augmenting path can be determined during the initial scanning, instead of by reexamining the arcs after the path is found. A typical label at a node i has the form k c i , where k denotes a precursor node and c i is the maximal flow that can be sent from the source to node i through the path created by the previous labeling and scanning. The complete procedure is this: Step 0. Set all x ij =0 and f = 0. Step 1. Label node 1 (− ). All other nodes are unlabeled. Step 2. Select any labeled node i for scanning. Say it has label (k c i ). For all unlabeled nodes j such that ij is an arc with x ij <k ij , assign the label i c j , where c j = min c i k ij −x ij . For all unlabeled nodes j such that j i is an arc with x ji > 0, assign the label (i c j ), where c j =min c i x ji . Step 3. Repeat Step 2 until either node m is labeled or until no more labels can be assigned. In this latter case, the current solution is optimal. Step 4. (Augmentation.) If the node m is labeled i c m , then increase f and the flow on arc (i m)byc m . Continue to work backward along the augmenting path determined by the nodes, increasing the flow on each arc of the path by c m . Return to Step 1. The validity of the algorithm should be fairly apparent. However, a complete proof is deferred until we consider the max flow–min cut theorem below. Never- theless, the finiteness of the algorithm is easily established. Proposition. The maximal flow algorithm converges in at most a finite number of iterations. Proof. (Recall our assumption that all capacities are nonnegative integers.) Clearly, the flow is bounded—at least by the sum of the capacities. Starting with zero flow, the minimal available capacity at every stage will be an integer, and accordingly, the flow will be augmented by an integer amount at every step. This process must terminate in a finite number of steps, since the flow is bounded. Example. An example of the above procedure is shown in Fig. 6.6. Node 1 is the source, and node 6 is the sink. The original network with capacities indicated on the 6.8 Maximal Flow 171 (a) (b) (c) (d) (e) (4, 1) (3, 1) 2 1 1 1 3 1 2 2 2 3 5 4 1 6 (1, 2) (–, ∞) (2, 1) (2, 1)(1, 1) (4, 1) 2 2 3 4 5 6 1 1 1 1 1 1 1 1 3 2 2 (–, ∞) (4, 1) (3, 2) (3, 1) (1, 2) (5, 1) 2 3 3 4 5 6 2 2 2 1 1 1 1 1 1 1 1 1 1 1 (–, ∞) (2, 1) (1, 1) (5, 1) 2 4 2 1 1 1 11 1 2 5 6 3 (–, ∞) 24 5 6 3 1 Fig. 6.6 Example of maximal flow problem 172 Chapter 6 Transportation and Network Flow Problems arcs is shown in Fig. 6.6(a). Also shown in that figure are the initial labels obtained by the procedure. In this case the sink node is labeled, indicating that a flow of 1 unit can be achieved. The augmenting path of this flow is shown in Fig. 6.6(b). Numbers in square boxes indicate the total flow in an arc. The new labels are then found and added to that figure. Note that node 2 cannot be labeled from node 1 because there is no unused capacity in that direction. Node 2 can, however, be labeled from node 4, since the existing flow provides a reverse capacity of 1 unit. Again the sink is labeled, and 1 unit more flow can be constructed. The augmenting path is shown in Fig. 6.6(c). A new labeling is appended to that figure. Again the sink is labeled, and an additional 1 unit of flow can be sent from source to sink. The path of this 1 unit is shown in Fig. 6.6(d). Note that it includes a flow from node 4 to node 2, even though flow was not allowed in this direction in the original network. This flow is allowable now, however, because there is already flow in the opposite direction. The total flow at this point is shown in Fig. 6.6(e). The flow levels are again in square boxes. This flow is maximal, since only the source node can be labeled. The efficiency of the maximal flow algorithm can be improved by various refinements. For example, a considerable gain in efficiency can be obtained by applying the tree algorithm in first-labeled, first-scanned mode. Further discussion of these points can be found in the references cited at the end of the chapter. Max Flow–Min Cut Theorem A great deal of insight and some further results can be obtained through the introduction of the notion of cuts in a network. Given a network with source node 1 and sink node m, divide the nodes arbitrarily into two sets S and ¯ S such that the source node is in S and the sink is in ¯ S. The set of arcs from S to ¯ S is a cut and is denoted (S ¯ S). The capacity of the cut is the sum of the capacities of the arcs in the cut. 2 1 3 2 3 3 5 4 6 1 4 21 1 Fig. 6.7 A cut 6.8 Maximal Flow 173 An example of a cut is shown in Fig. 6.7. The set S consists of nodes 1 and 2, while ¯ S consists of 3, 4, 5, 6. The capacity of this cut is 4. It should be clear that a path from node 1 to node m must include at least one arc in any cut, for the path must have an arc from the set S to the set ¯ S. Furthermore, it is clear that the maximal amount of flow that can be sent through a cut is equal to its capacity. Thus each cut gives an upper bound on the value of the maximal flow problem. The max flow–min cut theorem states that equality is actually achieved for some cut. That is, the maximal flow is equal to the minimal cut capacity. It should be noted that the proof of the theorem also establishes the maximality of the flow obtained by the maximal flow algorithm. Max Flow–Min Cut Theorem. In a network the maximal flow between a source and a sink is equal to the minimal cut capacity of all cuts separating the source and sink. Proof. Since any cut capacity must be greater than or equal to the maximal flow, it is only necessary to exhibit a flow and a cut for which equality is achieved. Begin with a flow in the network that cannot be augmented by the maximal flow algorithm. For this flow find the effective arc capacities of all arcs for incremental flow changes as described earlier and apply the labeling procedure of the maximal flow algorithm. Since no augmenting path exists, the algorithm must terminate before the sink is labeled. Let S and ¯ S consist of all labeled and unlabeled nodes, respectively. This defines a cut separating the source from the sink. All arcs originating in S and terminating in ¯ S have zero incremental capacity, or else a node in ¯ S could have been labeled. This means that each arc in the cut is saturated by the original flow; that is, the flow is equal to the capacity. Any arc originating in ¯ S and terminating in S, on the other hand, must have zero flow; otherwise, this would imply a positive incremental capacity in the reverse direction, and the originating node in ¯ S would be labeled. Thus, there is a total flow from S to ¯ S equal to the cut capacity, and zero flow from ¯ S to S. This means that the flow from source to sink is equal to the cut capacity. Thus the cut capacity must be minimal, and the flow must be maximal. In the network of Fig. 6.6, the minimal cut corresponds to the S consisting only of the source. That cut capacity is 3. Note that in accordance with the max flow–min cut theorem, this is equal to the value of the maximal flow, and the minimal cut is determined by the final labeling in Fig. 6.6(e). In Fig. 6.7 the cut shown is also minimal, and the reader should easily be able to determine the pattern of maximal flow. Duality The character of the max flow–min cut theorem suggests a connection with the Duality Theorem. We conclude this section by briefly exploring this connection. The maximal flow problem is a linear program, which is expressed formally by (16). The dual problem is found to be 174 Chapter 6 Transportation and Network Flow Problems minimize w T k subject to u T A =w T (17) u T e =1 w ≥0 When written out in detail, the dual is minimize  ij w ij k ij subject to u i −u j =w ij u 1 −u m =1 (18) w ij ≥0 A pair i, j is included in the above only if (i, j) is an arc of the network. A feasible solution to this dual problem can be found in terms of any cut set S ¯ S. In particular, it is easily seen that u i =  1ifi ∈S 0ifi ∈ ¯ S (19) w ij =  1ifi j ∈S ¯ S 0 otherwise is a feasible solution. The value of the dual problem corresponding to this solution is the cut capacity. If we take the cut set to be the one determined by the labeling procedure of the maximal flow algorithm as described in the proof of the theorem above, it can be seen to be optimal by verifying the complementary slackness conditions (a task we leave to the reader). The minimum value of the dual is therefore equal to the minimum cut capacity. 6.9 SUMMARY Problems of special structure are important both for applications and for theory. The transportation problem represents an important class of linear programs with structural properties that lead to an efficient implementation of the simplex method. The most important property of the transportation problem is that any basis is triangular. This means that the basic variables can be found, one by one, directly by back substitution, and the basis need never be inverted. Likewise, the simplex multipliers can be found by back substitution, since they solve a set of equations involving the transpose of the basis. Since all elements of the basis are either zero or one, it follows that all basic variables will be integers if the requirements are integers, and all simplex multipliers [...]... next supplies h 2 units, and so forth The total energy supplied by the nuclear plant is thus the area shown.) The total cost is f x1 x2 = b1 x1 + b2 x2 + c1 x1 h x dx 0 + c2 hours required x1 +x2 x1 h x dx + c3 1 x1 +x2 h x dx hours required purchase 1 power (megawatts) x1 x2 1 power (megawatts) (a) (b) Fig 7.2 Power requirements curve x 7.3 Examples of Unconstrained Problems 18 9 and the company wishes... napkins and wishes to minimize the total cost of supplying fresh napkins a) Formulate the problem as a transportation problem (Hint: Use T + 1 sources and T destinations.) b) Using the values T = 4 s = 200 r1 = 10 0 r2 = 13 0 r3 = 15 0 r4 = 14 0 c1 = 6 c2 = 4 c0 = 12 , solve the problem 11 The marriage problem A group of n men and n women live on an island The amount of happiness that the ith man and the... also provides an interesting geometric interpretation of the second-order sufficiency result derived above Definition A function f defined on a convex set is said to be convex if, 1, there holds for every x1 , x2 ∈ and every , 0 f x1 + 1 − If, for every , 0 < f x2 f x1 + 1 − f x2 < 1, and x1 = x2 , there holds x1 + 1 − x2 < f x1 + 1 − f x2 then f is said to be strictly convex Several examples of convex... theory g(α) slope > 0 0 α Fig 7 .1 Construction for proof α 18 6 Chapter 7 Basic Properties of Solutions and Algorithms Example 1 Consider the problem 2 2 minimize f x1 x2 = x1 − x1 x2 + x2 − 3x2 There are no constraints, so zero yields the two equations = E 2 Setting the partial derivatives of f equal to 2x1 − x2 = 0 −x1 + 2x2 = 3 These have the unique solution x1 = 1, x2 = 2, which is a global minimum... 2 2 minimize f x1 x2 = x1 − x1 x2 + 2x2 subject to x1 0 x2 0 If we assume that the solution is in the interior of the feasible set, that is, if x1 > 0 x2 > 0, then the first-order necessary conditions are 2 3x1 − 2x1 x2 = 0 2 −x1 + 4x2 = 0 There is a solution to these at x1 = x2 = 0 which is a boundary point, but there is also a solution at x1 = 6 x2 = 9 We note that for x1 fixed at x1 = 6, the objective... unique solution x1 = 1, x2 = 2, which is a global minimum point of f Example 2 Consider the problem 2 minimize f x1 x2 = x1 − x1 + x2 + x1 x2 subject to x1 0 x2 0 1 This problem has a global minimum at x1 = 2 , x2 = 0 At this point f = 2x1 − 1 + x2 = 0 x1 f = 1 + x1 = x2 3 2 Thus, the partial derivatives do not both vanish at the solution, but since any feasible direction must have an x2 component... problem with five shipping points defined by the symmetric cost matrix and the requirements indicated below s = 10 30 0 −20 −20 17 8 Chapter 6 Transportation and Network Flow Problems ⎡ ⎢ ⎢ C=⎢ ⎢ ⎣ 0 3 3 6 4 3 0 5 4 8 3 5 0 2 5 6 4 2 0 5 4 8 5 5 0 ⎤ ⎥ ⎥ ⎥ ⎥ ⎦ In this system points 1 and 2 are net suppliers, points 4 and 5 are net demanders, and point 3 is neither Any of the points may serve as transshipment... simplex multipliers in upper triangular form, and compare with Part (b) of Exercise 4 3 2 1 6 4 5 7 3 2 3 2 1 6 4 5 7 3 2 6 Consider the modified transportation problem where there is more available at origins than is required at destinations: m n cij xij minimize j =1 i =1 n ai i =1 2 m xij = bj j =1 2 n xij subject to all i j xij j =1 n i =1 m where 0 n ai > i =1 bj j =1 a) Show how to convert it to an ordinary... paths 6 .10 EXERCISES 1 Using the Northwest Corner Rule, find basic feasible solutions to transportation problems with the following requirements: a) a = 10 15 7 8 b) a = 2 3 4 5 6 c) a = 2 4 3 1 5 2 b = 8 6 9 12 5 b= 6 5 4 3 2 b= 6 4 2 3 2 2 Transform the following to lower triangular form, or show that such transformation is not possible ⎡ 4 ⎣ 0 3 5 0 0 ⎤ 6 1 ⎦ 2 ⎡ 0 ⎢ 0 ⎢ ⎣ 1 8 2 0 3 7 0 0 6 0 ⎤ 1 3... Conversely, with x2 fixed at x2 = 9, the objective attains a relative minimum with respect to x1 at x1 = 6 Despite this fact, the point x1 = 6 x2 = 9 is not a relative minimum point, because the Hessian matrix is F= 6x1 − 2x2 −2x1 −2x1 4 which, evaluated at the proposed solution x1 = 6 x2 = 9, is F= 18 12 12 4 This matrix is not positive semidefinite, since its determinant is negative Thus the proposed . ∞) (2, 1) (2, 1) (1, 1) (4, 1) 2 2 3 4 5 6 1 1 1 1 1 1 1 1 3 2 2 (–, ∞) (4, 1) (3, 2) (3, 1) (1, 2) (5, 1) 2 3 3 4 5 6 2 2 2 1 1 1 1 1 1 1 1 1 1 1 (–, ∞) (2, 1) (1, 1) (5, 1) 2 4 2 1 1 1 11 1 2 5 6 3 (–,. 6.6. Node 1 is the source, and node 6 is the sink. The original network with capacities indicated on the 6 .8 Maximal Flow 17 1 (a) (b) (c) (d) (e) (4, 1) (3, 1) 2 1 1 1 3 1 2 2 2 3 5 4 1 6 (1, 2) (–,. problem minimize fx 1 x 2  =x 2 1 −x 1 +x 2 +x 1 x 2 subject to x 1  0x 2  0 This problem has a global minimum at x 1 = 1 2 , x 2 =0. At this point f x 1 =2x 1 1+ x 2 =0 f x 2 =1+ x 1 = 3 2  Thus,

Ngày đăng: 06/08/2014, 15:20

Từ khóa liên quan

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan