Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS4234 Optimiz(s)ation Algorithms L2 – Linear Programming.

Similar presentations


Presentation on theme: "CS4234 Optimiz(s)ation Algorithms L2 – Linear Programming."— Presentation transcript:

1 CS4234 Optimiz(s)ation Algorithms L2 – Linear Programming

2 A typical LP consists of three components: 1.A list of (real-valued) variables x 1, x 2, …, x n –The goal: To find good values for these variables 2.An objective function f(x 1, x 2, …, x n ) that you are trying to maximize or minimize –The goal is to find the best values for the variables so as optimize this function 3.A set of constraints that limits the feasible solution space –Each of these constraints is specified as an inequality In a LP problem, both the objective function and the constraints are linear functions of the variables Linear Programming (LP)

3 LP Example

4 1.Find any (feasible) vertex v 2.Examine all the neighboring vertices of v: v 1, v 2, …, v k 3.Calculate f(v), f(v 1 ), f(v 2 ), …, f(v k ) –If f(v) is the maximum (among its neighbors), then stop and return v 4.Otherwise, choose one of the neighboring vertices v j where f(v j ) > f(v) –Let v = v j 5.Go to step (2) Simplex Method

5 Simplex Live Example 1.Find any (feasible) vertex v 2.Examine all the neighboring vertices of v: v 1, v 2, …, v k 3.Calculate f(v), f(v 1 ), f(v 2 ), …, f(v k ) –If f(v) is the maximum (among its neighbors), then stop and return v 4.Otherwise, choose one of the neighboring vertices v j where f(v j ) > f(v) –Let v = v j 5.Go to step (2)

6 Live Demonstration See 02.ExcelSample.xlsx (tab 'LP') LP Solver in Microsoft Excel

7 Both the Randomized & Deterministic 2-approximation algorithm for Min-Vertex-Cover "fails" on the weighted version MIN-WEIGHT-VERTEX-COVER

8 The formulation (x j is a Boolean {0, 1} variable where 0 = not in VC and 1 = in VC): Min-Vertex-Cover (set w(v j ) to all 1)  p ILP So ILP is also NP-hard MWVS as an (Integer) Linear Program ILP/IP

9 Relaxing the Integer constraint ????? ?? x j value if it is  0.5 But is this a good approximation? MWVS as a Relaxed Linear Program Assume w is all 1 Example LP solution x 0 = x 1 = x 2 = x 3 = 0.5 What should we do?

10 General form of an LP: 1.A set of variables: x 1, x 2, …, x n 2.A linear objective to maximize (or minimize): c T x c and x as vectors, c T represents the transpose of c multiplication represents the dot product 3.A set of linear constraints written as a Matrix equation: Ax  b Presented as: max cx where Ax  b and x  0 Linear Programming Summary

11 Exercise to translate given LP into standard form Details in the PDF LP in Standard Form

12 Introduction to LP Overview of Simplex Method Simplex in Excel++ Introducing the weighted MVC = MWVC –Problem with MVC approximation algorithms… Reducing MWVC to ILP Relaxing ILP to LP and rounding up the answer Analysis of that solution Summary


Download ppt "CS4234 Optimiz(s)ation Algorithms L2 – Linear Programming."

Similar presentations


Ads by Google