90 likes | 491 Views
Integer Programming. Difference from linear programming Variables x i must take on integral values, not real values Lots of interesting problems can be formulated as integer programs Unfortunately, integer programming is NP-hard Even when we restrict to choices 0 and 1 for vars
E N D
Integer Programming • Difference from linear programming • Variables xi must take on integral values, not real values • Lots of interesting problems can be formulated as integer programs • Unfortunately, integer programming is NP-hard • Even when we restrict to choices 0 and 1 for vars • Despite this difficulty, formulating a problem as an integer program can still be very useful in developing a good approximation algorithm for a problem
Algorithmic Techniques • Formulate problem as an integer program (IP) • Relax it to create a linear program (LP) • Solvable in polynomial time • The LP solution is a lower (upper) bound on the IP solution • The “gap” between these is often referred to as the integrality gap • Get an integral solution • Round solution to create an integer solution with some form of performance guarantee • Argue problem has structure that optimal solution is guaranteed to be integral • Use LP solution as a guide for your algorithm • Primal-dual methods to gain good approximation bounds
Formulating Integer Programs • Indicator variables • A variable xi often takes values 0 or 1 to encode a choice in the final solution structure • Value 0 means that some element is NOT part of the final solution • Value 1 means that some element IS part of the final solution • See associated worksheet for exercise on formulating problems as integer programs
Set Cover • Universe of elements U = {u1, …, un} • Subsets S1, …, Sm of U • Weights (costs) wj ≥ 0 for each subset Sj • Goal: Find a collection I from {1, …, m} that minimizes ∑j in I wj such that the union of Sj = T
Approximation Algorithm • Formulate an integer program IP • Relax IP to create an LP • Solve LP to create optimal solution x* • Round solution to create integral solution as follows • If xi* > 1/f then choose the corresponding set • Define f = maximum number of sets that contain any item • Prove • Rounding algorithm creates set cover • Rounding algorithm guarantees approx ratio of ?
Prove IP is NP-hard • Reduction from SAT • Input instance for SAT • Set of variables xj • Set of clauses Cj = disjunction of literals • Goal: Find a truth assignment T to the variables that satisfies at least one literal from each clause
Details • Any SAT instance has boolean variables and clauses. Our Integer programming problem will have twice as many variables, one for each variable and its complement, as well as the following inequalities: • 0 vi 1 and 0 vi 1 • 1 vi + vi 1 • for each clause C = {v1,v2, ... vi} : v1+v2+…+ vi 1