Savitch's Theorem
   HOME

TheInfoList



OR:

In
computational complexity theory In theoretical computer science and mathematics, computational complexity theory focuses on classifying computational problems according to their resource usage, and relating these classes to each other. A computational problem is a task solved by ...
, Savitch's theorem, proved by
Walter Savitch Walter John Savitch (February 21, 1943 – February 1, 2021) was best known for defining the complexity class NL (complexity), NL (nondeterministic logarithmic space), and for Savitch's theorem, which defines a relationship between the NSPACE and ...
in 1970, gives a relationship between deterministic and non-deterministic
space complexity The space complexity of an algorithm or a computer program is the amount of memory space required to solve an instance of the computational problem as a function of characteristics of the input. It is the memory required by an algorithm until it ex ...
. It states that for any function f\in\Omega(\log(n)), :\mathsf\left(f\left(n\right)\right) \subseteq \mathsf\left(f\left(n\right)^2\right). In other words, if a
nondeterministic Turing machine In theoretical computer science, a nondeterministic Turing machine (NTM) is a theoretical model of computation whose governing rules specify more than one possible action when in some given situations. That is, an NTM's next state is ''not'' comp ...
can solve a problem using f(n) space, a
deterministic Turing machine A Turing machine is a mathematical model of computation describing an abstract machine that manipulates symbols on a strip of tape according to a table of rules. Despite the model's simplicity, it is capable of implementing any computer algori ...
can solve the same problem in the square of that space bound.Arora & Barak (2009) p.86 Although it seems that nondeterminism may produce exponential gains in time (as formalized in the unproven
exponential time hypothesis In computational complexity theory, the exponential time hypothesis is an unproven computational hardness assumption that was formulated by . It states that satisfiability of 3-CNF Boolean formulas cannot be solved more quickly than exponential t ...
), Savitch's theorem shows that it has a markedly more limited effect on space requirements.Arora & Barak (2009) p.92


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 In mathematics, and more specifically in graph theory, a directed graph (or digraph) is a graph that is made up of a set of vertices connected by directed edges, often called arcs. Definition In formal terms, a directed graph is an ordered pa ...
, which runs in O\left((\log n)^2\right) space for n vertices. The basic idea of the algorithm is to solve
recursively Recursion (adjective: ''recursive'') occurs when a thing is defined in terms of itself or of its type. Recursion is used in a variety of disciplines ranging from linguistics to logic. The most common application of recursion is in mathematics ...
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 Python may refer to: Snakes * Pythonidae, a family of nonvenomous snakes found in Africa, Asia, and Australia ** ''Python'' (genus), a genus of Pythonidae found in Africa and Asia * Python (mythology), a mythical serpent Computing * Python (pro ...
syntax) as follows: def stcon(s, t) -> bool: """Test whether a path of any length exists from s to t""" return k_edge_path(s, t, n) # n is the number of vertices def k_edge_path(s, t, k) -> bool: """Test whether a path of length at most k exists from s to t""" if k

0: return s

t if k

1: return (s, t) in edges for u in vertices: if k_edge_path(s, u, floor(k / 2)) and k_edge_path(u, t, ceil(k / 2)): return True return False
Because each recursive call halves the parameter k, the number of levels of recursion is \lceil\log_2 n\rceil. Each level requires O(\log n) bits of storage for its function arguments and
local variable In computer science, a local variable is a Variable (programming), variable that is given ''local scope (programming), scope''. A local variable reference in the subroutine, function or block (programming), block in which it is declared overrides ...
s: k and the vertices s, t, and u require \lceil\log_2 n\rceil bits each. The total auxiliary space complexity is thus O\left((\log n)^2\right). 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 In the study of graph algorithms, an implicit graph representation (or more simply implicit graph) is a graph whose vertices or edges are not represented as explicit objects in a computer's memory, but rather are determined algorithmically from so ...
. 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 A Turing machine is a mathematical model of computation describing an abstract machine that manipulates symbols on a strip of tape according to a table of rules. Despite the model's simplicity, it is capable of implementing any computer algori ...
. 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(2^), 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 In computational complexity theory, PSPACE is the set of all decision problems that can be solved by a Turing machine using a polynomial amount of space. Formal definition If we denote by SPACE(''t''(''n'')), the set of all problems that can b ...
=
NPSPACE In computational complexity theory, PSPACE is the set of all decision problems that can be solved by a Turing machine using a polynomial amount of space. Formal definition If we denote by SPACE(''t''(''n'')), the set of all problems that can b ...
: 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. ; NLL2 : That is, all languages that can be solved nondeterministically in logarithmic space can be solved deterministically in the complexity class \mathsf^2 =\mathsf\left(\left(\log n\right)^2\right). This follows from the fact that STCON is
NL-complete In computational complexity theory, NL-complete is a complexity class containing the languages that are complete for NL, the class of decision problems that can be solved by a nondeterministic Turing machine using a logarithmic amount of memory s ...
.


See also

*


Notes


References

* * * *{{citation , last = Sipser , first = Michael , author-link = Michael Sipser , contribution = Section 8.1: Savitch's Theorem , isbn = 0-534-94728-X , pages
279–281
, publisher = PWS Publishing , title = Introduction to the Theory of Computation , year = 1997 , url-access = registration , url = https://archive.org/details/introductiontoth00sips/page/279


External links

* Lance Fortnow,

'. Accessed 09/09/09. *
Richard J. Lipton Richard Jay Lipton (born September 6, 1946) is an American computer scientist who is Associate Dean of Research, Professor, and the Frederick G. Storey Chair in Computing in the College of Computing at the Georgia Institute of Technology. He has ...
,
Savitch’s Theorem
'. Gives a historical account on how the proof was discovered. Structural complexity theory Theorems in computational complexity theory