Jump to content

Boolean satisfiability problem

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by MathMartin (talk | contribs) at 21:10, 16 November 2004 (delete double redirect). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.


The Boolean satisfiability problem (SAT) is a decision problem considered in complexity theory. An instance of the problem is defined by a Boolean expression written using only AND, OR, NOT, variables, and parentheses. The question is: given the expression, is there some assignment of TRUE and FALSE values to the variables that will make the entire expression true?

In mathematics, a formula of propositional logic is said to be satisfiable if truth-values can be assigned to its free variables in a way that makes the formula true. The class of satisfiable propositional formulae is NP-complete, as is that of its variant 3-satisfiability. (Other variants, such as 2-satisfiability and Horn-satisfiability, can be solved by efficient algorithms.)

The propositional satisfiability problem (SAT), which is given a propositional formula is to decide whether or not it is satisfiable, is of central importance in various areas of computer science, including theoretical computer science, algorithmics, artificial intelligence, hardware design and verification.

Complexity

SAT is NP-complete. In fact, it was the first known NP-complete problem, as proved by Stephen Cook in 1971 (see Cook's theorem for the proof). The problem remains NP-complete even if all expressions are written in conjunctive normal form with 3 variables per clause (3-CNF), yielding the 3SAT problem. This means the expression has the form:

(x11 OR x12 OR x13) AND
(x21 OR x22 OR x23) AND
(x31 OR x32 OR x33) AND ...

where each x is a variable or a negation of a variable, and each variable can appear multiple times in the expression.

Restrictions of SAT

SAT seems to become easier if the formulas are restricted to those in disjunctive normal form, where each clause is an AND of variables (some with NOTs), and all the clauses are ORed together. This is because such a formula is satisfiable iff there is a clause which does not contain x and NOT x, and this can be checked in polynomial time. SAT also seems to be easier if the number of literals in a clause is limited to 2, in which case the problem is called 2SAT. This problem can also be solved in polynomial time. Note that this does not prove that DNF-SAT and 2SAT are not NP-complete but only that if they are then the Complexity classes P and NP are equal.

3-satisfiability

It is a special case of k-satisfiability (k-SAT) or simply satisfiability (SAT), when each clause contains at most k = 3 literals.

Here is an example, where ~ indicates NOT:

E = (x1 or ~x2 or ~x3) and (x1 or x2 or x4)

E has two clauses (denoted by parentheses), four literals (x1, x2, x3, x4), and k=3 (three literals per clause).

To solve this instance of the decision problem we must determine whether there is a truth value (TRUE or FALSE) we can assign to each of the literals (x1 through x4) such that the entire expression is TRUE. In this instance, there is such an assignment (for example, x1 = TRUE, x2 = TRUE, x3=TRUE, x4=TRUE), so the answer to this instance is YES. If there were no such assignment, the answer would be NO.

Since k-SAT (the general case) reduces to 3-SAT, and 3-SAT is known to be NP-complete, it can be used to prove that other problems are also NP-complete. This is done by showing how a solution to another problem could be used to solve 3-SAT. An example of a problem where this method has been used is "Clique".

Extensions of SAT

The satisifiability problem seems to become more difficult if we allow quantifiers such as "for all" and "there exists" that bind the boolean variables. An example of such an expression would be:

If we use only quantifiers, this is still the SAT problem. If we allow only quantifiers, it becomes the coNP-complete TAUTOLOGY problem. If we allow both, the problem is called the quantified boolean formula problem (QBF), which can be shown to be PSPACE-Complete. It is widely believed that PSPACE-complete problems are strictly harder than any problem in NP, although this has not yet been proved.

A number of variants deal with the number of variable assignments making the formula true. Ordinary SAT asks if there is at least one such assignment. MAJSAT, which asks if the majority of all assignments make the formula true, is complete for PP, a probabilistic class. The problem of how many variable assignments satisfy a formula, not a decision problem, is in #P. UNIQUE-SAT or USAT is the problem of finding the variable assignment making a formula true, given a formula known to contain only a single such assignment; although this problem seems easier, it's been shown that if there is a practical (randomized polynomial-time) algorithm to solve this problem, then all problems in NP can be solved just as easily.

Algorithms for solving SAT

There are two classes of high-performance algorithms for solving instances of SAT in practice: modern variants of the David-Putnam-Loveland algorithm, such as zchaff, and stochastic local search algorithms, such as WalkSAT. Particularly in hardware design and verification applications, satisfiability and other logical properties of a given propositional formula are often decided based on a representation of the formula as a binary decision diagram (BDD).

Propositional satisfiability has various generalisations, including satisfiability for quantified Boolean formulae, for first- and second-order logic, constraint satisfaction problems, 0-1 integer programming, and maximum satisfiability.

Many other decision problems, such as graph colouring problems, planning problems, and scheduling problems can be rather easily encoded into SAT.

Compare with: decision problem