Title: Solving the Logic Satisfiability problem
1 Solving the Logic Satisfiability
problem
2Overview
- The Satisfiability Problem in its most general
form is determining whether it is possible to
satisfy a given set of logical constraints - Could take many forms
- Boolean expressions logic circuits
- Many other applications as well (e.g. Artificial
Intelligence) - Was the original NP-Complete Problem
- Shown in 1970 by Stephen Cook
3CNF-SAT Problem
- CNF Acronym for Conjunctive Normal Form which
is a boolean expression given as a product of
sums - Let us consider the example
- (A ? B) ? (B ? C) ? (A ? B)
- Could easily use an exhaustive search in the form
of a truth table to solve this problem
4Davis-Putnam Algorithm
- Recursive Algorithm that creates a search tree by
making assignments to the remaining variables at
each stage of the algorithm - Performs better on average than an exhaustive
search - Effectively prunes failed branches from the
search tree
5Davis-Putnam Algorithm Continued
- Lets apply the Davis-Putnam Algorithm to our
example - (A ? B) ? (B ? C) ? (A ? B)
Davis-Putnam Algorithm
procedure split(E) if E has an empty clause,
then return if E has no clauses, then exit with
current partial assignment select next
unassigned variable, xi in E split(E(xi0)) spli
t(E(xi1))
6Davis-Putnam Algorithm Continued
Application to (A ? B) ? (B ? C) ? (A ? B)
(A ? B) ? (B ? C) ? (A ? B)
A0
A1
B ? (B ? C) ? B
B ? C
B0
B1
B0
B1
(?)
(?)
C
?
C0
C1
(?) Failed Partial Assignment ? Successful
Partial Assignment
?
(?)
7Davis-Putnam Algorithm Continued
- Unfortunately in the worse case the Davis-Putnam
Algorithm is still exponential - Currently there is no known solution that
provides a worse case performance better than
exponential
8Other Applications?
- So far we have seen instances of the
Satisfiability problem to pure logic applications - However it is possible to apply to many other
types of problems as well - In fact the problem of Satisfiability is a
central problem and has limitless applications
9Complexity Classes
- Review
- P Problems which can be solved in polynomial
time - NP Problems which can be solved in
non-deterministic polynomial time - All problems in the NP class can be reduced (in
polynomial time) to problems which are said to be
NP-Complete - P NP??? Could be shown if one could find a
polynomial time solution for a NP-Complete
problem such as the Satisfiability problem.
10Complexity Classes Continued
Intractable Problems
Class NP
Can be visualized in the form of a set chart with
problem hardness increasing radially
Class P
Increasing Hardness
NP-Complete Problems exist at very edge of Class
NP
11Transformation Of Other NP Problems Into SAT
Problems
Provides a method to transform any problem in NP
class into an instance of the Satisfiability
problem. Therefore, we can say that the
Satisfiability problem is NP-Complete.
Instance of the Satisfiability Problem
Any Problem In Complexity Class NP
Transformation
Some Examples Include Hamiltonian cycle
traveling salesperson, 3-graph coloring,
partition problem, etc
Transform the problem to be solved from an
optimization to a decision. This can be done in
polynomial time
Output is a series of true or false
12Implications
- Since the Satisfiability problem is NP-Complete,
if a polynomial time solution for the
Satisfiability problem was known then we could
solve all the problems in the NP complexity class
in polynomial time. - This would essentially collapse the complexity
class NP into P