Efficient Solution for 2VIP Problems1 Efficient Solutions for 2-Variables-per-Constraint Integer Programming Problems Reuven Bar-Yehuda & Dror Rawitz 1999.

Slides:



Advertisements
Similar presentations
Incremental Linear Programming Linear programming involves finding a solution to the constraints, one that maximizes the given linear function of variables.
Advertisements

Max Cut Problem Daniel Natapov.
Theory of Computing Lecture 18 MAS 714 Hartmut Klauck.
Introduction to Algorithms
EE 553 Integer Programming
The Theory of NP-Completeness
Polynomial Time Approximation Schemes Presented By: Leonid Barenboim Roee Weisbert.
Basic Feasible Solutions: Recap MS&E 211. WILL FOLLOW A CELEBRATED INTELLECTUAL TEACHING TRADITION.
Reuven Bar-Yehuda Gleb Polevoy Gleb Polevoy Dror Rawitz Technion Technion 1.
Reuven Bar-Yehuda Gleb Polevoy Gleb Polevoy Dror Rawitz Technion Technion 1.
1 Boolean Satisfiability in Electronic Design Automation (EDA ) By Kunal P. Ganeshpure.
Approximation Algorithms
Complexity ©D.Moshkovitz 1 Paths On the Reasonability of Finding Paths in Graphs.
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
The Theory of NP-Completeness 1. What is NP-completeness? Consider the circuit satisfiability problem Difficult to answer the decision problem in polynomial.
1 The Theory of NP-Completeness 2012/11/6 P: the class of problems which can be solved by a deterministic polynomial algorithm. NP : the class of decision.
Nattee Niparnan. Easy & Hard Problem What is “difficulty” of problem? Difficult for computer scientist to derive algorithm for the problem? Difficult.
Design Techniques for Approximation Algorithms and Approximation Classes.
The Complexity of Optimization Problems. Summary -Complexity of algorithms and problems -Complexity classes: P and NP -Reducibility -Karp reducibility.
Approximation Algorithms Department of Mathematics and Computer Science Drexel University.
Chapter 8 PD-Method and Local Ratio (4) Local ratio This ppt is editored from a ppt of Reuven Bar-Yehuda. Reuven Bar-Yehuda.
EMIS 8373: Integer Programming NP-Complete Problems updated 21 April 2009.
1 Combinatorial Algorithms Local Search. A local search algorithm starts with an arbitrary feasible solution to the problem, and then check if some small,
1 The Theory of NP-Completeness 2 Cook ’ s Theorem (1971) Prof. Cook Toronto U. Receiving Turing Award (1982) Discussing difficult problems: worst case.
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
NP-COMPLETE PROBLEMS. Admin  Two more assignments…  No office hours on tomorrow.
Linear Program Set Cover. Given a universe U of n elements, a collection of subsets of U, S = {S 1,…, S k }, and a cost function c: S → Q +. Find a minimum.
Approximation Algorithms Department of Mathematics and Computer Science Drexel University.
1 Convex Recoloring of Trees Reuven Bar-Yehuda Ido Feldman.
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
TU/e Algorithms (2IL15) – Lecture 12 1 Linear Programming.
Common Intersection of Half-Planes in R 2 2 PROBLEM (Common Intersection of half- planes in R 2 ) Given n half-planes H 1, H 2,..., H n in R 2 compute.
Searching a Linear Subspace Lecture VI. Deriving Subspaces There are several ways to derive the nullspace matrix (or kernel matrix). ◦ The methodology.
Linear Programming Chap 2. The Geometry of LP  In the text, polyhedron is defined as P = { x  R n : Ax  b }. So some of our earlier results should.
Approximation Algorithms based on linear programming.
TU/e Algorithms (2IL15) – Lecture 12 1 Linear Programming.
Midwestern State University Minimum Spanning Trees Definition of MST Generic MST algorithm Kruskal's algorithm Prim's algorithm 1.
Chapter 8 PD-Method and Local Ratio (5) Equivalence This ppt is editored from a ppt of Reuven Bar-Yehuda. Reuven Bar-Yehuda.
Approximation algorithms
The Theory of NP-Completeness
The NP class. NP-completeness
P & NP.
Integer Programming An integer linear program (ILP) is defined exactly as a linear program except that values of variables in a feasible solution have.
Optimization Problems
Chapter 8 Local Ratio II. More Example
The minimum cost flow problem
Instructor: Rajeev Alur
Chapter 5 Induction and Recursion
Chapter 5. Optimal Matchings
Distributed Submodular Maximization in Massive Datasets
Linear Programming.
Discrete Mathematics for Computer Science
Introduction to linear programming (LP): Minimization
Polyhedron Here, we derive a representation of polyhedron and see the properties of the generators. We also see how to identify the generators. The results.
Chap 3. The simplex method
Analysis of Algorithms
Chapter 3 The Simplex Method and Sensitivity Analysis
Integer Programming (정수계획법)
Polyhedron Here, we derive a representation of polyhedron and see the properties of the generators. We also see how to identify the generators. The results.
Applied Combinatorics, 4th Ed. Alan Tucker
András Sebő and Anke van Zuylen
Graphs and Algorithms (2MMD30)
Integer Programming (정수계획법)
Heuristic Minimization of Two Level Circuits
Flow Feasibility Problems
Back to Cone Motivation: From the proof of Affine Minkowski, we can see that if we know generators of a polyhedral cone, they can be used to describe.
The Theory of NP-Completeness
Topics in Algorithms 2005 Max Cuts
Instructor: Aaron Roth
Presentation transcript:

