25. Space Complexity
Apr 14, 2022
Space complexity
PSPACE(f(n))
All deterministic decidable languages that use
- for deterministic Turing machine: maximum number of cells that the machine scans on any
input string of size
=> total space used .
NSPACE(f(n))
all non-deterministic decidable languages that use
- for non-deterministic Turing machine: maximum number of cells that the machine scans on any input string of size
in any computation path
Note: space is always bounded by time.
Examples:
-
SAT is a linear space problem -- given a formula, we can check in linear space every possible assignment to variables.
-
An interesting problem: ALL
-- it is not known if it is in NP, however the problem is in NSPACE(n)
Savitch's Theorem
NSPACE(
Given NTWM
=> recursion: CANYIELD
Possibilities for
Run CANYIELD
- depth of search tree:
- information stored at each tree level:
- total space:
Difficulty:
Check also if space used by NTM is more than
- Trivially: PSPACE
NPSPACE - From Savitch's theorem: NPSPACE
PSPACE
=> PSPACE = NPSPACE
P