ADVANCED ALGORITHMS
Lecture 25: Intractability
1
ADVANCED ALGORITHMS Lecture 25: Intractability 1 ANNOUNCEMENTS HW - - PowerPoint PPT Presentation
ADVANCED ALGORITHMS Lecture 25: Intractability 1 ANNOUNCEMENTS HW 6 is out due on Friday, December 7 Project final deadline: Wednesday, December 5 2gth Nov class on Thursday No mostly review Next week 9 2 LAST WEEK G k
Lecture 25: Intractability
1
➤ HW 6 is out — due on Friday, December 7 ➤ Project final deadline: Wednesday, December 5
2
class on Thursday
9
mostly review
3
➤ Complexity of decision problems — limits on time/space of
computation
➤ Classes P and NP ➤ NP — non-deterministic polynomial time; problems for which a YES
instance has a “witness/certificate” that can be efficiently verified.
➤ E.g., typical puzzle, circuit satisfiability, checking if number is prime ➤ Cook-Levin theorem: every problem in NP is “basically” SAT
Independents
G
k
polynomial time
4
Verifier
(polynomial time) witness w
using independent set problem
as running example
prover
i
is
aYES instance
that
can
convince verifier that I
is
a YESinstance
is
a No
instance
prover
cannot convince
is
a YES instance
SATISFIABILITY
PROBLEM SAT
F l
inputs
X
X
X n
7IF
Problem
Given the circuit
do there exist inputs
Xi
s t
the output
2
is TRUE l
Cook
mm
Anyproblem imNP
canbe
encoded
asSAT
E
Independent set
can be
encoded
as f SAT
l
l
X
Xz
Xi
Xj
Xn
engotindmoset
l
l
circuit returns 1 iff
a
3k of
the bits
are T
AND
b for any edge ij
either xi
f
F
Reduction
managed to cast
IS
as
an
instance of SAT
5
Verifier
(polynomial time) witness w Idea behind Cook/Levin theorem: encode verifier as circuit, witness as variables
2
6
➤ Intuitive idea: if problem A can be solved in polynomial time, so can
problem B
➤ Map instances of A —> instances of B while “preserving” answer
SAT has a poly
time algorithm
so doesindSet
idµy
iE
time
7
Garay Johnson
Sauppose
SAT
reduces to P
8
an efficient
reduction to SAT
provingthat SAT reducesto P
Factoring
2 ProblemP
9
Indset
SAT
Lp
CookLevin
then
a poly lime
reduction to
SAT
problemQE NP
problem 9 is NP hard if SAT EpQ
problem 9
is NP complete if Q CNPand
NP hard
ie
SAT Ep Q
h rd
pep hard
Halting
problem graph
isomorphism
Chess
matching
10
11
➤ See how to prove that a problem is NP complete — will use only a
couple of examples
➤ What about approximation?
12
➤ 3-SAT: special case of circuit satisfiability.
IndsetEp'sAT Goat find some problems sat
SAT Ep
problem
Problem
x
xn
boolean variables
Clauses
i
LORT
OR
I C
Xi
V Xia V Ti
either var or
t
neglvar
AND
CHE
ERI
ORD
I l
l
1
X
Xz
X n
3
does there exist
an
assignmentofTIF
ni
s t
is True
theorem
3 5
is
a YES instance
so is
u
NO
I
n
i
7 g n
n
I h
g isTRUE
13
n
Rule
2
can be written
as
E
hCzh
AZ
nZg E
Z
V
14
15
16
➤ Fundamental question: do NP-complete problems have good
approximation algorithms? (saw many examples)
➤ Are there limits to approximation?
17
➤ “Gap inducing reductions” ➤ SAT —> GAP-3-SAT
18
➤ 3-SAT —> Independent set
19