A problem SAT is a Problème of decision aiming at determining if there exists a valuation then on a whole of propositional variables such as a given propositional formula either logically true (in short, it is to know if a Boolean equation has a solution). This problem is very important in Théorie of complexity and has many applications in traditional planning, Model checking , diagnosis, etc

Definitions

Clause and form clausale

A clause is a proposal of the form v_ {1} \ lor v_ {2} \ lor \ ldots \ lor v_ {N} where the v_ {I} are literal (positive or negative). A clause of order N is thus a disjunction of with more N literal. A formula of propositional calculation is in conjunctive normal form (or clausale forms) order N if it is a conjunction of clauses of order N.

Problem SAT

That is to say a logical formula under conjunctive normal form (CNF). This CNF is satisfaisable if it is possible to associate a Boolean logical value with each one of its variables in such a way that this formula is logically true. To determine if a formula under CNF of order N is satisfaisable is called problem of satisfaisability or problem SAT of order N (n-SAT). If the propositional formula is not under CNF, it is necessary to standardize it so that the problem is qualified SAT. Generally, the answer to this question also provides an example of assignment of the variables such as the CNF is logically true.

; Exemple

Is the whole of variables \ {v_1, v_2, v_3 \} \ and \ phi = (v_1 \ lor v_2) \ Land (\ neg v_1 \ lor v_3) \ Land (\ neg v_2 \ lor \ neg v_1) .
\ phi \ is satisfaisable since, if one poses v_1 = \ mathit {true}, \ v_2 = \ mathit {false}, \ v_3 = \ mathit {true} , then \ phi \ is logically true .
On the other hand, \ phi' = (v_1 \ lor v_2) \ Land (\ neg v_1 \ lor v_3) \ Land (\ neg v_2 \ lor v_1) \ Land (\ neg v_2 \ lor v_3) \ Land (\ neg v_1 \ lor \ neg v_3) is not satisfaisable !

Complexity and restrictions

Np-complétude

Problem SAT is a Np-complete problem according to the Théorème of Cook.

The problem 3-SAT is him also Np-complete. To show it, it is enough to prove that problem SAT is polynomialement reducible with 3-SAT.

; Proof

One notices that any clause v_ {1} \ lor v_ {2} \ lor \ ldots \ lor v_ {N} can be put in the form:
(v_ {1} \ lor v_ {2} \ lor u_ {1}) \ Land (v_ {3} \ lor \ lnot u_ {1} \ lor u_ {2}) \ Land \ ldots \ Land
(v_ {N2} \ lor \ lnot u_ {n-4} \ lor u_ {n-3}) \ Land (v_ {n-1} \ lor v_ {N} \ lor \ lnot u_ {n-3})
Donc problem SAT is polynomialement reducible with 3-SAT. It is concluded that 3-SAT is Np-complete.

Let us note that all the problems n-SAT with N equal to or higher than 3 are problems Np-complete S.

; Example

Are \ left \ {v_1, v_2, v_3, v_4 \ right \} of the propositional variables.
Déterminer if the expression (v_1 \ lor \ neg v_2 \ lor v_3) \ Land (\ neg v_1 \ lor v_3 \ lor v_4) is satisfaisable is a problem 3-SAT.
Any algorithm able to solve a problem 3-SAT (even “the best”) can in certain cases duty test an exponential number of combinations of assignments in the value n.

The problem 2-SAT

2-SAT, according to the definition, seeks to determine the satisfaisability of a formula of propositional calculation in the conjunctive normal form of order 2. This problem is not Np-complete but of class \ mathcal {P} . There exist several polynomial algorithms to solve the problem 2-SAT.

; Example

Let us interest more particularly in that presented by Even, Itai and Shamir in 1976 in the article “One the complexity off timetable and multicommodity fl ow problems” published in SIAM Journal off Computing, pages 691 to 703.

a clause of order two v_1 \ lor v_2 is equivalent to the implications (\ lnot v_1 \ rightarrow v_2) \ text {and} (\ lnot v_2 \ rightarrow v_1) . To solve 2-SAT one builds the graph directed G = (S, A) dual (called graph 2-SAT) according to the following rules. The tops S correspond to the various propositional variables (or their negations) of the formula considered. One then associates with each clause v_1 \ lor v_2 the two arcs (\ lnot v_1, v_2) and (\ lnot v_2, v_1) to form the unit E.