Efficient Solution for 2VIP Problems1 Efficient Solutions for 2-Variables-per-Constraint Integer Programming Problems Reuven Bar-Yehuda & Dror Rawitz 1999

Efficient Solution for 2VIP Problems2 Heirarchy of Relevant Problem Types 2-Satisfiability (2SAT) Minimum Weight 2SAT 2-Variable-per-constraint Integer Programming (2VIP) Vertex Cover (VC)

Efficient Solution for 2VIP Problems3 Vertex Cover Input:An undirected graph G(V,E) Solution: A subset S  V which includes a vertex in each arc in E “What about optimality?” Just wait…

Efficient Solution for 2VIP Problems4 2-Satisfiability Input:A boolean formula in 2-CNF form, mn with m constraints and n variables Solution: nn A vector of n values for the n variables, so that they satisfy all constraints (FALSE, TRUE, FALSE, TRUE, FALSE, FALSE)

Efficient Solution for 2VIP Problems5 Vertex Cover as a Type of 2SAT VerticesBoolean Variables x i = TRUE Selected VerticesVariables Assigned TRUE EdgesSimple OR constraints i i j i j k x i, x j, x k

Efficient Solution for 2VIP Problems6 Feasibility Algorithm for 2SAT SAT (the general satisfiability problem) is NP-Complete. 3SAT (satisfiability of 3-CNF formulae) is NP-Complete. … But 2SAT is in P. This difference is the basis for our entire approach to the approximation of 2VIP

Efficient Solution for 2VIP Problems7 Feasibility Algorithm for 2SAT (continued) If all the variables are set, return SUCCESS Select an unset variable x k F1  F with the implications of x k = FALSE propagated F2  F with the implications of x k = TRUE propagated If both F1 & F2 cannot be satistfied return FAILURE F3  the first of F1,F2 for which the propagation is completed without its being determined as a FALSE formula return 2SAT-FEASIBILITY(F3) 2SAT-FEASIBILITY(F) … 99% Pure Greed!

Efficient Solution for 2VIP Problems8 Feasibility Algorithm for 2SAT (correctness) Why does this work? Observe an assignment effect propagation: x 1 = FALSE x 2 = TRUE

Efficient Solution for 2VIP Problems9 Feasibility Algorithm for 2SAT (correctness) After the propagation is complete, we have: one side of OR set FALSE, other side set TRUE one side of OR set TRUE, other side unchanged no changes to either side satisfied constraintsunaffected constraints

Efficient Solution for 2VIP Problems10 Feasibility Algorithm for 2SAT (correctness) satisfied constraintsUnaffected Constraints So… combine the values set here with the values for this part ‘borrowed’ from an x 1 =TRUE feasible solution to create an x 1 =FALSE feasible solution. But… every x 1 =TRUE feasible solution must also satisfy these constraints!

Efficient Solution for 2VIP Problems11 Feasibility Algorithm for 2SAT (complexity) O(n) recursive calls  O(m) constraits checked in the propagation process = O(m  n) time Each variable is set at most once Each constraint is checked at most twice Running the propagations in parallel binds the amount of ‘wasted’ time to the amount of time used to propagate adopted assignments. Time Complexity - seemingly: But, actually: Hence O(2·(m+n))= O(m+n) time in total.

Efficient Solution for 2VIP Problems12 2SAT as an extension of Vertex Cover In Vertex Cover, we only have constraints of a single type: EdgesSimple OR constraints i ???OR constraints with 1 NOT i j ?? But there are 2 more types of constraints in 2SAT: ???OR constraints with 2 NOTs i j ?? j

Efficient Solution for 2VIP Problems13 Extending 2SAT: Minimum Weight (MIN-2SAT) Given a weight vector w, find a vector x which minimizes, subject to: generalization 2SAT:

