Guess a neighbour each step; log n bits suffice per branch.
PATH = {⟨G, s, t⟩ : directed graph G has a path from s to t}. PATH is the canonical NL problem and arguably the defining example of nondeterministic log-space — it's NL-complete (Problem 43) and one of the cleanest "nondeterminism actually helps" demonstrations.
v ← s; counter ← 0 while counter ≤ |V|: if v = t: accept v ← nondet. choice from neighbours of v counter ← counter + 1 reject
Memory: v fits in ⌈log2 n⌉ bits, counter fits in ⌈log2(n+1)⌉ bits, plus O(1) state. Total: O(log n) work-tape space.
The algorithm wins because nondeterminism lets it guess the right next vertex at each step. Acceptance is existential: PATH accepts if any guessing sequence reaches t.
A deterministic algorithm would need to remember which neighbours it has tried. With only O(log n) bits, it can't store a non-trivial set of visited vertices. PATH ∈ L is open (whether L = NL). DFS uses too much stack for log space.
NL is closed under reductions; therefore the existence of a log-space reduction to PATH proves a problem is in NL.
Sipser: §8.4, Example 8.21 (PATH algorithm). Lecture notes: Module 7 slide 2. Companion problems: P41 (log space), P43 (PATH NL-complete), P44 (inductive counting / coNL = NL).