Streamlining Python Development: A Guide to a Modern Project Setup
Primal Dual
1. Carlo Lombardi, June 2008 Theoretical Computer Science Primal-Dual Algorithms A brief survey of Primal-Dual Algorithms as an approximation technique for optimization problems Scribe: Carlo Lombardi [email_address]
2.
3.
4. Carlo Lombardi, June 2008 Theoretical Computer Science Minimum Weighted Vertex Cover Vertex Cover Problem “ Each edge is covered by at least one node” + Weighted Verteces “ Each vertex has a weight” + Minimization of total weight “ Minimize the total weight” = Minimum Weighted Vertex Cover (WVC)
5. Carlo Lombardi, June 2008 Theoretical Computer Science WVC: ILP and LP formulation We formulate the WVC as an Integer Linear Program (ILP) defining a variable x i for each vertex ( x i =1 if vertex i belongs to the cover, 0 otherwise). ILP FORMULATION LP FORMULATION by relaxing integrality constraints
6. Carlo Lombardi, June 2008 Theoretical Computer Science WVC: Rounding the LP solution Primal-Dual Method We need to solve LP formulation …it can be expensive for problems having many constraints!!! Can we do something clever?
7. Carlo Lombardi, June 2008 Theoretical Computer Science A different approach to LP relaxations: Primal-Dual strategy Main idea: !!! Don’t solve LP totally !!! Obtain a feasible integral solution to the LP ( Primal) from scratch using a related LP ( Dual ) to guide your decision . LP Primal LP Dual Good approximated solution “ Solve me” “ I’ll be your guide”
8. Carlo Lombardi, June 2008 Theoretical Computer Science P-D strategy: Background theoretic properties (1/2) PRIMAL DUAL (Weak Duality) For any feasible Primal-Dual solution pair (x,y) : = if (x,y) is optimal (Strong Duality) If either the Primal or Dual have bounded optimal solution, the both of them do. Moreover, their objective functions values are qual. That is: (Complementary Slackness) Let (x,y) be a solutions to a primal-dual pair of LPs with bounded optima. Then x and y are both optimal iff all of the following hold
9. Carlo Lombardi, June 2008 Theoretical Computer Science P-D strategy: Background theoretic properties (2/2) (Weak Duality) For any feasible Primal-Dual solution pair (x,y) : The dual solution is a lover bound for primal solution = if (x,y) is optimal (Strong Duality) If either the Primal or Dual have bounded optimal solution, the both of them do. Moreover, their objective functions values are qual. That is: At the optimum the evaluation of solutions coincides (Complementary Slackness) Let (x,y) be a solutions to a primal-dual pair of LPs with bounded optima. Then x and y are both optimal iff all of the following hold Only If a dual constraints is tight the corresponding primal variables can be greater than 0 (it can participate to the primal solution)
10. Carlo Lombardi, June 2008 Theoretical Computer Science Primal-Dual strategy
11.
12. Carlo Lombardi, June 2008 Theoretical Computer Science Analysis of Program 2.7 (Weak Duality) Note that for every it holds: (1) The o.f. is infact From the (1) Because we are considering all vertices in V Each edge in E is taken two times