Efficient Solution for 2VIP Problems14 Extending MIN-2SAT: Any Integer Value (2VIP) Given a weight vector w, find a vector x which minimizes, subject to:

Efficient Solution for 2VIP Problems15 Feasible Polyhedron Convexity The polyhedron bounding the feasible solutions of an IP problem is convex. Specifically, if the points (a,b),(c,d),(e,f),(g,h),(i,j) satisfy a constraint involving variables i and j … …so do all the points on the line and within the triangle. (a,b) (c,d) (e,f) (g,h) (i,j)

Efficient Solution for 2VIP Problems16 Extending the 2SAT Feasibility Algorithm: Partitioning the Solution Space 2SAT: unset variable x i x i = TRUEx i = FALSE 2VIP:,

Efficient Solution for 2VIP Problems17 Extending the 2SAT Feasibility Algorithm: Propagating Bound Effects (This illustration courtesy of Dror Rawitz )

Efficient Solution for 2VIP Problems18 Result: Feasibility Algorithm for 2VIP If l = u then If l is a feasible solution, return SOLUBALE The solution is infeasible; return INSOLUBLE Select a variable x k for which l k  u k P1  P with the implications of propagated P2  P with the implications of propagated If both P1 & P2 are directly unsatisfiable return INSOLUBLE P3  the first of P1,P2 for which the propagation is completed without its being determined as directly unsatisfiable return 2VIP-FEASIBILITY(P3) 2VIP-FEASIBILITY(P)

Efficient Solution for 2VIP Problems19 Feasibility Algorithm for 2VIP (correctness) Q: Can choosing one ‘half’ of the solution space over the other ‘half’ rule out feasible solutions? A: Of course. Q: Can choosing one ‘half’ of the solution space over the other ‘half’ rule out ALL feasible solutions? A: No! We can still ‘borrow’ parts of any feasible solution – y – for the discarded ‘half’, creating a feasible solution – y’ – for the selected ‘half’: …

Efficient Solution for 2VIP Problems20 Feasibility Algorithm for 2VIP (correctness) bounds for y – solution for y’ – solution for k

Efficient Solution for 2VIP Problems21 Feasibility Algorithm for 2VIP (correctness) Why is y’ a valid solution? Examine any one of the m constraint (say, constraint k), involving variables i and j. One of the following holds: We will see how in all 3 cases, (y’ i,y’ j ) satisfy the constraint. 1. Both y’ variables are equal to the y variables. 2. One of the y’ variables differs from its y counterpart. 3. Both y’ variables differ from their y counterparts.

Efficient Solution for 2VIP Problems22 Feasibility Algorithm for 2VIP (correctness) Case 1: no changes to the y variables; since the y vector is a feasible solution, constraint k is satisfied by (y’ i,y’ j ). lower bound for y’ j lower bound for y’ i (y i,y j ) = (y’ I,y’ j )

Efficient Solution for 2VIP Problems23 Feasibility Algorithm for 2VIP (correctness) Case 2: since y i is within the bounds for variable i, there must exist a value v i such that (y i,v j ) satisfy the constraint; we can now use the convexity to draw the line between (y’ i,y’ j ) and (y i,v j ) within the feasible polygon… the line crosses (y i,l j )=(y’ i,y’ j ). lower bound for y’ j lower bound for y’ i (y i,y j ) (y i,v j ) we are demonstrating correctness for (y i,l j )

Efficient Solution for 2VIP Problems24 Feasibility Algorithm for 2VIP (correctness) Case 3: we again use the definition of the lower and uppoer bounds: there exist v i and v j so that (l i,v j ) and (v i,l j ) satisfy the constraint. Together with (y i,y j ), these points form a feasible triangle within which we find (l i, l j )= (y’ i, y’ j ). lower bound for y’ j lower bound for y’ i (y I,y j ) (l i,v j ) we are demonstrating correctness for (v i,l j ) (l i,l j )

Efficient Solution for 2VIP Problems25 Feasibility Algorithm for 2VIP (complexity) Each lower/upper bound is set at most U times for every lower/upped bound update, at most m constraints are checked. Running the constraint propagations in parallel binds the amount of ‘wasted’ time to the amount of time used to propagate adopted lower/upper bound changes. (Remembering 2SAT…) Hence O(mU) time in total.

Efficient Solution for 2VIP Problems26 Extending 2VIP Yet Again… Q: How can we ensure we aren’t discarding all ‘good’ solutions by searching only one part of the solution space? A: We must extend the problem again, slightly, so that we can ‘cut our losses’ when betting on one part of the solution space. (E2VIP) Instead of minimizing, we minimize the expression for some, satisfying. …

