In computational complexity theory, the space hierarchy theorems are separation results that show that both deterministic and nondeterministic machines can solve more problems in (asymptotically) more space, subject to certain conditions. For example, a deterministic Turing machine can solve more decision problems in space n log n than in space n. The somewhat weaker analogous theorems for time are the time hierarchy theorems.
The foundation for the hierarchy theorems lies in the intuition that with either more time or more space comes the ability to compute more functions (or decide more languages). The hierarchy theorems are used to demonstrate that the time and space complexity classes form a hierarchy where classes with tighter bounds contain fewer languages than those with more relaxed bounds. Here we define and prove the space hierarchy theorem.
The space hierarchy theorems rely on the concept of space-constructible functions. The deterministic and nondeterministic space hierarchy theorems state that for all space-constructible functions f(n),
where SPACE stands for either DSPACE or NSPACE.
Contents |
Formally, a function is space-constructible if and there exists a Turing machine which computes the function in space when starting with an input , where represents a string of s. Most of the common functions that we work with are space-constructible, including polynomials, exponents, and logarithms.
For every space-constructible function , there exists a language that is decidable in space but not in space .
The goal here is to define a language that can be decided in space but not space . Here we define the language :
Now, for any machine that decides a language in space , will differ in at least one spot from the language of , namely at the value of . The algorithm for deciding the language is as follows:
Note on step 3: Execution is limited to steps in order to avoid the case where does not halt on the input . That is, the case where consumes space of only as required, but runs for infinite time.
The space hierarchy theorem is stronger than the analogous time hierarchy theorems in several ways:
It seems to be easier to separate classes in space than in time. Indeed, whereas the time hierarchy theorem has seen little remarkable improvement since its inception, the nondeterministic space hierarchy theorem has seen at least one important improvement by Viliam Geffert in his 2003 paper "Space hierarchy theorem revised". This paper made several striking generalizations of the theorem:
For any two functions , , where (n) is o((n)) and is space-constructible, SPACE((n)) SPACE((n)).
This corollary lets us separate various space complexity classes. For any function is space-constructible for any natural number k. Therefore for any two natural numbers we can prove SPACE() SPACE(). We can extend this idea for real numbers in the following corollary. This demonstrates the detailed hierarchy within the PSPACE class.
For any two real numbers 0 SPACE() SPACE().
Savitch's theorem shows that NL SPACE(), while the space hierarchy theorem shows that SPACE( SPACE(). Thus we get this corollary along with the fact that TQBF NL since TQBF is PSPACE-complete.
This could also be proven using the non-deterministic space hierarchy theorem to show that NL NPSPACE, and using Savitch's theorem to show that PSPACE = NPSPACE.
This last corollary shows the existence of decidable problems that are intractable. In other words their decision procedures must use more than polynomial space.
There are problems in PSPACE requiring an arbitrarily large exponent to solve; therefore PSPACE does not collapse to DSPACE(nk) for some constant k.