ArticleslgStudy

mathematics

Savitch's theorem

Savitch's theorem is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Savitch's theorem rather than just read about it. In short: In computational complexity theory, Savitch's theorem, proved by Walter Savitch in 1970, gives a relationship between deterministic and non-deterministic space complexity. It states that for any space-constructable function f∈Ω(log⁡(n)), 𝖭𝖲𝖯𝖠𝖢𝖤(f(n))⊆𝖣𝖲𝖯𝖠𝖢𝖤(f(n)2).

Key takeaways

  • Savitch's theorem belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Savitch's theorem to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Savitch's theorem from memory before moving on to harder problems.

Reference excerpt

In computational complexity theory, Savitch's theorem, proved by Walter Savitch in 1970, gives a relationship between deterministic and non-deterministic space complexity. It states that for any space-constructable function f∈Ω(log⁡(n)),

𝖭𝖲𝖯𝖠𝖢𝖤(f(n))⊆𝖣𝖲𝖯𝖠𝖢𝖤(f(n)2). In other words, if a nondeterministic Turing machine can solve a problem using f(n) space, a deterministic Turing machine can solve the same problem in the square of that space bound. Although it seemed as of 2009 that nondeterminism may produce exponential gains in time (as formalized in the unproven exponential time hypothesis), Savitch's theorem shows that it has a markedly more limited effect on space requirements. The theorem can be relativized. That is, for any oracle, replacing every "Turing machine" with "oracle Turing machine" would still result in a theorem.

Proof The proof relies on an algorithm for STCON, the problem of determining whether there is a path between two vertices in a directed graph, which runs in O((log⁡n)2) space for n vertices. The basic idea of the algorithm is to solve recursively a somewhat more general problem, testing the existence of a path from a vertex s to another vertex t that uses at most k edges, for a parameter k given as input. STCON is a special case of this problem where k is set large enough to impose no restriction on the paths (for instance, equal to the total number of vertices in the graph, or any larger value). To test for a k-edge path from s to t, a deterministic algorithm can iterate through all vertices u, and recursively search for paths of half the length from s to u and from u to t. This algorithm can be expressed in pseudocode (in Python syntax) as follows:

Because each recursive call halves the parameter k, the number of levels of recursion is ⌈log2n⌉. Each level requires O(log⁡n) bits of storage for its function arguments and local variables: k and the vertices s, t, and u require ⌈log2n⌉ bits each. The total auxiliary space complexity is thus O((log⁡n)2). The input graph is considered to be represented in a separate read-only memory and does not contribute to this auxiliary space bound. Alternatively, it may be represented as an implicit graph. Although described above in the form of a program in a high-level language, the same algorithm may be implemented with the same asymptotic space bound on a Turing machine. This algorithm can be applied to an implicit graph whose vertices represent the configurations of a nondeterministic Turing machine and its tape, running within a given space bound f(n). The edges of this graph represent the nondeterministic transitions of the machine, s is set to the initial configuration of the machine, and t is set to a special vertex representing all accepting halting states. In this case, the algorithm returns true when the machine has a nondeterministic accepting path, and false otherwise. The number of configurations in this graph is O(2f(n)), from which it follows that applying the algorithm to this implicit graph uses space O(f(n)2). Thus by deciding connectivity in a graph representing nondeterministic Turing machine configurations, one can decide membership in the language recognized by that machine, in space proportional to the square of the space used by the Turing machine.

Corollaries Some important corollaries of the theorem include:

PSPACE = NPSPACE That is, the languages that can be recognized by deterministic polynomial-space Turing machines and nondeterministic polynomial-space Turing machines are the same. This follows directly from the fact that the square of a polynomial function is still a polynomial function. It is believed that a similar relationship does not exist between the polynomial time complexity classes, P and NP, although this is still an open question. NL ⊆ L2 That is, all languages that can be solved nondeterministically in logarithmic space can be solved deterministically in the complexity class 𝖫2=𝖣𝖲𝖯𝖠𝖢𝖤((log⁡n)2). This follows from the fact that STCON is NL-complete.

See also Immerman–Szelepcsényi theorem – Closure of nondeterministic space under complementation

Notes

References

External links Lance Fortnow, Foundations of Complexity, Lesson 18: Savitch's Theorem. Accessed 2009-09-09. Richard J. Lipton, Savitch’s Theorem. Gives a historical account on how the proof was discovered.

Worked examples

Example 1 — a first encounter with Savitch's theorem

Start with the simplest possible case. Write down what Savitch's theorem claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Savitch's theorem before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Savitch's theorem ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Savitch's theorem

In research
Savitch's theorem appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Savitch's theorem in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Savitch's theorem is common in secondary-school and first-year university syllabi. It links to neighbouring topics Structural complexity theory, Theorems in computational complexity theory, so understanding it makes those chapters shorter.
In everyday life
Look for Savitch's theorem outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Savitch's theorem” →

How to study Savitch's theorem in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Savitch's theorem means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Savitch's theorem out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Savitch's theorem in simple terms?

In computational complexity theory, Savitch's theorem, proved by Walter Savitch in 1970, gives a relationship between deterministic and non-deterministic space complexity. It states that for any space-constructable function f∈Ω(log⁡(n)), 𝖭𝖲𝖯𝖠𝖢𝖤(f(n))⊆𝖣𝖲𝖯𝖠𝖢𝖤(f(n)2).

Why does Savitch's theorem matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Savitch's theorem?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Savitch's theorem.

Tags

  • Structural complexity theory
  • Theorems in computational complexity theory

Keep exploring