Questions: Logarithmic Space Classes (L and NL)

5 questions to test your understanding

Score: 0 / 5
Question 1 Multiple Choice

An NL machine solves graph reachability (ST-REACHABILITY) on an n-node graph by 'guessing' a path from s to t one node at a time. Why can this be done with only O(log n) workspace, even if the path visits O(n) nodes?

AThe NL machine compresses the path into a logarithmic representation using a hash function
BOnly the current node and a step counter need to be stored at any point — the full path is never written down, and both fit within O(log n) bits
CAn n-node graph always has a reachable path of at most log n steps, so the counter stays small
DNL machines are allowed to use polynomial space to store the path but only report a log-space-sized answer
Question 2 Multiple Choice

Savitch's theorem proves NL ⊆ SPACE(log² n). The proof converts a nondeterministic log-space computation to a deterministic one. What is the core resource trade-off that makes this work?

AThe deterministic simulation is faster than the nondeterministic one, freeing up the space that would have been used for the time overhead
BThe deterministic simulation uses more time but reuses workspace across recursive sub-problems, keeping total space to O(log² n) via divide-and-conquer reachability
CThe simulation converts space usage to randomness, reducing worst-case space from log² n to log n with high probability
DThe simulation encodes the nondeterministic branch choices in the work tape, using log n bits per level of branching
Question 3 True / False

An NL machine can solve the graph reachability problem on an n-node graph while storing only the current node index and a step counter, because both require only O(log n) bits.

TTrue
FFalse
Question 4 True / False

Since NL ⊆ P by Savitch's theorem, most problem in NL can be efficiently solved in practice using the deterministic algorithm implied by the proof.

TTrue
FFalse
Question 5 Short Answer

What is the key insight behind Savitch's proof that NL ⊆ SPACE(log² n)? Specifically, why can the deterministic simulation avoid storing all nondeterministic branches simultaneously?

Think about your answer, then reveal below.