Integer Linear Programs

Similar documents
The Probabilistic Method

Aditya Bhaskara CS 5968/6968, Lecture 1: Introduction and Review 12 January 2016

11.1 Set Cover ILP formulation of set cover Deterministic rounding

Topics in Theoretical Computer Science April 08, Lecture 8

CSC304: Algorithmic Game Theory and Mechanism Design Fall 2016

Topic: Primal-Dual Algorithms Date: We finished our discussion of randomized rounding and began talking about LP Duality.

MVE165/MMG631 Linear and integer optimization with applications Lecture 8 Discrete optimization: theory and algorithms

Provable Approximation via Linear Programming

1 Primals and Duals: Zero Sum Games

CS 6820 Fall 2014 Lectures, October 3-20, 2014

Topics in Approximation Algorithms Solution for Homework 3

CS261: A Second Course in Algorithms Lecture #18: Five Essential Tools for the Analysis of Randomized Algorithms

COT 6936: Topics in Algorithms! Giri Narasimhan. ECS 254A / EC 2443; Phone: x3748

Lecture 6,7 (Sept 27 and 29, 2011 ): Bin Packing, MAX-SAT

Section Notes 9. IP: Cutting Planes. Applied Math 121. Week of April 12, 2010

CSC373: Algorithm Design, Analysis and Complexity Fall 2017 DENIS PANKRATOV NOVEMBER 1, 2017

Partitioning Metric Spaces

Algorithms. Outline! Approximation Algorithms. The class APX. The intelligence behind the hardware. ! Based on

Positive Semi-definite programing and applications for approximation

Lecture 20: LP Relaxation and Approximation Algorithms. 1 Introduction. 2 Vertex Cover problem. CSCI-B609: A Theorist s Toolkit, Fall 2016 Nov 8

Lecture 1 Introduction

Computational Integer Programming Universidad de los Andes. Lecture 1. Dr. Ted Ralphs

Lecture 5: Probabilistic tools and Applications II

Integer Programming ISE 418. Lecture 13. Dr. Ted Ralphs

Chapter 11. Approximation Algorithms. Slides by Kevin Wayne Pearson-Addison Wesley. All rights reserved.

1 T 1 = where 1 is the all-ones vector. For the upper bound, let v 1 be the eigenvector corresponding. u:(u,v) E v 1(u)

princeton univ. F 13 cos 521: Advanced Algorithm Design Lecture 17: Duality and MinMax Theorem Lecturer: Sanjeev Arora

Duality of LPs and Applications

CO 250 Final Exam Guide

1 Adjacency matrix and eigenvalues

Algorithms: COMP3121/3821/9101/9801

Lectures 6, 7 and part of 8

1 Column Generation and the Cutting Stock Problem

CSC Linear Programming and Combinatorial Optimization Lecture 10: Semidefinite Programming

1 Strict local optimality in unconstrained optimization

P P P NP-Hard: L is NP-hard if for all L NP, L L. Thus, if we could solve L in polynomial. Cook's Theorem and Reductions

Travelling Salesman Problem

Lec. 2: Approximation Algorithms for NP-hard Problems (Part II)

Part III: A Simplex pivot

CMPUT 675: Approximation Algorithms Fall 2014

Introduction to Semidefinite Programming I: Basic properties a

Section Notes 8. Integer Programming II. Applied Math 121. Week of April 5, expand your knowledge of big M s and logical constraints.

3 The Simplex Method. 3.1 Basic Solutions

princeton univ. F 17 cos 521: Advanced Algorithm Design Lecture 6: Provable Approximation via Linear Programming

An introductory example

10.3 Matroids and approximation

CS261: Problem Set #3

Introduction to Operations Research Prof. G. Srinivasan Department of Management Studies Indian Institute of Technology, Madras

Computational Integer Programming. Lecture 2: Modeling and Formulation. Dr. Ted Ralphs

Topic: Balanced Cut, Sparsest Cut, and Metric Embeddings Date: 3/21/2007

Introduction to Mathematical Programming IE406. Lecture 21. Dr. Ted Ralphs

