Practice Midterm #2 Answers
Originally Posted By: jnewth
Problem 5. State and prove Savitch's Theorem.
This proof is in the book on page 86. The professor's proof of Savitch's Theorem is presented as an example using PATH in October 19th's notes. I will explain the book's proof.
The theorem is stated as:
For any space constructible function S: N->N with S(n) >= log n, NSPACE(S(n)) is contained in SPACE(S(n)^2)
For a language L in NSPACE(S(n)) there is a Turing Machine called TM running on an input x of length that decides that language in space S(n). The configuration graph G for such a machine takes at most M = 2^O(S(n)) vertices, and determining whether TM accepts x is the same as finding a path from Cstart to Caccept. This is because all possible values for a binary string of length n is 2^n. The state of the machine at any time is one of those strings.
The proof involves describing a way of finding that path deterministically in S(n)^2. The longest any path can be is one that passes through all nodes, so we describe the maximum possible length as 2^i. The proof describes a function Reach(u,v,i), which returns true iff there is a path from u, v, in at most 2^i steps. We then solve this problem recursively, observing
Reach(u,v,i) = Reach(u,z,i-1) and Reach(z,v,i-1)
by iterating over all possible nodes for z. Please note, Reach(u,z,i-1) means a path from u to z in 2^i-1 steps or rather 2^i / 2 steps.
We can reuse the space to compute each invocation of Reach, but at each recursive call, we need to keep track of the z we are currently splitting the search on, and to identify any particular node in the graph G requires log(M) space. We can divide the search space by two a total of log(M) times, so we need to keep track of log(M) space for each of log(M) divisions or log(M)*log(M).
For the final part, we observe that log(M) = log(2^O(S(n)) = S(n), so
log(M)*log(M) = S(n)^2
which is the statement of Savitch's Theorem.
'''Originally Posted By: jnewth'''
<br>Problem 5. State and prove Savitch's Theorem.<br><br><br>This proof is in the book on page 86. The professor's proof of Savitch's Theorem is presented as an example using PATH in October 19th's notes. I will explain the book's proof.<br><br>The theorem is stated as:<br><br><br>For any space constructible function S: N->N with S(n) >= log n, NSPACE(S(n)) is contained in SPACE(S(n)^2)<br><br><br>For a language L in NSPACE(S(n)) there is a Turing Machine called TM running on an input x of length that decides that language in space S(n). The configuration graph G for such a machine takes at most M = 2^O(S(n)) vertices, and determining whether TM accepts x is the same as finding a path from Cstart to Caccept. This is because all possible values for a binary string of length n is 2^n. The state of the machine at any time is one of those strings.<br><br>The proof involves describing a way of finding that path deterministically in S(n)^2. The longest any path can be is one that passes through all nodes, so we describe the maximum possible length as 2^i. The proof describes a function Reach(u,v,i), which returns true iff there is a path from u, v, in at most 2^i steps. We then solve this problem recursively, observing<br><br>Reach(u,v,i) = Reach(u,z,i-1) and Reach(z,v,i-1)<br><br>by iterating over all possible nodes for z. Please note, Reach(u,z,i-1) means a path from u to z in 2^i-1 steps or rather 2^i / 2 steps.<br><br>We can reuse the space to compute each invocation of Reach, but at each recursive call, we need to keep track of the z we are currently splitting the search on, and to identify any particular node in the graph G requires log(M) space. We can divide the search space by two a total of log(M) times, so we need to keep track of log(M) space for each of log(M) divisions or log(M)*log(M).<br><br>For the final part, we observe that log(M) = log(2^O(S(n)) = S(n), so<br><br>log(M)*log(M) = S(n)^2<br><br>which is the statement of Savitch's Theorem.