Computer Science 500 Theory of Computation Spring, 2000, March 27

1 / 30
About This Presentation
Title:

Computer Science 500 Theory of Computation Spring, 2000, March 27

Description:

Computer Science 500. Theory of Computation. Spring, 2000, March 27. 1. Complexity Theory ... Liso = {(G1, G2): G1and G2 are isomorphic graphs} example ... –

Number of Views:52
Avg rating:3.0/5.0
Slides: 31
Provided by: petersg
Category:

less

Transcript and Presenter's Notes

Title: Computer Science 500 Theory of Computation Spring, 2000, March 27


1
Computer Science 500Theory of ComputationSpring,
2000, March 27 1. Complexity Theory 2. HW 6
due next Wednesday
2
Time complexity
TIME(T) L ? T.M. M s.t. 1) L(M) L
and 2) ? inputs w, M halts on w
in O(T) steps
3
Polynomial Time
8
P Uk1 TIME(nk)
4
A language known to be in P
example
Ldiv k,N N 0 mod k
5
A language not known to be in P
example
SAT f f is a boolean formula s.t. ? x1, x2
xn s.t. f(x1, x2 xn) true. f f has a
satisfying assignment
6
A language not known to be in P
example
Lfactor (k,N) N has a prime
factor less than k
7
A language not known to be in P
example
Liso (G1, G2) G1and G2 are isomorphic
graphs
8
Running Time for Non-deterministic Machines
steps
accept
reject
Non-deterministic
Deterministic
9
Time classes NTIME(f)
NTIME(T) L ? Non-deterministic T.M. M such
that 1) L(M) L and 2) ? inputs w, ?
computation branches b, M halts on w in O(T)
steps
10
Theorem
NTIMEf(n) ? TIME2O(f(n))
11
To prove ? L, L ? NTIMEf(n) ?L ?
TIME2O(f(n))
Assume L ? NTIMEf(n), accepted by N.T.M. N in
time O(f(n)). Construct D.T.M. D simulate
N on all non-deterministic choices
(witnesses), accept iff an accepting path is found
12
Claim ? w, N acc w ?D acc w
13
Definition of NP
8
NP Uk1 NTIME(nk)
14
Note
NP ? EXP-Time where EXP-Time Uk1
TIME2O(nk)
8
15
Polynomial Time Verifiabledefinition
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
Sp1
16
Theorem
L is Polynomial Time Verifiable ? L ? NP
17
Proof
( ) If L is p-time verifiable, define NTM N
that guesses witness w and runs DTM for L2 (
) If L is in NP with NTM N, DTM simulates N on
non-deterministic choices w
18
Languages in NPexamples
Ldiv, Lconn , SAT, Lfactor, Liso
Known to be in P, hence in NP
Known to be in NP
19
A language known to be in NP
example
SAT f f is a boolean formula that has a
satisfying assignment
Polynomial verifier guess assignment to
variables, plug into f, verify
20
A language known to be in NP
example
Lfactor (k,N) N has a non- trivial factor
less than k
  • Polynomial verifier
  • guess 1ltdltk
  • divide d into N
  • determine whether the remainder is 0

21
A language known to be in NP
example
Liso (G1, G2) G1and G2 are isomorphic
graphs
Polynomial verifier guess p verify that G2
p(G1)
22
co-NPdefinition
co-NP L L is in NP There is k, a language
L in P L x w, w O(xk),
such that (w,x) is in L
A
Pp1
23
Polynomial-time Reductions
  • A function f is a polynomial-time reduction from
    language L1 to language L2 iff
  • f is computable in polynomial time
  • for all x, x ? L1 f(x) ? L2
  • L1 ltp L2

24
NP-harddefinition
A language L is NP-hard iff ? L in NP, L
ltp L
25
NP-completedefinition
A language L is NP-complete iff 1) L ? NP
2) L is NP-hard
26
Theorem (Cook-Levin)SAT is NP-complete
Proof We already know SAT is in NP. So, we
only need to show that SAT is NP-hard. Let L be
any language in NP. We demonstrate a p-time
reduction from L to SAT
27
Proof SAT is NP-hard
Suppose NTM N decides L is time nk-3 Goal
Given (N,w), efficiently construct a boolean
formula ? such that ? has a satisfying
N has an accepting assignment
path on w
28
Idea Given (N,w), build a table (tableau)
Ns configuration
v1,1 v1,2 v1,2v1,2 v1,nk v2,1
v2,2 v2,2 v2,2
v2,nk . . . Vnk,,1 vnk,2 vnk,2 vnk,2
vnk,nk
1 2 nk
time
29
Proof SAT is NP-hard
If N accepts w, then there is a legal tableau
that looks like this
Ns configuration
q0 w1 w2 wn U U v2,2 v2,2 v2,2
v2,nk1 v3,2 v3,2 v3,2
v3,nk1 any accept
configuration
1 2 nk
time
30
Proof SAT is NP-hard
Constructing ?
? ?cell AND ?move AND ?start AND ?accept
Each cell contains exactly one
Write a Comment
User Comments (0)
About PowerShow.com