pg111.112oftext

# pg111.112oftext - 110 Chapter5 THE PRIMAL-DUAL ALGORITHM...

This preview shows pages 1–2. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 110 Chapter5 THE PRIMAL-DUAL ALGORITHM min c’f +1 <— Row 5 0 Af= ; (P) f.>_0 where A is the (m — l) X n node-arc incidence matrix for a directed graph G = (V, E) with m nodes and n arcs, with the row corresponding to the terminal I omitted (it is redundant); f e R" is the vector of ﬂow (in this problem with components 0 or I), and c e R" is the cost vector. The dual is max 7:, 7:, — 7:, g c” for all arcs (i,j) e E (D) 7:, 2 O for all 1' 7:, = 0 where we must ﬁx 7:, = 0, since its row is omitted from A. The set of admissible arcs is then deﬁned by J: {arcs (i,j) :7t, — 7:, = CU} and the restricted primal becomes m—l min f = Z x? (=1 +l <—— Row 5 0 Af—l— x” = (RP) 0 f, 2 0 for all j f; = 0 1' at J x? 2 0 Finally, the dual of the restricted primal is max w = 7:, 7:, 7:, g 0 for all arcs (i,j) E J (DRP) 7:, g l for all z' V 5.4 The Primal-Dual Method App/fed to the Shortest-Path Problem 111 Now DRP is very easy to solve: since 7:, g l and we wish to maximize 7:“ we try 7:, = 1. If there is no path from 7:, to m, using only arcs in J, then we can propagate the I from s to all nodes reachable by a path from 5 without violating the 7:, — 7:, g 0 constraints, and an optimal solution to DRP is then for all nodes reachable by paths from s using arcs in J l 7? = 0 for all nodes from which 1 is reachable using arcs in J (5.17) l for all other nodes (Notice that this 7? is not unique.) We can then calculate 0, = min {cu — (7r, — 7r,)} arc: (I, J) ¢J such that m-z;>0 update 7: and J, and re-solve DRP. If we get to a point where there is a path from s to 1‘ using arcs in J, 7:, = 0, and we are optimal, since 6 path from s to t using only arcs in J is optimal. Thus, the primal-dual algorithm reduces the shortest- repeated solution of the simpler problem of ﬁnding the set 0 from a given node. min = wnnx = Any path problem to f nodes reachable Example 5.1 Figure 5—3 shows a shortest- path problem somewhat more complicated than our previous example. Figure 5—3 An example of the shortest-path problem. The cir- cled numbers are are weights. Since the costs are nonnegative, we can begin with 7: = 0 in D. Figure 5—4 shows the succession of ﬁve iterations of the primal-dual method that ﬁnally reaches the optimal 7: = (6, 5, 5, 2, 4) and the corresponding are set J, which contains the optimal path. Any path from s to t in the ﬁnal admissible are set will satisfy complementary slackness and hence be optimal; in this case the optimal path is e2, e5, e5, e7, with cost 6 = 7r,. D I 1 6I = 2 for c K arc e7 . o f:> J=¢ CD 1' x ‘ O . t 0 V 0 I I C D'vr=(0,0,0:00) e Iteration l 3. 2 2 2 :> J = {7} :> W‘ sh 2 2 alg [I l D: 3:012, 2: 2: 2) Iteration 2 [O 4 2 wh reqi = 7 4 :9 J { ,6} :> grow 4 4 § D: 1r=(4, 4, 4, 2, 4) Iteration 3 5 2 o o Letu 5 :(>J={7,6,5,4} :> 1«\ “CO! I \ 61=lfor 5 4 O 0 arce2 we ch cost x D: 7r: (5, 5, 5, 2, 4)‘ DRP: 1? =0, 0, o, 0, 0) tile pr Iteration 4 tion 0 5 2 0 0 “comt 8 VS from l J: 7, 6, 5,4, 4:52 { WQ‘ 5 4 0 0 D: _7r=(6, 5, 5, 2, 4) DRP: 1r- (0, 0,0, 0,0) Iteration 5 . In Figure 5—4 Solvmg a shortest-path problem using the prima‘l- and all dual algorithm. RP and but only We now note some properties of this algorithm that lead to a very simple 1cm, whi ' interpretation of what is happening First, if we deﬁne at any point in the The algorithm the set lems tha W = {i : t is reachable from i by admissible arcs} Gen“?! ti . _ algorithm = I“ 7T! = 0} We 1 112 ...
View Full Document

## This note was uploaded on 02/19/2012 for the course MATH 482 taught by Professor Staff during the Spring '08 term at University of Illinois, Urbana Champaign.

### Page1 / 2

pg111.112oftext - 110 Chapter5 THE PRIMAL-DUAL ALGORITHM...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online