Title: Proof that Clique is NPComplete
1Computer Science 500 Spring, 1999 Tuesday,
April 22
2NP those things that are Polynomial Time
Verifiable
L is Polynomial Time Verifiable iff There is k, a
language L2 in P L x w, w O(xk),
such that (w,x) is in L2
E
Aka witness, certificate, proof of
membership
NP ?p1
3- Space complexity -- some definitions
- SPACE(f(n)) L ??k,M s.t. M decides
- L in tape space f(n)
- NSPACE(f(n)) L ??k,N s.t. N.T.M N
- decides L in tape space f(n)
- PSPACE ? SPACE(nk)
?
k1
4Savitchs Theorem
SPACE(f(n)2) ? NSPACE(f(n))
Let L be decided by NTM N in NSPACE(f(n)) Define
possible(c1,c2,m) to be true iff N can transition
from configuration c1 to c2 within m steps
5Idea x in L iff possible(start configuration,
accept configuration, 2f(n)) Idea
possible(c1,c2, t) iff there is config c3 such
that possible(c1,c3, t/2) and possible(c3,c2,
t/2)
6possible(start configuration, accept
configuration, 2f(n))
Runtime stack has depth f(n) with O(f(n)) space
per call
7PSPACE completeness
Language L is PSPACE-complete iff 1. L is in
PSPACE 2. Every language L in PSPACE is
reducible to L via a polynomial time reduction
8Theorem
If L is PSPACE-complete and L is in P, then P
PSPACE
9(Totally) Quantified Boolean Formula posterchild
PSPACE-complete language
TQBF ? ? is a true totally quantified boolean
formula
E.g. ?? x1 x2 (x1 OR x2) is in
TQBF whereas ?? x1 x2 (x1 AND x2) is
not inTQBF
E A
E A
10TheoremTQBF is PSPACE-complete
1. TQBF is in PSPACE to see if ? is in
TQBF, see if there is a value x1 such that for
all x2, ? is in TQBF where ? ?? with x1 and
x2 removed This recursive idea requires a
placeholder for each variable
11Proof TQBF is PSPACE-hard
2. Every language L in PSPACE is reducible to
TQBF via a polynomial time reduction
Suppose NTM N decides L is space nk Goal Given
(N,w), efficiently construct a boolean formula
? such that ?????? is in TQBF
N has an accepting
path on w
12 Idea Given (N,w), consider a 2nk by nk tableau
similar to that of Cooks theorem
Ns configuration
c1,1 c1,2 c1,3c1,4 c1,nk c2,1 c2,2
c2,3 c2,4 c2,nk . . . cnk,,1
cnk,2 cnk,3 cnk,4 cnk,nk
1 2 2nk
time
13Proof TQBF is PSPACE-hard
If N accepts w, then there is a legal tableau
that looks like this
Current state and implicit location of the
tape head
Ns configuration
q0 w1 w2 wn U U c2,2 c2,3 c2,4
c2,nk1 c3,2 c3,3 c3,4
c3,nk1 any accept
configuration
1 2 2nk
time
14Idea
We construct ?c1,c2,t which is in TQBF iff N can
transition between configurations c1 and c2
within at most t steps In particular, we
construct ?cstart,caccept,2nk recursively ?c1,c2,t
c3 ?(c1,c3,t/2) AND ?(c3,c2,t/2) leads
to an exponential size formula with only
existential quantifiers But ?c1,c2,t c3
(x,y) in (c1,c3), (c3,c2) ?(c1,c3,t/2) AND
?(c3,c2,t/2)
E
A E
15Log space and Non-deterministic Log
spaceLogSpace SPACE(log(n)) NL
NSPACE(log(n))
Log(n) space for work Input is read-only
16Log-space reductions
Input Tape
Read only Write only Log Space for read and
write
Output Tape
Work Tape
17L is NL-completeiff
1. L is in NL 2. Every language L in NL is
log-space reducible to L
18PATH
PATH (G,s,t) G is a directed graph with a
path that starts at vertex s and ends at vertex t
19Theorem (not proved in class)PATH is NL-complete