15-850: Advanced Algorithms CMU, Fall 2018 HW #4 (out October 17, 2018) Due: October 28, 2018

Week Cuts, Branch & Bound, and Lagrangean Relaxation

Integer programming: an introduction. Alessandro Astolfi

Homework 4 Solutions

Partitioning Algorithms that Combine Spectral and Flow Methods

Linear Programming. Scheduling problems

Lecture 13: Linear programming I

Convex and Semidefinite Programming for Approximation

Network Flows. CS124 Lecture 17

Spectral Graph Theory Lecture 2. The Laplacian. Daniel A. Spielman September 4, x T M x. ψ i = arg min

Integer Programming ISE 418. Lecture 12. Dr. Ted Ralphs

Grothendieck s Inequality

Spring 2017 CO 250 Course Notes TABLE OF CONTENTS. richardwu.ca. CO 250 Course Notes. Introduction to Optimization

Cutting Planes in SCIP

1 Reductions and Expressiveness

Solutions for Homework Assignment 2

Scheduling and Optimization Course (MPRI)

Finite Metric Spaces & Their Embeddings: Introduction and Basic Tools

NP-Completeness I. Lecture Overview Introduction: Reduction and Expressiveness

Introduction to Mathematical Programming IE406. Lecture 10. Dr. Ted Ralphs

Approximation Algorithms

3.7 Cutting plane methods

Lecture 14: Random Walks, Local Graph Clustering, Linear Programming

15-780: LinearProgramming

1 Perfect Matching and Matching Polytopes

Conjunctive Normal Form and SAT

Admin NP-COMPLETE PROBLEMS. Run-time analysis. Tractable vs. intractable problems 5/2/13. What is a tractable problem?

Critical Reading of Optimization Methods for Logical Inference [1]

Conjunctive Normal Form and SAT

CS5314 Randomized Algorithms. Lecture 18: Probabilistic Method (De-randomization, Sample-and-Modify)

CSC Linear Programming and Combinatorial Optimization Lecture 12: The Lift and Project Method

Monotone Submodular Maximization over a Matroid

Math 381 Midterm Practice Problem Solutions

Chapter 11. Approximation Algorithms. Slides by Kevin Wayne Pearson-Addison Wesley. All rights reserved.

U.C. Berkeley CS294: Spectral Methods and Expanders Handout 11 Luca Trevisan February 29, 2016

Dual fitting approximation for Set Cover, and Primal Dual approximation for Set Cover

Semidefinite and Second Order Cone Programming Seminar Fall 2001 Lecture 5

Lecture: Flow-based Methods for Partitioning Graphs (1 of 2)

Cuts & Metrics: Multiway Cut

Lecture notes on the ellipsoid algorithm

Lecture 11 October 7, 2013

Lecture 4: Two-point Sampling, Coupon Collector s problem

BBM402-Lecture 20: LP Duality

16.1 Min-Cut as an LP

PRIMES Math Problem Set

Combinatorial Optimization

A Linear Round Lower Bound for Lovasz-Schrijver SDP Relaxations of Vertex Cover

Facets for Node-Capacitated Multicut Polytopes from Path-Block Cycles with Two Common Nodes

7.4 DO (uniqueness of minimum-cost spanning tree) Prove: if all edge weights are distinct then the minimum-cost spanning tree is unique.

Transcription:

