Download presentation

Presentation is loading. Please wait.

Published byArely Saucerman Modified over 2 years ago

1
ECE 665 - Longest Path dual 1 ECE 665 Spring 2005 ECE 665 Spring 2005 Computer Algorithms with Applications to VLSI CAD Linear Programming Duality – Longest Path Problem

2
ECE 665 - Longest Path dual 2 Linear Program Dual – Example1 Primal LP (original)Primal LP (original) max 100x 1 + 80x 2 s.to: 10x 1 + 5x 2 50 5x 1 + 5x 2 35 5x 1 + 15x 2 80 Primal solution: x 1 =3, x 2 =4, F p = 620 max c T x s.to: A x b x 0 Dual LP (original)Dual LP (original) min 50w 1 + 35w 2 + 80w 3 s.to: 10w 1 + 5w 2 + 5w 3 100 5w 1 + 5w 2 + 15w 3 80 Dual solution: w 1 =4, w 2 =12, w 3 =0 F d = 620 max w T b s.to: w T A c T w 0 w1w1 w2w2 w3w3

3
ECE 665 - Longest Path dual 3 Example 2: Longest Path Problem Formulate it as a Linear Program – –Assign variables x i to each edge e i x i = 1 if edge e i is in the longest path x i = 0 otherwise – –Write the objective function – –Write the constraint set 1 2 3 4 5 6 4 5 2 2 2 5 3 3 6 x1 x2 x3 x4 x5 x6 x9 x8 x7

4
ECE 665 - Longest Path dual 4 Example 2: Longest Path Problem (2) Primal Problem x1 x2 x3 x4 x5 x6 x9 x8 x7 1 2 3 4 5 6 4 5 2 2 2 5 3 3 6 max 4x1 + 5x2 + 2x3 + 2x4 + 2x5 + 3x6 + 5x7 + 3x8 + 6x9 st - x1 - x2 - x3 = -1 x1 - x4 - x7 = 0 x2 + x4 - x5 = 0 x3 - x6 - x9 = 0 x5 + x6 - x8 = 0 x7 + x8 + x9 = 1 end

5
ECE 665 - Longest Path dual 5 Example 2: Longest Path Problem (3) Primal Problem - solution x1 x2 x3 x4 x5 x6 x9 x8 x7 1 2 3 4 5 6 4 5 2 2 2 5 3 3 6 max 4x1 + 5x2 + 2x3 + 2x4 + 2x5 + 3x6 + 5x7 + 3x8 + 6x9 st - x1 - x2 - x3 = -1 x1 - x4 - x7 = 0 x2 + x4 - x5 = 0 x3 - x6 - x9 = 0 x5 + x6 - x8 = 0 x7 + x8 + x9 = 1 end LP OPTIMUM FOUND AT STEP 2 OBJECTIVE FUNCTION VALUE 1) 11.000000 VARIABLE VALUE REDUCED COST X1 1.000000 0.000000 X2 0.000000 1.000000 X3 0.000000 0.000000 X4 1.000000 0.000000 X5 1.000000 0.000000 X6 0.000000 3.000000 X7 0.000000 2.000000 X8 1.000000 0.000000 X9 0.000000 3.000000

6
ECE 665 - Longest Path dual 6 Example 2: Longest Path Problem (4) Dual Problem formulation + solution min -w1 + w6 st -w1 + w2 > 4 -w1 + w3 > 5 -w1 + w4 > 2 -w2 + w3 > 2 -w3 + w5 > 2 -w4 + w5 > 3 -w2 + w6 > 5 -w5 + w6 > 3 -w4 + w6 > 6 end LP OPTIMUM FOUND AT STEP 7 OBJECTIVE FUNCTION VALUE 1) 11.000000 VARIABLE VALUE REDUCED COST W1 0.000000 0.000000 W6 11.000000 0.000000 W2 4.000000 0.000000 W3 6.000000 0.000000 W4 5.000000 0.000000 W5 8.000000 0.000000 Interpretation of dual variables: w i = distance of node I from source w6=11 1 2 3 4 5 6 4 5 2 2 2 5 3 3 6 w2=4 w1=0 w4=5 w3=6 w5=8 Note: This is still a longest path problem (Critical Path or Scheduling problem): Find a minimum distance from sink to source that satisfies all edge-length constraints.

Similar presentations

OK

Review for E&CE 602. 3 3 1 4 4 2 2 2 5 2 Find the minimal cost spanning tree for the graph below (where Values on edges represent the costs). 3 Ans. 18.

Review for E&CE 602. 3 3 1 4 4 2 2 2 5 2 Find the minimal cost spanning tree for the graph below (where Values on edges represent the costs). 3 Ans. 18.

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on financial inclusion in india Ppt on impact of social networking sites Ppt on forest society and colonialism class 9 Ppt on ministry of corporate affairs india Ppt on computer assisted language learning Ppt on religion and science Ppt on porter's five forces analysis template Ppt on indian textile industries in tanzania Ppt on verbs for class 2 Converter pub to ppt online reader