transparencies about the logic satisfiability problem Davis Putnam

advertisement
Solving the Logic
Satisfiability problem
Jesus De Loera
Overview


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
CNF-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
Davis-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
Davis-Putnam Algorithm
Continued
Let’s 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(xi=0))
split(E(xi=1))
}
Davis-Putnam Algorithm
Continued
Application to: (A  B)  (B  ¬C)  (A  ¬B)
(A  B)  (B  ¬C)  (A  ¬B)
A=0
A=1
B  (B  ¬C)  ¬B
B=0
()
B  ¬C
B=1
B=0
()
() = Failed Partial Assignment
 = Successful Partial Assignment
B=1

¬C
C=0
C=1

()
Davis-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
Other 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
Complexity 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.
Complexity Classes
Continued…
Intractable Problems
Class NP
Class P
Can be visualized in the
form of a set chart with
problem hardness
increasing radially
NP-Complete Problems
exist at very edge of
Class NP
Transformation 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.
Any Problem In
Complexity Class NP
Some Examples Include:
Hamiltonian cycle traveling
salesperson, 3-graph coloring,
partition problem, etc…
Transformation
Transform the problem to be
solved from an optimization to
a decision. This can be done
in polynomial time
Instance of the
Satisfiability Problem
Output is a series of
“true” or “false”
Implications


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
Download