Math 2.0

Computer science Computational complexity: resources and classes Theorem

Savitch's theorem

Builds on Space complexityNondeterministic Turing machineNLPSPACE

Statement

Let s ⁣:ℕ→ℕs \colon \N \to \N be a function with s(n)≥log⁡2ns(n) \ge \log_2 n for all n≥1n \ge 1. Suppose that ss is space-constructible, that is, the binary form of s(n)s(n) can be computed from 1n1^n in O(s(n))O(s(n)) space. Then NSPACE(s(n))⊆DSPACE(s(n)2),\mathrm{NSPACE}(s(n)) \subseteq \mathrm{DSPACE}(s(n)^2), where NSPACE\mathrm{NSPACE} and DSPACE\mathrm{DSPACE} are the classes defined by space complexity of nondeterministic and deterministic Turing machines.

Remarks

Let NN be a nondeterministic Turing machine that uses space O(s(n))O(s(n)). On an input of length nn, it has at most 2c s(n)2^{c \, s(n)} configurations for some constant cc. The deterministic machine checks whether an accepting configuration can be reached from the start within 2c s(n)2^{c \, s(n)} steps. To test reachability within 2t2^{t} steps, it tries every middle configuration and tests both halves within 2t−12^{t-1} steps, reusing the same space. The recursion has depth O(s(n))O(s(n)) and each level stores one configuration of size O(s(n))O(s(n)), which gives space O(s(n)2)O(s(n)^2). Walter Savitch proved the theorem in 1970.

Consequences: NPSPACE, defined with nondeterministic machines in polynomial space, equals PSPACE, since the square of a polynomial is a polynomial. Also NL⊆DSPACE((log⁡n)2)\mathrm{NL} \subseteq \mathrm{DSPACE}((\log n)^2), where NL is the class NL.

Going deeper

For a student

The theorem is a statement about reachability in the configuration graph, solved by divide and conquer on the path length. It shows that polynomial space is the same with or without nondeterminism, so there is no space analogue of the P versus NP question at the polynomial level. Whether the square is needed is open; for example, it is unknown whether NL=L\mathrm{NL} = \mathrm{L}. The Immerman–Szelepcsényi theorem gives a different fact about nondeterministic space: it is closed under complement.

Reading path

To understand this page from the ground up, read these 5 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. NL concept
  2. Nondeterministic Turing machine concept
  3. PSPACE concept
  4. Space complexity concept
  5. Savitch's theorem statement

Where this leads

2 pages build on this one.

Further reading

  1. Web https://en.wikipedia.org/wiki/Savitch%27s_theorem
About this page
TagPFKWV5SFF5
URIm2://PFKWV5SFF5
Kindstatement, theorem
WritingW0 stub
MSC68Q15
StatusThis copy of the site has no build data. Run m2 status PFKWV5SFF5.
AboutSpace complexity
UsesSpace complexity, Nondeterministic Turing machine, NL, PSPACE
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

Used by