Computational Complexity: Lecture 5 - Space and Nondeterminism, Study notes of Computational Methods

A lecture note from cs221: computational complexity course, taught by prof. Salil vadhan. The lecture, titled 'space and nondeterminism', was held on september 30, 2002. Topics such as hierarchy theorems, space complexity classes, and nondeterminism. It discusses the almost everywhere hierarchy theorem, space complexity classes (log space, polynomial space), and nondeterminism, including its definition, relation to deterministic tms, and examples of problems in np.

Typology: Study notes

2010/2011

Uploaded on 10/28/2011

thecoral
thecoral 🇺🇸

4.5

(30)

395 documents

1 / 3

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CS221: Computational Complexity Prof. Salil Vadhan
Lecture 5: Space and Nondeterminism
September 30, 2002 Scribe: Trevor Bass
Contents
1 Agenda 1
2 Hierarchy Theorems, Continued 1
3 Space Complexity Classes 2
4 Nondeterminism 2
1 Agenda
Space and Nondeterministic complexity classes
Nondeterministic hierarchy theorem
Relating time, space, and nondeterminism
Reductions and completeness
2 Hierarchy Theorems, Continued
Theorem 1 (Almost everywhere hierarchy) If fis a proper complexity function, there exists
a language LTIME(2O(n)f(n)2)such that any Mwith L(M) = L(i.e. with no errors) takes
time > f(n)almost everywhere (i.e. Lis “hard” a.e.).
Last time we constructed L, but we didn’t verify LTIME(2O(n)f(n)2). Where does the expo-
nential factor come from? To decide Lon input x, recall that we needed to look at all strings yx
(lexicographically). Fully verifying the time bound is left as an exercise.
Corollary 2 There exists a language LEXP(= TIME(2nO(1))) such that deciding Ltakes time
>2na.e.
Another form of Lis hard often” introduces the notion of “average-case complexity”: Mrunning
in time f(n), the fraction of inputs on which M(x)6=χL(x) is at least a constant δasymptotically
as n . Noting that the all-1 or all-0 TM is correct 50% of the time asymptotically, we could
ideally hope to have δto be something like 49%.
1
pf3

Partial preview of the text

Download Computational Complexity: Lecture 5 - Space and Nondeterminism and more Study notes Computational Methods in PDF only on Docsity!

CS221: Computational Complexity Prof. Salil Vadhan

Lecture 5: Space and Nondeterminism

September 30, 2002 Scribe: Trevor Bass

Contents

1 Agenda 1

2 Hierarchy Theorems, Continued 1

3 Space Complexity Classes 2

4 Nondeterminism 2

1 Agenda

  • Space and Nondeterministic complexity classes
  • Nondeterministic hierarchy theorem
  • Relating time, space, and nondeterminism
  • Reductions and completeness

2 Hierarchy Theorems, Continued

Theorem 1 (Almost everywhere hierarchy) If f is a proper complexity function, there exists a language L ∈ TIME(2O(n)f (n)^2 ) such that any M with L(M ) = L (i.e. with no errors) takes time > f (n) almost everywhere (i.e. L is “hard” a.e.).

Last time we constructed L, but we didn’t verify L ∈ TIME(2O(n)f (n)^2 ). Where does the expo- nential factor come from? To decide L on input x, recall that we needed to look at all strings y ≤ x (lexicographically). Fully verifying the time bound is left as an exercise.

Corollary 2 There exists a language L ∈ EXP(= TIME(2n O(1) )) such that deciding L takes time

2 n^ a.e.

Another form of “L is hard often” introduces the notion of “average-case complexity”: ∀M running in time f (n), the fraction of inputs on which M (x) 6 = χL(x) is at least a constant δ asymptotically as n → ∞. Noting that the all-1 or all-0 TM is correct 50% of the time asymptotically, we could ideally hope to have δ to be something like 49%.

3 Space Complexity Classes

Definition 3 SPACE(f (n)) is the set of languages decidable by a TM in space f (n).

Recall that “space” refers only to workspace, which does not include the input and output.

Definition 4 (“Log space”) L =

c

SPACE(c log n).

Definition 5 (“Polynomial space”) PSPACE =

c

SPACE(nc).

Log space is the smallest complexity class we will study in this course. Constant space can be hardwired into the finite state control of a TM (i.e. SPACE(O(1)) = SPACE(0)). In fact:

Remark 6 SPACE(log log n) = SPACE(O(1)) = SPACE(0) = {regular languages}.

Notice that log n bits are needed even to keep a pointer in the input or to calculate the size of the input. L is thus a good measure of feasible computation for massive data sets: with it one can keep track of a constant number of pointers, but cannot do too much more.

The following operations are typical of problems in L: addition (trivial to prove this), multiplication (on problem set 1), and division (difficult—solved in 2001).

On the other hand, PSPACE is much more powerful; typical problems are games (e.g. does player 1 have a winning strategy from a given position in some game?), such as go, chess, and geography.

On problem set 1, we will see that there is a hierarchy theorem for space. A corollary to this theorem is:

Corollary 7 L 6 = PSPACE.

4 Nondeterminism

Recall that a nondeterministic TM (NTM) is just like a deterministic TM except that at any time step there can be several options for the possible next states, what it writes, and so on, such that the transition function becomes a transition relation. Thus on a given input, there can be many different possible computations, corresponding to all possible nondeterministic choices.

Definition 8 An NTM M accepts x if there exists a computation of M on x that halts and outputs

  1. Similarly, its language L(M ) = {x : ∃ computation of M on x that halts and outputs 1 .} (i.e. “guess and verify”).

The running time of an NTM on x is the maximum running time used on input x over all computa- tions, even those that do not output 1, and is denoted NTIME(f (n)). The space used on x is the maximum workspace used on x over all computations, and is denoted NSPACE(f (n)). Note that if the NTM doesn’t halt on a certain set of choices, it can be redefined by limiting all computations to a particular running time. Analogous to the deterministic class we define NPdef =

c NTIME(n

c),

NEXP =

c NTIME( nc ), NL = ⋃ c NSPACE(c^ log^ n), and^ NPSPACE^ =^

c NSPACE( nc ).