Lecture 2: Review, Linear Programming Relaxations Today we will talk about expressing combinatorial problems as mathematical programs, specifically Integer Linear Programs (ILPs). We then see what happens if we relax the integrality condition, obtaining linear programs (LPs). Then, we introduce the paradigm of designing approximation algorithms by rounding LP relaxations, i.e., obtaining a good solution to the ILP from a solution to the LP. Disclaimer: These lecture notes are informal in nature and are not thoroughly proofread. In case you find a serious error, please send email to the instructor pointing it out. Integer Linear Programs Consider the following optimization problem in n variables x 1, x 2,..., x n : maximize f(x 1, x 2,..., x n ) subject to g 1 (x 1, x 2,..., x n ) 0, g 2 (x 1, x 2,..., x n ) 0,. g m (x 1, x 2,..., x n ) 0, x i {0, 1} for all i. We call such an optimization problem an Integer Program (IP). 1 Integer programs are highly expressive, even for a restricted class of functions f, g i. One particular sub-class of IPs we study are the so-called Integer Linear Programs (ILP), in which the functions f and g i are all linear. In this case each constraint g i (x 1,..., x n ) 0 can be written as A T i x b i, for some A i R n. If we denote by A the m n matrix whose ith row is A i and by b the vector whose ith entry is b i, we can write the constraints in the matrix form Ax b. (Throughout the course, inequality for vectors simply means entry-wise inequality). Expressibility. Despite the linearity restriction, many interesting problems are easily expressible as ILPs. We will see below how to write the Set Cover and Max-Cut problems (defined in the last class) as ILPs. An implication of this is that solving ILPs is NP-hard in general. If it is NP-hard, why do we care about formulating problems as ILPs? There are two answers. The first is that there are many heuristics for solving ILPs (there is an extensive literature, comparable to that on SAT solvers), and readily available software that can solve ILPs with 1000s of variables in a few seconds. Thus in many practical applications, it is useful to formulate a problem as an ILP and try using a solver. The second reason, from the theory side, is that some formulations can lead to approximation algorithms. This is the focus of today s lecture. 1 Some authors prefer to replace the constraints x i {0, 1} with somewhat more general ones. Page 1 of 7

Example: Set Cover Recall the set cover problem, we have topics T 1,..., T n, and people P 1,..., P m, and each person is an expert on a subset of the topics. The goal is to pick the smallest number of people, among whom there is an expert on every T i. This can easily be phrased as an ILP. Suppose we have 0/1 variables x 1,..., x m, where x i indicates if person P i is picked. Then for any j, the constraint that at least one expert on T j is picked, can be written as i:p i expert on T j x i 1. The solution must satisfy this constraint for all j [n]. 2 m i=1 x i. This is the objective function for the ILP. Subject to these constraints, we wish to minimize Formulation as an ILP need not always be so straight-forward, as we illustrate now. Example: Max-Cut Recall that in the Max-Cut problem, we have a graph G = (V, E), and the goal is to partition V into V 1 and V 2 so as to maximize the number of edges in the cut, E(V 1, V 2 ). We need to partition V into two sets, thus a natural choice of variables is to have one for each vertex, x u = 0 if u V 1, and 1 otherwise. All partitions are allowed, so we do not have any constraints other that x u {0, 1} for all u. How do we now write the objective value? For an edge uv, we need some way of figuring out if x u and x v are unequal. This is easy to do if we allow quadratic functions (x u x v ) 2 captures precisely this. However it is not possible to write it as a linear function of x u and x v. Can we have other choices of variables using which we can express the objective as a linear function? There are a couple of ways. The first is to introduce new variables, y uv, one for each pair of vertices. The goal is to add linear constraints on y uv such that for any x u, x v that are 0/1, y uv is forced to take the value x u x v. (Again, we are only allowed to use linear constraints.) In the homework, we see that the following conditions suffice: y uv {0, 1}; y uv x u ; y uv x v ; 1 x u x v + y uv 0. In fact, these type of constraints are a simple example of the so-called lift and project methods, which we will see later in the course. Now, once have such variables y uv, we can write the objective function as x u + x v 2y uv (this is precisely the same as x 2 u + x 2 v 2x u x v, since x 2 u = x u for 0/1 variables). 2 Note the standard notation [n] = {1, 2,..., n}. Example: Max-Cut continued on next page... Page 2 of 7

