Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "Efficient Solution for 2VIP Problems1 Efficient Solutions for 2-Variables-per-Constraint Integer Programming Problems Reuven Bar-Yehuda & Dror Rawitz 1999."— Presentation transcript:

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

2 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)

3 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…

4 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)

5 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

6 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

7 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!

8 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

9 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

10 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!

11 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.

12 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

13 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:

14 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: 98765432109876543210 98765432109876543210

15 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)

16 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:,

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

18 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)

19 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’: …

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

21 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.

22 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 )

23 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 )

24 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 )

25 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.

26 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. …

27 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 :

28 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.

29 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…

30 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.

31 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 :

32 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!

33 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

34 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.

35 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.

36 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.

37 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.

38 Efficient Solution for 2VIP Problems38 The End.


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

Similar presentations


Ads by Google