{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

lecture6

# lecture6 - Notes on Complexity Theory Last updated...

This preview shows pages 1–3. Sign up to view the full content.

Notes on Complexity Theory Last updated: September, 2011 Lecture 6 Jonathan Katz 1 Space Complexity We define some of the important space-complexity classes we will study: Definition 1 PSPACE def = S c space ( n c ) NPSPACE def = S c nspace ( n c ) L def = space (log n ) NL def = nspace (log n ) . We have seen that time ( t ( n )) ntime ( t ( n )) space ( t ( n )). What can we say in the other direction? To study this we look at configurations of a Turing machine, where a configuration consists of all the information necessary to describe the Turing machine at some instant in time. We have the following easy claim. Claim 1 Let M be a (deterministic or non-deterministic) machine using space s ( n ) . The number of configurations C M ( n ) of M on any fixed input of length n is bounded by: C M ( n ) ≤ | Q M | · n · s ( n ) · | Σ M | s ( n ) , (1) where Q M are the states of M and Σ M is the alphabet of M . In particular, when s ( n ) log n we have C M ( n ) = 2 Θ( s ( n )) . Proof The first term in Eq. (1) comes from the number of states, the second from the possible positions of the input head, the third from the possible positions of the work-tape head, and the last from the possible values stored on the work tape. (Note that since the input is fixed and the input tape is read-only, we do not need to consider all possible length- n strings that can be written on the input tape.) We can use this to obtain the following relationship between space and time: Theorem 2 Let s ( n ) be space constructible with s ( n ) log n . Then space ( s ( n )) time (2 O ( s ( n )) ) and nspace ( s ( n )) ntime (2 O ( s ( n )) ) . Proof Let L space ( s ( n )), and let M be a machine using space O ( s ( n )) and deciding L . Consider the computation of M ( x ) for some input x of length n . There are at most C M ( n ) = 2 Θ( s ( n )) configurations of M on x , but if M ( x ) ever repeats a configuration then it would cycle and never halt. Thus, the computation of M ( x ) must terminate in at most C M ( n ) = 2 Θ( s ( n )) steps. 6-1

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Let L nspace ( s ( n )). Then there is a non-deterministic Turing machine M deciding L and using space O ( s ( n )) on every computation path (i.e., regardless of the non-deterministic choices it makes). Consider a machine M 0 that runs M but only for at most 2 O ( s ( n )) ≥ C M ( n ) steps (and rejects if M has not halted by that point); this can be done using a counter of length O ( s ( n )) and so M 0 still uses O ( s ( n )) space. We claim that M 0 still decides L . Clearly if M ( x ) = 0 then M 0 ( x ) = 0. If M ( x ) = 1, consider the shortest computation path on which M ( x ) accepts. If this computation path uses more than C M ( | x | ) steps, then some configuration of M must repeat. But then there would be another sequence of non-deterministic choices that would result in a shorter accepting computation path, a contradiction. We conclude that M ( x ) has an accepting computation path of length at most C M ( | x | ), and so if M ( x ) accepts then so does M 0 ( x ).
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 4

lecture6 - Notes on Complexity Theory Last updated...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online