ECE 665 - LP Duality 1 ECE 665 Spring 2005 ECE 665 Spring 2005 Computer Algorithms with Applications to VLSI CAD Linear Programming Duality.

Slides:



Advertisements
Similar presentations
1 LP Duality Lecture 13: Feb Min-Max Theorems In bipartite graph, Maximum matching = Minimum Vertex Cover In every graph, Maximum Flow = Minimum.
Advertisements

ECE Longest Path dual 1 ECE 665 Spring 2005 ECE 665 Spring 2005 Computer Algorithms with Applications to VLSI CAD Linear Programming Duality – Longest.
Introduction to Algorithms
Introduction to Markov Random Fields and Graph Cuts Simon Prince
1 EE5900 Advanced Embedded System For Smart Infrastructure Static Scheduling.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2002 Lecture 8 Tuesday, 11/19/02 Linear Programming.
Timing Optimization. Optimization of Timing Three phases 1globally restructure to reduce the maximum level or longest path Ex: a ripple carry adder ==>
MS&E 211, Lecture 11 The dual of Min-Cost Flow Ashish Goel.
1 Augmenting Path Algorithm s t G: Flow value = 0 0 flow capacity.
1 Maximum Flow Networks Suppose G = (V, E) is a directed network. Each edge (i,j) in E has an associated ‘capacity’ u ij. Goal: Determine the maximum amount.
Chapter 7 Maximum Flows: Polynomial Algorithms
1 COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf.
1 Linear Programming Jose Rolim University of Geneva.
CSCI 3160 Design and Analysis of Algorithms Tutorial 6 Fei Chen.
HW2 Solutions. Problem 1 Construct a bipartite graph where, every family represents a vertex in one partition, and table represents a vertex in another.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2006 Lecture 9 Wednesday, 11/15/06 Linear Programming.
Linear Programming and Approximation
Duality Dual problem Duality Theorem Complementary Slackness
1 Augmenting Path Algorithm s t G: Flow value = 0 0 flow capacity.
3 t s the black numbers next to an arc is its capacity.
EMGT 501 HW # (b) (c) 6.1-4, Due Day: Sep. 21.
Linear programming maximize x 1 + x 2 x 1 + 3x 2  3 3x 1 + x 2  5 x 1  0 x 2  0.
Routing algorithms, all distinct routes, ksp, max-flow, and network flow LPs W. D. Grover TRLabs & University of Alberta © Wayne D. Grover 2002, 2003 E.
Problem Set # 4 Maximize f(x) = 3x1 + 2 x2 subject to x1 ≤ 4 x1 + 3 x2 ≤ 15 2x1 + x2 ≤ 10 Problem 1 Solve these problems using the simplex tableau. Maximize.
Graph-Cut Algorithm with Application to Computer Vision Presented by Yongsub Lim Applied Algorithm Laboratory.
Linear Programming – Max Flow – Min Cut Orgad Keller.
Network Flow & Linear Programming Jeff Edmonds York University Adapted from NetworkFlow.ppt.
15.082J and 6.855J and ESD.78J November 2, 2010 Network Flow Duality and Applications of Network Flows.
1 Linear Programming:Duality theory. Duality Theory The theory of duality is a very elegant and important concept within the field of operations research.
Duality Theory 對偶理論.
CS774. Markov Random Field : Theory and Application Lecture 13 Kyomin Jung KAIST Oct
© J. Christopher Beck Lecture 5: Project Planning 2.
Linear Programming Data Structures and Algorithms A.G. Malamos References: Algorithms, 2006, S. Dasgupta, C. H. Papadimitriou, and U. V. Vazirani Introduction.
Duality Theory  Every LP problem (called the ‘Primal’) has associated with another problem called the ‘Dual’.  The ‘Dual’ problem is an LP defined directly.
Example Question on Linear Program, Dual and NP-Complete Proof COT5405 Spring 11.
Maximization of Network Survivability against Intelligent and Malicious Attacks (Cont’d) Presented by Erion Lin.
Review for E&CE Find the minimal cost spanning tree for the graph below (where Values on edges represent the costs). 3 Ans. 18.
Network Flow. Network flow formulation A network G = (V, E). Capacity c(u, v)  0 for edge (u, v). Assume c(u, v) = 0 if (u, v)  E. Source s and sink.
© J. Christopher Beck Lecture 6: Time/Cost Trade-off in Project Planning.
Max Flow – Min Cut Problem. Directed Graph Applications Shortest Path Problem (Shortest path from one point to another) Max Flow problems (Maximum material.
Maximum Flow Problem (Thanks to Jim Orlin & MIT OCW)
CS223 Advanced Data Structures and Algorithms 1 Maximum Flow Neil Tang 3/30/2010.
15.082J and 6.855J March 4, 2003 Introduction to Maximum Flows.
Hon Wai Leong, NUS (CS6234, Spring 2009) Page 1 Copyright © 2009 by Leong Hon Wai CS6234: Lecture 4  Linear Programming  LP and Simplex Algorithm [PS82]-Ch2.
CSCI-256 Data Structures & Algorithm Analysis Lecture Note: Some slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved. 25.
Algorithm Design and Analysis (ADA)
1 EE5900 Advanced Embedded System For Smart Infrastructure Static Scheduling.
Linear Programming Short-run decision making model –Optimizing technique –Purely mathematical Product prices and input prices fixed Multi-product production.
1 1 Slide © 2008 Thomson South-Western. All Rights Reserved © 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or.
Review for E&CE Find the minimal cost spanning tree for the graph below (where Values on edges represent the costs). 3 Ans. 18.
CSCI-256 Data Structures & Algorithm Analysis Lecture Note: Some slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved. 23.
Topics in Algorithms 2005 Linear Programming and Duality Ramesh Hariharan.
Approximation Algorithms Duality My T. UF.
Maximum Flow Problem Definitions and notations The Ford-Fulkerson method.
CS 312: Algorithm Design & Analysis Lecture #29: Network Flow and Cuts This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported.
TU/e Algorithms (2IL15) – Lecture 8 1 MAXIMUM FLOW (part II)
The minimum cost flow problem
CS4234 Optimiz(s)ation Algorithms
6.5 Stochastic Prog. and Benders’ decomposition
CSCI 3160 Design and Analysis of Algorithms Tutorial 8
1.206J/16.77J/ESD.215J Airline Schedule Planning
Network Flow-based Bipartitioning
Linear Programming and Approximation
Network Flow CSE 373 Data Structures.
EE5900 Advanced Embedded System For Smart Infrastructure
Flow Feasibility Problems
Advanced LP models column generation.
Lecture 19 Linear Program
6.5 Stochastic Prog. and Benders’ decomposition
EMIS The Maximum Flow Problem: Flows and Cuts Updated 6 March 2008
Presentation transcript:

ECE LP Duality 1 ECE 665 Spring 2005 ECE 665 Spring 2005 Computer Algorithms with Applications to VLSI CAD Linear Programming Duality

ECE LP Duality 2 Linear Program Dual – Example1 Primal LP (original)Primal LP (original) max 100x x 2 s.to: 10x 1 + 5x 2  50 5x 1 + 5x 2  35 5x x 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 w w 3 s.to: 10w 1 + 5w 2 + 5w 3  100 5w 1 + 5w w 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

ECE LP Duality 3 Example 2: Longest Path Problem Formulate it as a Linear Program (LP) – –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 x1 x2 x3 x4 x5 x6 x9 x8 x7

ECE LP Duality 4 Example 2: Longest Path Problem (2) Primal Problem x1 x2 x3 x4 x5 x6 x9 x8 x 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

ECE LP Duality 5 Example 2: Longest Path Problem (3) Primal Problem - solution x1 x2 x3 x4 x5 x6 x9 x8 x 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) VARIABLE VALUE REDUCED COST X X X X X X X X X

