Math 2.0

Computer science Definition

NL

Builds on Space complexityNondeterministic Turing machineComplexity classFormal languageLP

Definition

Let Σ\Sigma be a finite alphabet. The complexity class NL is NL=NSPACE(log⁡n),\mathrm{NL} = \mathrm{NSPACE}(\log n), where NSPACE\mathrm{NSPACE} is defined through the space complexity of nondeterministic Turing machines with a read-only input tape. So a language L⊆Σ∗L \subseteq \Sigma^* lies in NL when some such machine decides it using O(log⁡n)O(\log n) work-tape cells on every branch, for inputs of length nn.

Remarks

Example: directed reachability lies in NL\mathrm{NL}. An input is a directed graph GG with nn vertices and two vertices s,ts, t. The machine stores the current vertex and a step counter, starts at ss, and guesses an out-neighbour at each step. It accepts when it reaches tt and rejects after nn steps, using O(log⁡n)O(\log n) cells. Some branch accepts exactly when GG has a path from ss to tt.

Non-example: a machine that guesses a whole path and writes it on the work tape may use about nlog⁡nn \log n cells, so it does not show membership in NL\mathrm{NL}.

Directed reachability is NL-complete under logarithmic-space reductions. One has L⊆NL⊆P\mathrm{L} \subseteq \mathrm{NL} \subseteq \mathrm{P}, where L is the class L and P is the class P. NL is closed under complement, by the Immerman–Szelepcsényi theorem.

Reading path

To understand this page from the ground up, read these 7 pages in order. The foundations come first.

Show the path as a graph
Each page uses the pages above it. The colour of the bar on a box shows how strong the evidence is, and the box also gives it as text. The list has the same pages.
  • no evidence level
  1. Complexity class concept
  2. Formal language concept
  3. L concept
  4. Nondeterministic Turing machine concept
  5. P concept
  6. Space complexity concept
  7. NL definition

Further reading

  1. Web https://en.wikipedia.org/wiki/NL_(complexity)
About this page
TagDJY12HF27K
URIm2://DJY12HF27K
Kinddefinition
WritingW0 stub
MSC68Q15
DefinesNL
UsesSpace complexity, Nondeterministic Turing machine, Complexity class, Formal language, L, P
Changed3 November 2026

Markdown · JSON · Edit on GitHub

What this page needs for W1

  • an inventory row: the row of the inventory that the node accounts for (0 of 1)
  • a source with a locator (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

No page links to this page yet.