An aside. (not absolutely necessary to follow this) For the Max-Cut problem, it turns out there is another way to write an ILP relaxation. We can have variables y uv that are supposed be 1 if the vertices u, v are on different sides of the cut, and 0 if they are on the same side. With this choice of variables, the objective is easy, we maximize the sum over edges uv of y uv. But what constraints do we place on the y uv? It turns out that the so-called triangle constraints, along with metric constraints suffice: for all u, v, w, y uv + y vw + y uw 2, for all u, v, w, y uv + y vw y uw. For a solution of the intended form (as described above), these condition hold. The first condition holds because if we pick any three vertices, at least two of them are on the same side, so at least one of the three terms on the LHS is 0. The second constraint can also easily be verified. The tricky thing is to show that any 0/1 variables y uv that satisfy the constraints are actually of the intended kind (for some partition). Linear Programs Finally, we turn to a more tractable set of problems, called linear programs, or LPs. These are optimization problems in which we have have linear constraints and objective (as in ILPs), but we do not have any binary constraints (i.e. the x i are allowed to be arbitrary real numbers, as opposed to x i {0, 1}). To be more precise, a linear program is the following problem: maximize c T x subject toax b, where as before, x R n, b R m, and A is an m n matrix. Once the binary restriction on the x i s is removed, the problem has a very geometric interpretation. Geometric interpretation. Let us think about the set of feasible points, i.e., the points in x R n that satisfy the constraints Ax b. For any constraint A i x b i, the set of feasible points x is a half-space (as a simple example, think of the n = 2 case, and the constraint x 1 + 2x 2 1). Thus if we want points that satisfy all the constraints, we are interested in the intersection of the m half-spaces given by A i x b i, for i [m]. Such an intersection is called a polytope. For details, we refer to Section 7.1 in: https://www.cs.berkeley.edu/ vazirani/algorithms/chap7.pdf The chapter also contains a brief history of LPs, and a short description of the simplex algorithm. The main fact we will use about LPs is that they can be solved efficiently (i.e., in polynomial time). The first efficient algorithm was given by Khachiyan [1979] considered one of the big achievements of modern algorithms research. Linear programs as a proxy for ILP Let us now get back to our main focus of designing approximation algorithms. For the remainder of the lecture, let us focus on the Set Cover problem. Recall the ILP relaxation for Set Cover: Linear programs as a proxy for ILP continued on next page... Page 3 of 7

for all j [n]: minimize i x i x i 1, and i expert on T j x i {0, 1}. subject to What is a natural LP that one could use as a proxy for this ILP? The simplest idea is to replace the constraints x i {0, 1} with 0 x i and x i 1 for all i! Such a transformation is generally referred to as relaxation (we are relaxing the integer constraints). Suppose we denote the feasible set of the ILP by F ILP (i.e., it is the set of x that satisfy all the constraints of the ILP). Similarly, denote the feasible set of the relaxation by F relax. Since the only difference between the ILP and the relaxation are the constraints x i {0, 1} (which are replaced by 0 x i 1), we have F ILP F relax. Thus the minimum value of the objective over F ILP (called OP T (F ILP )) is greater than or equal to the minimum value of the objective over F relax (called OP T (F relax )). The integrality gap of an ILP formulation of a problem (in our case, Set Cover) is defined to be the maximum over all inputs a of the ratio: OP T (F ILP ) OP T (F relax ). a As was the case for the approximation ratio, sometimes the integrality gap is a function of the input size, in which case the maximum is over inputs of that size. Let us see a simple input for Set Cover in which OP T (F ILP ) is strictly larger than OP T (F relax ). Consider the following: We have 3 topics: A, B, C, and three people. The first person is an expert on A, B, the second on B, C, and the third on C, A. Now, in the ILP formulation, we have three variables x 1, x 2, x 3 for the three people. The constraints are now: x 1 + x 3 1; x 2 + x 3 1; x 1 + x 2 1; x i {0, 1}. It is easy to see that to satisfy the constraints, we must set at least two of the x i to 1. Thus the min value of x 1 + x 2 + x 3 is 2. Now let us see what happens to the relaxation. Here, the constraint x i {0, 1} is replaced with 0 x i 1. Let us set x i = 1/2 for all i. Now, it is easy to see that all the constraints are satisfied! And for this solution, we have x 1 + x 2 + x 3 = 3/2, thus the objective value is only 1.5. Thus the integrality gap, just considering this instance, is at least 2/1.5 = 4/3. As we increase the number of topics n, we can construct examples in which the gap is larger in fact the integrality gap can be as bad as Ω(log n). Page 4 of 7

