Title: Chapter%2034:%20Satisfiability
1Chapter 34 Satisfiability
- Dan Hand
- COT 4810
- January 27, 2003
2Presentation Organization
- Overview
- Typical problem applications
- Boolean expressions
- Logical network
- Solution Methods
- Exhaustive search
- Davis-Putnum Algorithm
- Relation class NP
- Applications to less obvious problems
3Overview
- The Satisfiability Problem in its most general
form is determining whether it is possible to
satisfy a given set of constraints - Could take many forms
- Boolean expressions logic circuits
- Many other applications as well
- Was the original NP-Complete Problem
- Shown in 1970 by Stephen Cook
4CNF-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
5Circuit-SAT Problem
- Given a logic network, is there a sequence of
inputs such that the network returns true as
output? - Let the the logical network be represented by the
equation - (A B) (B C) (A B)
- We can do several things to determine whether
this network can be satisfied - One of the first things we might try is to
simplify the network to a sum of products if
possible and look for solutions
6Davis-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
7Davis-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))
8Davis-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
?
(?)
9Davis-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
10Other 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
11Complexity 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.
12Complexity 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
13Transformation 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
14Implications
- 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
15Example Transform Traveling Salesperson Into Sat
Problem
- Original Problem Statement What is the shortest
round trip path that can be taken to visit each
city in a set exactly once? - Output is a path (assuming one exists)
- Transformed Problem Statement Is there a round
trip path that can be taken to visit each city in
a set exactly once less than some finite number? - Output here is either yes or no
- Original problem can be answered by repeating the
transformed problem statement with different
values
16Example Is A Graph 3-Colorable?
- Given a graph we would like to know if the
graphs vertices can be colored with only three
colors such that no vertices with an edge
connecting them share the same color. - Homework