Download presentation

Presentation is loading. Please wait.

Published byBrent Stewart Modified over 2 years ago

1
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen

2
Chapter 8 Space Complexity

3
Topics Savitch’s Theorem PSPACE Class, PSPACE-Completeness, The TQBE Problem L and NL NL-Completeness, the PATH Problem NL=co-NL

4
Space Complexity Definition. Let M be a DTM that halts on all inputs. The space complexity of M is the function where f(n) is the maximum number of tape cells that M scans on any input of length n. We say M runs in space f(n). If M is a NTM wherein all branches halt on all inputs, we define its space complexity f(n) to be the maximum number of tape cells that M scans on any branch of its computation for any input of length n.

5
Space Complexity Classes Definition Let be a function. We define space complexity classes L is a language decided by an O(f(n)) space DTM} L is a language decided by an O(f(n)) space NTM}

6
Examples

7
Savitch’s Theorem Theorem. For any function where we have

8
Proof. For space O(f(n)), the total number of config’s is Use “binary-search” to decide whether C-start yields c-accept in steps. Use a stack to maintain the recursive calls. Initial Config C-start Final Config c-accept mid Config c-middle

9
PSPACE vs. NPSPACE Definition By Savitch’s Theorem,

10
A New World P NP NP-complete PSPACE EXPTIME

11
PSPACE-Completeness Definition A language B is PSPACE-complete if 1. B is in PSPACE 2. Every language in PSPACE is ploy-time reducible to B. If M merely satisfies condition 2, we say B is PSPACE-hard.

12
The TQBF Problem Quantified Boolean functions or and is a Boolean CNF formula. is true if exists some value of is true. is true if for all values of is true. Example

13
TQBF TQBF is the set of all true fully quantified Boolean formulas. The TQBF problem is to determine whether a fully quantified Boolean formula is true or false.

14
TQBF is PSPACE-complete. Proof. We can view the evaluation process of a given fully quantified formula as a tree, performing depth-first search of the tree gives a poly-space algorithm. So, TQBF is in PSPACE. To prove TQBF is PSPACE-hard, we need to construct a fully quantified Boolean formula to simulate the computation of a given space TM M so that

17
The Classes L and NL Sublinear space TM: A TM M with one read-only input tape and read/write work tape. The read head remains in the portion of the input tape containing the input. The space used on the work tape contributes to the space complexity. Definition Example

18
The PATH problem

19
PATH is in P Easy PATH is in NL Starting a node s, the machine records only the current node and nondeterministically guesses the next node among those adjacent to the current node. Repeat until t is found, or all m guesses have been done, where m is the number of nodes. This is done in NL.

20
New Configurations If M is a TM that has a separate read-only input tape and w is an input, a configuration of M on w is the setting the state, the work tape, and the positions of the two tape heads. The input w is not part of the configuration of M on w. q

21
NL-Completeness Log space transducer: A TM with a r-only input tape, and r/w work tape and a w-only output tape. A log space transducer computes a function using log space of work tape, the result of the function is written on the output tape. Log space reduction:

22
A language B is NL-complete if However, L=?NL is also open.

23
PATH is NL-Complete Proof. PATH is in NL is known Need to show every A in NL is log space reducible to PATH. Let the log space NTM M computing A. Simulate the computation of M on w, find all possible configurations of M on w to express nodes for a directed graph. Let s be and t be the start and accept configurations of M on w. Have an edge from one node to another node is the first yields the second. M accepts w iff there is a directed path from the start node to the accept node.

25
NL=Co-NL Proof. Since PATH is in NL, it suffices to show

26
Suppose we know that the number of nodes in G that are reachable from s is c. Nondeterministically select exactly c nodes reachable from s, not including t, and prove that each is reachable from s by guessing the path. If this is true, then the remaining nodes, including t, is not reachable from s, so accept. Otherwise, reject.

27
How to compute the number of nodes reachable from s?

Similar presentations

OK

Complexity ©D.Moshkovitz 1 Turing Machines. Complexity ©D.Moshkovitz 2 Motivation Our main goal in this course is to analyze problems and categorize them.

Complexity ©D.Moshkovitz 1 Turing Machines. Complexity ©D.Moshkovitz 2 Motivation Our main goal in this course is to analyze problems and categorize them.

© 2018 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on essential amino acids Ppt on biodiesel in india Ppt on life history of rabindranath tagore Ppt on production process of wine Ppt on van de graaff generator belts Cartoon magazine ppt online Ppt on edge detection circuit Ppt on nuclear energy in india Ppt on iron and steel industry in india Ppt on sound navigation and ranging system one