Rounding fractional solutions In summary, the relaxation of an ILP always gives an efficiently solvable optimization problem. The catch is that the solution we get could be fractional, so it might not help us solve the ILP we started with. However, in some cases, it is possible to round the fractional solution to the relaxation, and get a feasible solution to the ILP without much change in the objective value. This is a general, and a powerful paradigm in approximation algorithms. LP relaxations for approximation algorithms Start with an ILP formulation for the problem Relax the integrality constraints, obtaining a linear program Solve it to obtain a (possibly fractional) solution x (this is polynomial time) Round the solution x into a solution for the ILP. Two things need to be ensured: 1. the resulting solution satisfies all the constraints of the ILP 2. the objective value does not change too much (the factor it changes by determines the approximation factor) The last step, i.e., how we round the fractional solution x, is where all the ingenuity lies. We will now see a very simple procedure, which works for the set cover problem. Randomized rounding Recall the ILP for Set Cover (start of Page 4 of the notes). In the relaxation, we replace the constraint x i {0, 1} with 0 x i 1 for all i. Now suppose we start with a solution x for the relaxation. The goal is to come up with a solution to the ILP, such that the two conditions above are satisfied (solution satisfies all constraints and objective value does not increase too much). We consider the following rounding procedure. For some α 1 (to be picked shortly), we set: Y i = { 1 with probability min{αxi, 1} 0 otherwise. Note that this is a randomized procedure that comes up with a 0/1 valued vector Y. Note also that each i is rounded independently of the other i. Y is now our candidate solution to the ILP. Let us evaluate the probability of it satisfying all the constraints, and the cost of the solution. Constraints. We want to show that none of the constraints are violated with high probabililty. As in the coupon collector analysis, we can start by showing that the probability that any single constraint is violated is 1/n, and then take a union bound. Consider the constraint corresponding to some topic T j : i expert on T j Y i 1. (1) Page 5 of 7

For convenience, let us write i T j to denote i expert on T j. Now, by assumption, the fractional solution x satisfies the above constraint, i.e., i T j x i 1. What is the probability that (1) is not satisfied? It is precisely the probability that none of the Y i is 1. Because the rounding is done independently for different i, this probability is: i T j (1 max{αx i, 1}). If one of the αx i terms is 1, the probability is zero, so the constraint is certainly satisfied. Thus we may assume that 0 αx i < 1. In this case, we can use the inequality 1 z e z as in the last lecture, to conclude that the probability above is at most i T j e αxi = e α i T x i j e α. In the last step, we used the fact that i T j x i 1. We would like to make this quantity 1/n 2. Thus it suffices to pick α = 2 log n. Now we can use the union bound, to conclude that the probability that none of the constraints are violated is at most n times the above, which is still < 1/n. Objective value. Now we need to see what the rounding above does to the objective value, namely m i=1 Y i. In expectation, we have (since for each i, E[Y i ] = αx i, and expectation is linear) E[ i Y i ] = i αx i = α x i. i The last term is the objective value of the fractional solution, which as we have seen (since we have a minimization problem), is smaller than or equal to the optimum solution to the ILP. Thus if we denote by OPT the optimum objective value for the ILP, we have E[ i Y i ] α OPT. So in expectation, the objective value of the solution we produced is at most an α factor larger than the optimum objective value. We would like to say that our algorithm does well with high probability, not simply in expectation. Here is where we use one of the standard probability inequalities. Theorem 1 (Markov s Inequality). Let X be a random variable that always takes non-negative values. Then for any t > 0, we have The proof is very simple, and is left as an exercise. Pr[X > t E[X]] 1 t. Using this inequality with t = 4, we obtain that Pr[ i Y i > 4α OPT] 1/4. Overall success probability. We have shown that the probability that none of the constraints is violated is at least 1 1 n, and that the probability that i Y i 4α OPT is at least 3/4. Thus, the probability that both these events occur is at least 1 ( 1 4 + n) 1 > 2/3, for n > 12. Thus the rounding procedure gives a 4α Page 6 of 7

approximate solution, with probability > 2/3. This gives an alternate way to obtain an O(log n) approximation algorithm for the Set Cover problem. Page 7 of 7