F is satisfaisable if and only so for each propositional variable v_i of F, the tops v_i and \ lnot v_i of the graph 2-SAT are in two distinct strongly related components. The algorithm of Tarjan makes it possible to calculate the strongly related components of a graph directed in \ mathcal {O} (|S|+|With|) , therefore 2-SAT is well of class \ mathcal {P} .

Another interesting result, obtained by Papadimitriou in 1994, relates to complexity in term of space of the problem 2-SAT. This one is complete for the class of complexity NL.

Algorithms of SAT

Most obvious of the methods to solve a problem SAT the Truth table problem is to traverse, but complexity is then exponential compared to the number of variables.

Systematic method

To prove the satisfaisability of the CNF \ phi \ , it is enough to choose a variable v and to prove recursively the satisfaisability of v \ Land \ phi or \ neg v \ Land \ phi. The procedure is easier recursively since a \ Land \ phi with a = v \ or a = \ neg v can be often simplified. The recursive call builds a binary Tree thus of research.

Generally, there exists with each nœ ud of the unit clauses (the CNF is form \ phi = has \ Land \ phi'), which make it possible to strongly reduce the space of research.

; Example

Let us consider the CNF:
(v_1 \ lor \ neg v_2) \ Land \ neg v_3 \ Land (v_3 \ lor \ neg v_1) .
the second clause ( \ neg v_3) is unit and makes it possible to obtain v_3 immediately = \ textit {false} . One can replace the values of v_3 in this CNF. That gives:
(v_1 \ lor \ neg v_2) \ Land \ neg \ textit {false} \ Land (\ textit {false} \ lor \ neg v_1) = (v_1 \ lor \ neg v_2) \ Land \ neg v_1.
Again, one has a unit clause, and one obtains v_1 = \ textit {false} . Then, by propagation , one obtains v_2 = \ textit {false} .

In this example, one found the values of the three variables without same developing the tree of research. In a general way, one can strongly reduce the space of research. In addition, if a variable v always positively appears in the CNF \ phi \ , then one can pose v = \ textit {true} since \ phi \ is satisfaisable if and only if \ phi \ Land v is satisfaisable (and the same if the variable appears negatively). Thus, in the preceding example, v_2 \ appears only negatively and assignement the v_2 = faux can be carried out. Let us notice that this assignement allows to accelerate the discovery of a solution but that solutions could exist by carrying out the assignement contrary one. The algorithm DPLL (Davis, Putnam, Davis, Logemann, Loveland) is based on these ideas.

The choice of the variable v to be developed is very important for the performances of algorithms SAT. One generally chooses the variables which generally appear, if possible in clauses of size 2.

Training of clauses

The principle of the training of clauses is the suivant : when a conflict appears at the time of research, i.e. when assignement partial is shown non-cohesive with the unit of the clauses, one can isolate a subset from these assignements and a subset of these clauses, which are responsible for the conflict (the assignements are not coherent with the clauses). Starting from these assignements, it is possible to build ( to learn ) a clause which is implied by the clauses. This new clause is added to the CNF. The relevant assignements are determined by a graph of dependence between the clauses and the assignements. The learned clauses make it possible not to remake several times the same errors in the tree of research.

; Example

Considérons that assignement the \ {v_1 = \ textit {true}, v_2 = \ textit {false}, v_3 = \ textit {false}, v_4 = \ textit {true}, v_5 = \ textit {false} \} leads to a conflict. If it is shown that the variables \ {v_1, v_4, v_5 \} are responsible for this conflict, then the clause \ neg v_1 \ lor \ neg v_4 \ lor v_5 is implied and it is possible to add it in the list of the clauses. So thereafter, research leads to assignement the \ {v_1 = \ textit {true}, v_2 = \ textit {true}, v_5 = \ textit {false}, v_ {12} = \ textit {false} \} , the variable v_4 can be immediately assigned with \ textit {true} thanks to the learned clause.

Prospective approaches

The prospective approach consists with to prospect the tree of research to discover assignements some. Thus, being given a CNF \ phi \ , being given a not instanciée variable v \ , one prospects CNFs \ phi \ Land v and \ phi \ Land \ neg v. If both CNFs lead to the instanciation of the same variable v' \ with the same value, then instanciation can be done as of the CNF \ phi \ .

; Example

Let us consider the CNF \ phi = (v_1 \ lor v_2) \ Land (v_1 \ lor \ neg v_2 \ lor v_3) \ Land (\ neg v_1 \ lor v_2 \ lor v_4) \ Land (\ neg v_3 \ lor \ neg v_4) . We are interested here in the variable v_2 \ and prospect the variable v_1 \ .
Let us consider assignement the v_1 = \ textit {true} \ . One obtains (v_2 \ lor v_4) \ Land (\ neg v_3 \ lor \ neg v_4) and thus assignement the v_2 = \ textit {true} \ (since this variable appears only positively).
Let us consider assignement the v_1 = \ textit {false} \ . One obtains v_2 \ Land (\ neg v_2 \ lor v_3) \ Land (\ neg v_3 \ lor \ neg v_4) and thus assignement the v_2 = \ textit {true} \ by unit clause.
In all the cases, one obtains v_2 = \ textit {true} \ and it is thus possible to carry out this assignement as of the CNF \ phi \ .

Let us recall that the complexity of problem SAT comes from the exponential size of the tree of research compared to the number of variables. The prospection makes it possible to strongly reduce this number of variables as of the root (or to any node of the tree) with a relatively low additional complexity have regard the reduction of the tree of research.

Local research

On the basis of an assignment of all the variables, one seeks to modify certain valuations in order to reduce the number of nonsatisfied clauses. This algorithm suffers from several défauts : it can fall into local minima and it is unable to prove to it not satisfaisability, but it proves very effective in the not structured problems (i.e. often problems generated by chance). In the event of failure after a long time, it is possible to choose a new random assignment to avoid the local minima.

Principal implementations

  • ZChaff (Moskewicz, Madigan, Zhao, Zhang 2001)

  • Seat (Ryan 2003)
  • MiniSAT (Eén and Sörensson)

Applications

It is possible to translate certain problems of Artificial intelligence and to use algorithms SAT to solve these problems effectively.

Diagnosis

The diagnosis of static systems consists in determining if a system has a defective behavior being given the observation of the entries and exits of the system. The model of the system can be translated into a whole of constraints (disjunctions)  : for each component c of the system, a variable Ab (c) is created which is evaluated with true if the component has an abnormal behavior ( normal Ab ). The observations can be also translated by a whole of disjunctions. Assignement found by the algorithm of satisfaisability is a diagnosis.

Traditional planning

The traditional problem of planning consists in finding a sequence of actions carrying out of a state of the system to a whole of states. Being given a maximum length of the n plan and a V whole of Boolean variables of state allowing to describe the state of the system, one creates the propositional variables v^i for all i \ in \ {0, \ dowries, N \} and any variable v \ in V. The variable v_i is true if the variable of state is true after the action number i. One also creates the variables a^i for all i \ in \ {1, \ dowries, N \} and any action a. The variable a^i is true if the action number i is a. It is then possible to transform the model of the system into a whole of clauses. For example, if the action a makes pass the variable v_1 to true when this one is false , then the CNF contains a clause (\ neg v^0) \ Rightarrow a^1 \ Rightarrow v^1 (what is translated by the clause v^0 \ lor \ neg a_1 \ lor v^1). Assignement found by the algorithm of satisfaisability can be immediately translated into plan.

Traditional planning by SAT is very effective if one knows the length n plan. If this value is not known, one can seek plans for an incremental value, which is sometimes expensive (in particular because the CNF is not satisfaisable until n-1).

Model checking

A similar approach was used for the Model checking (checking of properties of a model). The principal difference is that the model checking applies to trajectories infinite length contrary to planning. However, if the space of states of the system is finished, any infinite trajectory buckles at a certain point and one can limit the size of the trajectories which it is necessary to check. The bounded model checking car started from this property to transform the problem of model checking into a certain number of problems of satisfaisability.

Random links:Laurent Lafforgue | Autigny (Seine-Maritime) | Pulpite | Metropolitan region of the United States | County of Ozark

© 2007-2008 speedlook.com; article text available under the terms of GFDL, from fr.wikipedia.org