Math 2.0

Computer science Computational complexity: resources and classes Theorem

Space hierarchy theorem

Builds on Space complexityLNLPSPACESavitch's theorem

Statement

Let f ⁣:ℕ→ℕf \colon \N \to \N be a function with f(n)≥log⁡2nf(n) \ge \log_2 n for all n≥1n \ge 1. Suppose that ff is space-constructible, that is, the binary form of f(n)f(n) can be computed from 1n1^n in O(f(n))O(f(n)) space. Then there is a language that a deterministic Turing machine decides in space O(f(n))O(f(n)) but that no deterministic Turing machine decides in space o(f(n))o(f(n)). In terms of space complexity, DSPACE(g(n))⊊DSPACE(f(n))\mathrm{DSPACE}(g(n)) \subsetneq \mathrm{DSPACE}(f(n)) for every function gg with g(n)=o(f(n))g(n) = o(f(n)).

Remarks

The proof is a diagonalization. A machine DD, on input ww, marks off f(∣w∣)f(\abs{w}) cells and simulates the machine encoded by ww on ww within that space. It then answers the opposite. A machine using space o(f(n))o(f(n)) is simulated within the bound on long enough inputs, so it cannot decide the same language as DD. Richard Stearns, Juris Hartmanis and Philip Lewis proved the theorem in 1965.

Consequences: L⊊PSPACE\mathrm{L} \subsetneq \mathrm{PSPACE}, where L is the class L and PSPACE is the class PSPACE. By Savitch's theorem, NL lies in DSPACE((log⁡n)2)\mathrm{DSPACE}((\log n)^2), so also NL⊊PSPACE\mathrm{NL} \subsetneq \mathrm{PSPACE}. The space-constructibility hypothesis is needed: without it, the Borodin gap theorem gives functions ff with DSPACE(f(n))=DSPACE(2f(n))\mathrm{DSPACE}(f(n)) = \mathrm{DSPACE}(2^{f(n)}).

Going deeper

For a student

The space hierarchy is tighter than the time hierarchy, because simulating a machine costs only a constant factor in space but a logarithmic factor in time. It is one of the few unconditional separations of complexity classes. It shows that at least one of the inclusions L⊆P⊆NP⊆PSPACE\mathrm{L} \subseteq \mathrm{P} \subseteq \mathrm{NP} \subseteq \mathrm{PSPACE} is strict, though it does not say which.

Reading path

To understand this page from the ground up, read these 7 pages in order. The foundations come first.

Show the path as a graph
Each page uses the pages above it. The colour of the bar on a box shows how strong the evidence is, and the box also gives it as text. The list has the same pages.
  • no evidence level
  1. L concept
  2. NL concept
  3. Nondeterministic Turing machine concept
  4. PSPACE concept
  5. Space complexity concept
  6. Savitch's theorem statement
  7. Space hierarchy theorem statement

Further reading

  1. Web https://en.wikipedia.org/wiki/Space_hierarchy_theorem
About this page
TagR06DB3S2PV
URIm2://R06DB3S2PV
Kindstatement, theorem
WritingW0 stub
MSC68Q15
StatusThis copy of the site has no build data. Run m2 status R06DB3S2PV.
AboutSpace complexity
UsesSpace complexity, L, NL, PSPACE, Savitch's theorem
Same as
Changed3 November 2026

Markdown · JSON · Edit on GitHub

What this page needs for W1

  • an inventory row: the row of the inventory that the node accounts for (0 of 1)
  • a source with a locator (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

No page links to this page yet.