This preview shows pages 1–2. Sign up to view the full content.
NPComplete
David Dill
Department of Computer Science
1
Outline
•
NPcompleteness
•
SAT
•
CSAT
•
3SAT
2
NPcomplete problems
This is about
decision problems
(problems with yes/no answers). Equivalently,
solving the membership problem
x
∈
L
.
The class
P
– problems that are solvable in polynomial time on an DTM. (Ptime,
polynomial time).
The class
N P
– problems that are solvable in polynomial time on an NTM.
Obviously
P
⊆
N P
.
No one knows whether
N P
⊆
P
(the famous
P
=
N P
problem).
NPcomplete problems are the “hardest” problems in NP.
If there are
any
problems in
N P

P
, the NPcomplete problems are all there.
Every NPcomplete problem can be translated in deterministic polynomial time to
every other NPcomplete problem.
So, if there is a Ptime to one NPcomplete problem, there is a Ptime solution to
every
Ptime problem.
3
NPhardness by reduction
Typical method: Reduce a known NPhard problem
P
1
to the new problem
P
2
.
A reduction is a polynomialtime translation of the problem, call it
r
.
If
w
is an instance of problem
P
1
, then
r
(
w
)
is an instance of problem
P
2
.
r
must have two properties:
•
it preserves the answer. So the answer to
w
is “yes”
iff
the answer to
r
(
w
)
is
“yes.”
•
r
(
w
)
can be computed in time polynomial in

w

.
4
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview. Sign up
to
access the rest of the document.
This note was uploaded on 03/08/2011 for the course CS 154 taught by Professor Motwani,r during the Winter '08 term at Stanford.
 Winter '08
 Motwani,R
 Computer Science

Click to edit the document details