A Comparison of Methods for Solving MAX-SAT Problems Steve Joy

A Comparison of Methods for Solving MAX-SAT Problems Steve Joy

A Comparison of Metho ds for Solving MAX-SAT Problems SteveJoy, John E. Mitchell Mathematical Sciences, Rensselaer Polytechnic Institute, Troy NY 12180 USA. email: [email protected], [email protected] http://www.math.rpi.edu/~mitchj Brian Borchers Mathematical Sciences, New Mexico Tech, So corro, NM 87801 USA email: b [email protected] http://www.nmtech.edu/~b orchers Seattle INFORMS Conference Octob er 25{28, 1998 Session MD29 Seattle INFORMS MD29 1 Abstract We compare the p erformance of 3 approaches to the solu- tion of MAX-SAT problems, including a version of the Davis- Putnam-Loveland algorithm extended to solve MAX-SAT, an integer programming branch-and-cut algorithm and an algo- rithm for MAX-2-SAT problems based on a semide nite pro- gramming relation. 1 Overview De nition of MAXSAT. Expressing MAXSATasaninteger program. Cutting planes. Extended Davis-Putnam-Loveland algorithm. Semide nite programming relaxation of MAX2SAT. Computational results. Conclusions. Seattle INFORMS MD29 2 2 De nition of MAXSAT A prop ositional logic formula F can always b e written in conjunctive normal form with m clauses and n vari- ables. Each clause is a disjunction of a set of literals. Each literal is either a variable or the negation of a vari- able. The formula is the conjunction of the clauses. For example: F =X _ X ^ X _ X _ X ^ X _ X : 1 2 1 2 3 2 3 The satis ability problem, SAT: Given a prop ositional logic formula F in conjunctive normal form, is there an assignment of the logical variables that makes F true? The maximum satis ability problem, MAXSAT: Given a prop ositional logic formula F in conjunc- tive normal form, nd an assignment of the logical variables that maximizes the numb er of clauses in F that are true. Seattle INFORMS MD29 3 Computational complexity SAT is NP-Complete. Even if each clause has exactly three literals,SAT is still NP-complete. Some sp ecial cases are solvable in p olynomial time, includ- ing 2-SAT and HORN-SAT. MAXSAT is NP-Hard even if each clause has only two literals. There is no p olynomial time approximation scheme PTAS for MAXSAT unless P=NP. It is p ossible to approximate MAXSAT to within a factor of 1.32 and MAX2SAT to within a factor of 1.14 in p oly- nomial time, using a semide nite programming approach Go emans and Williamson, 1995. Seattle INFORMS MD29 4 3 An integer programming approach Anyweighted MAXSAT instance can b e expressed as an equivalentinteger programming problem. For example: C = v _ v weight1 1 1 2 C = v _ v _ v weight4 2 1 2 3 C = v _ v weight3 3 1 2 Equivalent to: min w + 4w + 3w 1 2 3 s:t: 1 x + 1 x + w 1 1 2 1 x + x + x + w 1 1 2 3 2 x + 1 x + w 1 1 2 3 x = 0 or 1;i =1;:::;3; w = 0 or 1;i =1;:::;3 i i We call the added variables w ;:::;w weighted vari- 1 3 ables. Seattle INFORMS MD29 5 Branch-and-cut Use a primal heuristic similar to GSAT Selman et al., 1992, 1996 or the heuristics of Gu 1992,1993,1994 to nd a go o d solution. Solve the linear programming relaxation obtained by requiring 0 x 1 for i =1;:::;n,0 w 1 for i i j =1;:::;m. If the solution to the relaxation is non-integral, mo dify it by adding cutting planes,or branch. Use three di erenttyp es of cutting planes: { Resolution cuts Ho oker, 1988. { Odd cycle inequalities Cheriyan et al., 1996.. { Clique cuts. The cuts are added lo cally,sowe don't lift them to b e valid throughout the branch-and-cut tree. Branching: split the relaxation into two problems, in one of which a sp eci c variable is required to equal zero and in the other it is required to equal one. The algorithm is written in C. It uses MINTO to handle the branch-and-cut tree, which uses CPLEX 4.0 to solve the linear programming relaxations. Seattle INFORMS MD29 6 Clique cuts Motivated by pigeonhole problems Ho oker: holen asks if it is p ossible to place n + 1 pigeons in n holes without two pigeons b eing in the same hole. We describ e these cuts for 2-SAT problems: Example: Assume our instance of 2SAT contains the four literals l ;l ;l ;l and the six clauses: 1 2 3 4 l _ l ;l _ l ;l _ l ;l _ l ;l _ l ;l _ l : 1 2 1 3 1 4 2 3 2 4 3 4 We can think of this as giving a clique, with vertices la- b elled by the four literals, and edges given by the six clauses. Any satisfying truth assignmentmust have at least three of these literals true. This gives a p otential cutting plane. This can b e extended to MAX2SAT and general MAXSAT by regarding some edges in the clique as missing and mo d- ifying the cutting plane appropriately. This is really a lift- ing pro cedure. We seek inequalities that are violated by at least 0.1. The separation routine lo oks for literals with large values and tries to nd cliques involving suchvariables. The cliques are built vertex-by-vertex. We reject inequalities that contain to o manyweighted variables. Seattle INFORMS MD29 7 Resolution cuts A classical logical pro cedure. Also implemented in branch-and-cut byHooker and Fedjki, 1990. Example: Given two clauses, one containing a variable and the other containing its complement: x _ x _ x _ w 1 3 7 9 x _ x _ w x _ 3 7 11 2 we can resolve to generate the following: x _ x _ x _ w _ w 1 2 7 9 11 Ho oker showed that this is equivalenttoa Chvatal-Gomory cutting plane pro cedure in the integer programming setting. Our resolution routine consists of a sequence of passes, each designed to generate resolvents satisfying certain criteria. Only accept resolved clauses that are unit clauses and that are violated by at least 0.3. Seattle INFORMS MD29 8 Odd cycle inequalities Derived by Cheriyan et al., 1996, motivated by similar in- equalities for MAXCUT problems. Example: x +x +w +w 1 1 2 10 11 +x x +w 0 2 3 11 x x +w 1 3 4 12 x x +w 1 1 4 13 The rst, third, and fourth constraints are o dd; the second is even. Adding these constraints together,dividing by2 and rounding co ecients we obtain: x x x + w + w + w + w 0: 2 3 4 10 11 12 13 Use a mo di ed version of Dijkstra's algorithm to nd cut- ting planes. Lo ok for cuts violated byat least 0.3, and of length at most 2. Odd cycle cuts combine together clauses of length 2. Thus, only e ective if the current relaxation contains a large numb er of clauses of length 2, eg, MAX2SAT problems. For problems with longer clauses, can only use these cuts deep in the tree. Seattle INFORMS MD29 9 Branching strategy After generating cuts and applying b ounds, we branchif there are still fractional variables in the LP solution. The branching scheme we use is a mo di cation of the Jeroslow- Wang 1990 scheme. Jeroslow-Wang examines the probability of satisfying all the constraints if we randomly assign values to the remain- ing un xed variables. It attempts to picka variable whose assignment will have the greatest change in this probability. Our approach di ers from Jeroslow-Wang in that: 1. We give considerably less weightto singleton clauses. 2. We consider the e ect on b oth branches. Seattle INFORMS MD29 10 4 Extended Davis-Putnam-Loveland Davis-Putnam-Loveland 1960,1978 is a classical branch- ing and backtracking pro cedure for solving SAT. Borchers and Furman 1995 extended this to solve MAXSAT problems. Also done indep endently byWallace and Freuder 1996. We maintain an upp er b ound, ub, given by the number of unsatis ed clauses in the b est known solution. Wekeep trackofunsat, the numb er of clauses left unsat- is ed by the current partial solution. If unsat > ub, backtrack from the current partial solu- tion. Written in C. Co de uses primal heuristic to nd go o d solution. Incorp orates unit clause tracking when unsat = ub 1. Uses the variable selection rule of Dub ois et al.. Seattle INFORMS MD29 11 5 Semide nite programming This formulation is due to Go emans and Williamson, 1995. MAX2SATasaQP For each logical variable y ,intro duce a 1 variable x . i i Add a variable x . We'll set y =TRUE if x = x , and 0 i 0 i FALSE otherwise. Let v y _ y :=0:251 + x x +1 + x x +1 x x : k l 0 k 0 l k l We obtain v y _ y = 0 if the clause is FALSE, and 1 k l otherwise. Similar formulas can b e constructed for clauses involving negated literals. The MAX2SAT problem b ecomes: m X maxf v C :x 2f1; 1g;i =0;:::;ng: j i j =1 Seattle INFORMS MD29 12 Formulation as an SDP Express QP as: T maxfx Ax + c : x 2f1; 1g;i =0;:::;ng i for a symmetric matrix A and a scalar c. T T Note that x Ax = tr XA, where X = xx and tr de- notes the trace of a matrix.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    26 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us