1 / 7

Instructor: Dr. Gautam Das notes by Walter Wilson

CSE 6311 – Spring 2009 ADVANCED COMPUTATIONAL MODELS AND ALGORITHMS Lecture Notes – March 12, 2009 ILP – Integer Linear Programming Approximate algorithm for ILP. Instructor: Dr. Gautam Das notes by Walter Wilson. ILP – Integer Linear Programming set of integer variables linear constraints

lily
Download Presentation

Instructor: Dr. Gautam Das notes by Walter Wilson

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CSE 6311 – Spring 2009ADVANCED COMPUTATIONAL MODELS AND ALGORITHMSLecture Notes – March 12, 2009ILP – Integer Linear ProgrammingApproximate algorithm for ILP Instructor: Dr. Gautam Das notes by Walter Wilson

  2. ILP – Integer Linear Programming set of integer variables linear constraints linear goal function (same as LP except vars are integers)

  3. Integer Linear Programming Example Factory product material profit Product1 w1 grams metal per unit p1 dollars per unit Product2 w2 " p2 " Constraints: total # of products per day <= P total amount of material per day <= W Unknowns: x1 - # of units of Product1 x2 - " Product2 Goal function: maximize profit: x1 p1 + x2 p2 Constraint equations: x1 + x2 <= P x1 w1 + x2 w2 <= W x1 >= 0, x2 >= 0, x1,x2 integers!

  4. ILP Example 2 – Shortest Paths Given weighted directed graph and start, end nodes s & f, find weight of shortest path from start to end. Let wj >= 0 be integer weight for each edge j ui >= 0 be weight of shortest path from s to node ui Consider shortest path from s to node v: u1 w1 u1 v s u2 w2 u2 Shortest path to v in terms of path to preceding node uk: v <= uk + wk (edge (uk,v) has weight wk) v >= 0 Goal: minimize f (shortest path to f)

  5. ILP Decision Problem Is there a var asnmt s.t. goal <= CProof that ILP (decision problem) is NP-Complete –Reduction from Vertex Cover:Given unweighted graph G and k does there exist a vertex cover of size <= k?for each node vi, make constraints xi>=0, xi<=1 for each edge (vi,vj) make constraint xi + xj >= 1goal: minimize sum of xi -- xi == 1 means xi selected for vertex cover -- goal <= k means V.C. <= k

  6. Approximation Algorithm for ILP Vertex Cover • Algorithm: • Treat as LP problem • Will get values 0.0 to 1.0 for vertices (VChypoth) • VChypoth <= VCopt – LP solution more optimal than ILP • One possible algorithm: take vertices in decreasing order • Stop when cover achieved • Simpler: round to 0 or 1 (.5 rounds up) • Is this a vertex cover? • Yes since sum of values for each edge >= 1 • Approximation bound: • VChypoth = sum of x's < .5 + sum of x's >= .5 • (left vars round to 0, right round to 1) • VCapprox = sum of rounded vars <= 2 * unrounded • Thus: VCapprox <= 2 * VChypoth • Thus: VCapprox <= 2 * VCopt

  7. Weighted Vertex Cover • Graph with weighted nodes • Find vertex cover that touches all edges but minimizes the sum of the weights • ILP problem • Goal: sum i=1..n xi wi • How to do rounding? -- do same way • How to prove approximation ratio? • VCapprox <= 2 VCopt

More Related