ECE LP Duality 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) VARIABLE VALUE REDUCED COST W W W W W W Interpretation of dual variables: w i = distance of node I from source w6= 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.

ECE LP Duality 7 Example3: Max-Flow Min-Cut Primal Problem max x0 st -x1-x2+x0 = 0 x1-x3-x4 = 0 x2-x5-x6 = 0 x3+x5-x7 = 0 x4+x6-x8 = 0 x7+x8-x0 = 0 x1 <= 12 x2 <= 9 x3 <= 10 x4 <= 3 x5 <= 4 x6 <= 10 x7 <= 7 x8 <= 13 end x1 x2 x3 x4 x6 x8 x7 x0 x5 x0 Edge capacities Flow variables Max flow

ECE LP Duality 8 Example3: Max-Flow Min-Cut (2) Primal Problem - Solution X1=10 X2=9 X3=7 X4=3 X6=9 X8=12 X7=7 X0=19 X5=0 X0=19 LP OPTIMUM FOUND AT STEP 3 OBJECTIVE FUNCTION VALUE 1) VARIABLE VALUE REDUCED COST X X X X X X X X X Saturated edges: x2=9 x4=3 x7=7 Max flow = 19 = min cut of forward saturated eges min cut

ECE LP Duality 9 Example3: Max-Flow Min-Cut (3) Dual Problem - formulation x1 x2 x3 x4 x6 x8 x7 x0 x5 x0 Edge constraints: dual variables w w1 w8 Node constraints: dual variables z z1 z6 Dual objective vector: [z1,…, z6, w1,…,w8] Dual objective cost: [ 0, …, 0, c1, …, c8] Edge capacities ( 12,9,10,3,4,10,7,13 ) Convert primal problem : Dual obj function: F dual = 0 z1+…+0 z w12 +… + 13 w8 max x0 st -x1-x2+x0 = 0 x1-x3-x4 = 0 x2-x5-x6 = 0 x3+x5-x7 = 0 x4+x6-x8 = 0 x7+x8-x0 = 0 x1 <= 12 x2 <= 9 x3 <= 10 x4 <= 3 x5 <= 4 x6 <= 10 x7 <= 7 x8 <= 13 end

ECE LP Duality 10 Example3: Max-Flow Min-Cut (4) Dual Problem min 12w1 +9w2 +10w3 +3w4 +4w5 +10w6 +7w7 +13w8 st z1-z6 >= 1 -z1+z2+w1 >= 0 -z1+z3+w2 >= 0 -z2+z4+w3 >= 0 -z2+z5+w4 >= 0 -z3+z4+w5 >= 0 -z3+z5+w6 >= 0 -z4+z6+w7 >= 0 -z5+z6+w8 >= 0 end z = node variables w = edge variables z3 w6 z2 w1 w2 w3 w4 w5 w7 w8 z4 z6 z5 z1

ECE LP Duality 11 Example3: Max-Flow Min-Cut (5) Dual Problem - solution z3=0 w6=0 z2=1 w1=0 w2=1 w3=0 w4=1w5=0 w7=1 w8=0 z4=1 z6=0 z5=0 z1=1 LP OPTIMUM FOUND AT STEP 9 OBJECTIVE FUNCTION VALUE 1) VARIABLE VALUE REDUCED COST W W W W W W W W Z Z Z Z Z Z S T min cut Interpretation of dual variables z i = 1 if node i is in set S 0 if it is in set T w i = 1 if edge i is in the min-cut 0 otherwise