
Resolution in Max-SAT and its relation to local consistency in weighted CSPs Javier Larrosa, Federico Heras {larrosa, fheras}@lsi.upc.edu Dept. LSI, Universitat Politecnica de Catalunya Barcelona, Spain Abstract that best respects the clauses/constraints. Two well-known examples are Max-SAT [Hansen and Jaumard, 1990] and Max-SAT is an optimization version of the well- weighted CSP (WCSP) [Bistarelli et al., 1999], where most known SAT problem. It is of great importance from of recent algorithmic work has focused. In both cases the both a theoretical and a practical point of view. In importance of the clauses/constraints is given by a weight recent years, there has been considerable interest and the goal is to minimize the sum of weights associated in finding efficient solving techniques [Alsinet et with the clauses/constraints violated by the assignment. It is al., 2003; Xing and Zhang, 2004; Shen and Zhang, known that Max-SAT instances can be translated into WCSP 2004; de Givry et al., 2003]. Most of this work instances and vice versa [de Givry et al., 2003]. In both cases focus on the computation of good quality lower the main solving technique are enumeration algorithms based bounds to be used within a branch and bound algo- on branch and bound search. rithm. Unfortunately, lower bounds are described In the CSP side, several local consistency properties have in a procedural way. Because of that, it is difficult been recently generalized to the WCSP framework [Cooper, to realize the logic that is behind. 2003; Larrosa and Schiex, 2004; 2003; de Givry et al., 2005]. In this paper we introduce a logical framework for As a result, a new family of algorithms have been proposed. Max-SAT solving. Using this framework, we in- Besides being efficient, these algorithms have a highly desir- troduce an extension of the Davis-Putnam algo- able property: they can be neatly described as a basic back- rithm (that we call Max-DPLL) and the resolution tracking search in which certain local consistency property is rule. Our framework has the advantage of nicely enforced at every search state. integrating branch and bound concepts such as the In [de Givry et al., 2003], it was shown that Max-SAT in- lower and upper bound, as well as hiding away stances could be efficiently solved by translating them into implementation details. We show that Max-DPLL equivalent WCSP instances and later using a WCSP solver. augmented with a restricted form of resolution at The level of local consistency maintained by the WCSP each branching point is an effective solving strat- solver was fundamental in the efficiency of the algorithm. egy. We also show that the resulting algorithm is In this paper we analyze the interpretation of WCSP lo- closely related with some local consistency proper- cal consistency properties and related algorithms when ap- ties developed for weighted constraint satisfaction plied to Max-SAT instances. To facilitate the connection, we problems. start by providing a reformulation of Max-SAT in which it is possible to explicitly express a lower and an upper bound of the optimal cost (Section 3). Such reformulation makes 1 Introduction possible an elegant extension of DPLL in which each branch- Since the eighties, both boolean satisfiability and constraint ing point is just a Max-SAT instance, similarly to what hap- satisfaction have been the topic of intense algorithmic re- pens with DPLL in SAT (Section 4). In Section 5 we present search. In both areas, the goal is to assign values to variables our main contribution: a generalization of the resolution rule in such a way that no forbidden combination of values appear (x ∨ A,x¯ ∨ B ⇒ A ∨ B) and the proof that neighborhood reso- in the solution. In satisfiability, forbidden combinations are lution (i.e., a restricted form of resolution) suffices to enforce specified by means of clauses. In constraint satisfaction they (weighted) node and arc consistency. In Section 6 we put our are specified by means of arbitrary constraints. Given its sim- approach in context with other Max-SAT algorithms. Finally, ilarity, it is hardly a surprise that both research communities in Section 7 we provide conclusions and directions of future have developed closely related techniques. work. In both fields, the original decision problem (SAT and CSP, respectively) has been augmented to deal with unfea- 2 Preliminaries sible problems (namely, not all the clauses or constraints In the sequel X = {x1,...,xn} will denote a set of boolean can be satisfied). The new goal is to find an assignment variables. They take values over the set {t,f}, which stands for true and false, respectively. A literal l is either a variable Example 1 Consider the formula {(x,1),(y¯,5),(x¯ ∨ x or its negationx ¯. l¯ stands for the negation of l. y,2),(x ∨ y,4)}, with > = 5. The second clause is hard. The If variable x is instantiated to t, noted x ← t literal x is sat- assignment x = f,y = f is not a model because its cost is isfied and literalx ¯ is falsified. Similarly, if x is instantiated to 1 ⊕ 4 = >. The assignment x ← t,y ← f is a (optimal) model f,x ¯ is satisfied and x is falsified. An assignment is an instanti- with cost 2. ation of a subset of the variables. The assignment is complete Note that in Max-SAT truth tables are tables with a cost if it instantiates all the variables in X (otherwise it is partial). associated to each truth assignments. A brute-force solving An assignment satisfies a clause (i.e., a disjunction of liter- method consists in computing the truth table of the input for- als) C iff it satisfies one or more of its literals. It satisfies a set mula and finding the minimal cost model. For instance, the of clauses F iff it satisfies all its clauses. A satisfying com- truth-table of the previous formula is, plete assignment is called a model. Given a boolean formula encoded by a set of clauses F , the SAT problem consists in x y cost determining whether there is any model for it or not. f f 1 ⊕ 4 = > We will use the symbol 2 to denote the empty clause f t 1 ⊕ > = > which, obviously, cannot be satisfied. When 2 ∈ F we say t f 2 that there is an explicit contradiction. t t > When there is no model for the formula , one may be F It is worth mentioning the role of the empty clause (2,w). interested in finding the complete assignment with minimum Since it cannot be satisfied, w will be added to the cost of any number of violated clauses. This problem is known as Max- model. Therefore, w is an explicit lower bound of the optimal SAT. model. When the lower bound and the upper bound have the same value (i.e., (2,>) ∈ F ) the formula does not have any 3 An equivalent reformulation of Max-SAT model and we call this situation an explicit contradiction. There is a weighted version of Max-SAT in which (weighted) clauses are pairs (C,w) such that C is a classical clause and w is the cost of its falsification. In weighted Max-SAT F is a set 4 Generalization of DPLL to Max-SAT of weighted clauses. The cost of an assignment is the sum of 4.1 Max-SAT Basic Simplification Rules weights of all the clauses that it falsifies. The goal is to find complete assignments with minimal cost. We make the usual SAT solvers take advantage from some equivalence rules that assumption of weights being natural numbers. are used to simplify the CNF formula without changing its set It is easy to see that Max-SAT and weighted Max-SAT of models. Not all of these formulas can be applied directly to have exactly the same expressive power. A Max-SAT in- Max-SAT. In this Section we state some useful Max-SAT spe- stance can be rewritten as a weighted instance replacing ev- cific rules. We use the notation [P,...,Q] ⇒ [R,...,S], where ery clause C by a weighted clause (C,1). A weighted Max- P,Q,... are weighted clauses. It means that if there are in SAT instance can be rewritten as a Max-SAT instance replac- F weighted clauses matching with [P,...,Q], they can be re- ing every weighted clause (C,w) by w copies of clause C. placed by [R,...,S]. A and B are arbitrary disjunctions of Clearly, weighted Max-SAT encodings may be exponentially literals. more compact than Max-SAT. Thus, in the following, we will assume, without loss of generality, weighted Max-SAT. • BR1: [(A,>),(A ∨ B,w)] ⇒ [(A,>)] Following previous work in weighted constraint satisfac- • BR2: [(A,w),(A,u)] ⇒ [(A,w ⊕ u)] tion [Larrosa and Schiex, 2004], we assume the existence of a known upper bound k of the optimal solution. This is also • BR3: If (w ⊕ u = >) then [(A,w),(A ∨ B,u)] ⇒ done without loss of generality because, if a tight upper bound [(A,w),(A ∨ B,>)] is not known, k can be set to the sum of weights of all the • BR4: [(A,0)] ⇒ [] clauses. Consider the set F of weighed clauses. We say that a BR1 shows that classical absorption can only be applied model is a complete assignment with cost less than k. Max- when the absorbing clause is hard. BR2 generalizes the SAT is the problem of finding a model of minimal cost, if standard idempotency of the conjunction: In Max-SAT the there is any. weights of the repeated clauses must be added in the result- Observe that weights w ≥ k indicate that the associated ing clause.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages6 Page
-
File Size-