L (complexity) 2026-09-24
NL (complexity) 2026-09-24
Past exam of the mathematics course of the University of Cambridge 2024 iii Paper 124 2 i Solution Created 2026-09-24 Updated 2026-09-25
A decision problem is NL-complete when and every language has a deterministic logarithmic space many-one reduction to .
The directed graph reachability problem is the standard example. It lies in NL because a machine stores the current vertex and a counter, nondeterministically guesses at most successive edges, and accepts upon reaching ; this uses space. For hardness, given an NL machine and input , construct its configuration graph. Its configurations have logarithmic length, adjacency can be computed in logarithmic space, andAdding one target joined from every accepting configuration gives the required logarithmic-space reduction.