Efficient Solution for 2VIP Problems27 The W function is, in essence, the weight of the part of a vector x which intersects with the (non-integral) range (i.e. the weight of the part x of between and ). Decomposition of ‘Weights’ Now we can use a partitioning of the solution space with some vector to achieve a sort-of-a-decomposition of weights, without changing the actual weight vector w :

Efficient Solution for 2VIP Problems28 Applying the Local Ratio Principle We can now apply the Local Ratio theorem: If, for given we can find an so that every feasible solution, in both parts of the solution space (i.e. in the solution space with the effects of either or propagated) is an r-approximation w.r.t. then every feasible solution that is an r-approximation w.r.t. is also an r-approximation w.r.t.. We are left with the task of finding a useful decomposition of, i.e. a useful vector.

Efficient Solution for 2VIP Problems29 Choosing a Useful ‘Weight’ Decomposition What effects the Choice of ? We have partitioned the solution space, and will only be searching (for example) in the bounds effected by setting (let’s call these bounds ). Intuitive choice: any feasible solution in would be a 1-approximation with respect to, but…

Efficient Solution for 2VIP Problems30 Choosing a Useful ‘Weight’ Decomposition Problem: although we are sure there are feasible solutions in – the only thing we know about their optimality is that the cost of in is lower than that of (that’s why we would choose over ). Conclusion: the selection of must take into account the possibility that the optimal solution is in the discarded part of the solution space:. We must make every solution in ‘pay’ enough in so that it would still be worthwhile to only search for solutions in.

Efficient Solution for 2VIP Problems31 Choosing a Useful ‘Weight’ Decomposition Solution: Start with. Now increase the values of in variables for which … until ‘pays’ in as much as ‘pays’ in :

Efficient Solution for 2VIP Problems32 Choosing a Useful ‘Weight’ Decomposition Loss: We have added as much as to, which means the minimum feasible solution in is 2 times more expensive then (which is cheaper-or-equal to any feasible solution in ). What have we achieved? Gain: Every solution in now ‘pays’ in the range at least, so it can’t be more than 2 times cheaper, w.r.t, than the feasible solution we shall find in. Thus any feasible solution in is a 2-approximation of the optimum solution w.r.t the range. Remember Dr. Bar-Yehuda’s ‘pay 2 dollars for 1’ rule-of-thumb!

Efficient Solution for 2VIP Problems33 If then  l ; If then  l If l = u then: if l is a feasible solution, return l if l isn’t a feasible solution, return FAILURE Select a variable x k for which l k  u k l left, u left  l,u with the implications of propagated l right, u right  l,u with the implications of propagated If both l left, u left and l right, u right are directly unsatisfiable return FAILURE … The Approximation Algorithm for 2VIP E2VIP-APPROX

Efficient Solution for 2VIP Problems34 The Approximation Algorithm for 2VIP … If l left, u left is directly unsatisfible, return E2VIP-APPROX If l right, u right is directly unsatisfible, return E2VIP-APPROX If then better  left, worse  right else better  right, worse  left Find so that and If < l best then  l best Return E2VIP-APPROX Note that calling E2VIP-APPROX(l,u,l,u) means approximating our original 2VIP problem.

Efficient Solution for 2VIP Problems35 Approximation Algorithm for 2VIP (correctness) At every level of recursion, we ‘cut out’ a piece of the solution space, and with it – a part of the cost of the solution. Since we ensure that any feasible solution in the reduced range (i.e. ) is a 2-approximation in the cut-out range (i.e. ), we end up ‘cutting out’ the entire solution space, so that we are left with a single, trivial, feasible solution for l final =u final, and to it we add back the entire solution space in the form of the ‘cut-outs’, while maintaining the 2-effectiveness. Thus we end up with a solution which is a 2-approximation for the original problem.

Efficient Solution for 2VIP Problems36 Approximation Algorithm for 2VIP (complexity) Unlike 2VIP-Feasibility, we can waste a lot of time propagating bound change effects in the discarded part of the solution space. Thus every single execution of the algorithm (not including the recursive call) takes O(mU) time. If we choose the x k ’s in successive order (from x 1 to x n repeatedly), we will have a series of ‘runs’ over all n variables, with each i’th run cutting the range (l k,u k ) by half and taking O(nmU/2 i ) time. The number of runs is bounded by log(U). Hence = O(nmU) time in total.

Efficient Solution for 2VIP Problems37 Generalizations We did not make use of the linearity of the constraints; we only used the covexity of the feasible polyhedron. We can therefore generalize the problem to any ‘axis-convex’ constraints. We did not make use of the linearity of the cost function. We can generalize the problem to (more or less) any non- negative monotone weight function.

Efficient Solution for 2VIP Problems38 The End.