Title: ECE 665 Spring 2005 Computer Algorithms with Applications to VLSI CAD
1ECE 665Spring 2005Computer AlgorithmswithAppl
ications to VLSI CAD
- Linear Programming
- Duality
2Linear Program Dual Example1
- Primal LP (original)
- max 100x1 80x2
- s.to
- 10x1 5x2 ? 50
- 5x1 5x2 ? 35
- 5x1 15x2 ? 80
- Primal solution
- x13, x2 4, Fp 620
- max cT x
- s.to A x ? b
- x ? 0
- Dual LP (original)
- min 50w1 35w2 80w3
- s.to
- 10w1 5w2 5w3 ? 100
- 5w1 5w2 15w3 ? 80
-
- Dual solution
- w14, w2 12, w30
- Fd 620
- max wT b
- s.to wT A ? cT
- w ? 0
3Example 2 Longest Path Problem
- Formulate it as a Linear Program (LP)
- Assign variables xi to each edge ei
- xi 1 if edge ei is in the longest path
- xi 0 otherwise
- Write the objective function
- Write the constraint set
4Example 2 Longest Path Problem (2)
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
5Example 2 Longest Path Problem (3)
- Primal Problem - solution
6Example 2 Longest Path Problem (4)
- Dual Problem formulation solution
Interpretation of dual variables wi
distance of node I from source
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.
7Example3 Max-Flow Min-Cut
8Example3 Max-Flow Min-Cut (2)
- Primal Problem - Solution
Saturated edges x29 x43 x77
Max flow 19 min cut of forward saturated eges
9Example3 Max-Flow Min-Cut (3)
- Dual Problem - formulation
Convert primal problem
Dual obj function Fdual 0 z10 z2 12 w12
13 w8
10Example3 Max-Flow Min-Cut (4)
min 12w1 9w2 10w3 3w4 4w5 10w6 7w7 13w8
11Example3 Max-Flow Min-Cut (5)
LP OPTIMUM FOUND AT STEP 9
Interpretation of dual variables