Template:Short description Template:Unsolved In computational complexity theory, NL (Nondeterministic Logarithmic-space) is the complexity class containing decision problems that can be solved by a nondeterministic Turing machine using a logarithmic amount of memory space.

NL is a generalization of L, the class for logspace problems on a deterministic Turing machine. Since any deterministic Turing machine is also a nondeterministic Turing machine, we have that L is contained in NL.

NL can be formally defined in terms of the computational resource nondeterministic space (or NSPACE) as NL = NSPACE(log n).

Important results in complexity theory allow us to relate this complexity class with other classes, telling us about the relative power of the resources involved. Results in the field of algorithms, on the other hand, tell us which problems can be solved with this resource. Like much of complexity theory, many important questions about NL are still open (see Unsolved problems in computer science).

Occasionally NL is referred to as RL due to its probabilistic definition below; however, this name is more frequently used to refer to randomized logarithmic space, which is not known to equal NL.

DefinitionsEdit

There are several equivalent definitions of the NL class.

Standard definitionEdit

NL is the complexity class of decision problems that can be solved by a nondeterministic Turing machine (NTM) using a logarithmic amount of memory space.

In more detail, a language <math>L</math> is NL iff there exists a NTM <math>M</math> such that

  • <math>M</math> runs on logspace.
  • <math>M</math> always halts.
  • If <math>x \in L</math>, then there exists at least one computational trace of <math>M(x)</math> that results in the machine halting in an accepting state.
  • If <math>x \not\in L</math>, then all computational traces of <math>M(x)</math> results in the machine halting in an unaccepting state.

Probabilistic definitionEdit

Suppose C is the complexity class of decision problems solvable in logarithmithic space with probabilistic Turing machines that never accept incorrectly but are allowed to reject incorrectly less than 1/3 of the time; this is called one-sided error. The constant 1/3 is arbitrary; any x with 0 ≤ x < 1/2 would suffice.

It turns out that C = NL. Notice that C, unlike its deterministic counterpart L, is not limited to polynomial time, because although it has a polynomial number of configurations it can use randomness to escape an infinite loop. If we do limit it to polynomial time, we get the class RL, which is contained in but not known or believed to equal NL.

There is a simple algorithm that establishes that C = NL. Clearly C is contained in NL, since:

  • If the string is not in the language, both reject along all computation paths.
  • If the string is in the language, an NL algorithm accepts along at least one computation path and a C algorithm accepts along at least two-thirds of its computation paths.

To show that NL is contained in C, we simply take an NL algorithm and choose a random computation path of length n, and execute this 2n times. Because no computation path exceeds length n, and because there are 2n computation paths in all, we have a good chance of hitting the accepting one (bounded below by a constant).

The only problem is that we don't have room in log space for a binary counter that goes up to 2n. To get around this we replace it with a randomized counter, which simply flips n coins and stops and rejects if they all land on heads. Since this event has probability 2n, we expect to take 2n steps on average before stopping. It only needs to keep a running total of the number of heads in a row it sees, which it can count in log space.

Because of the Immerman–Szelepcsényi theorem, according to which NL is closed under complements, the one-sided error in these probabilistic computations can be replaced by zero-sided error. That is, these problems can be solved by probabilistic Turing machines that use logarithmic space and never make errors. The corresponding complexity class that also requires the machine to use only polynomial time is called ZPLP.

Thus, when we only look at space, it seems that randomization and nondeterminism are equally powerful.

Certificate definitionEdit

NL can equivalently be characterised by certificates, analogous to classes such as NP. Let a verifier be a deterministic logarithmic-space bounded deterministic Turing machine that has an additional read-only read-once input tape (that is, the verifier may only move the read-head forwards, never backwards).

A language <math>L</math> is in NL if and only if<ref name=":0">Template:Cite book</ref>Template:Pg

  • There exists a polynomial function <math>p</math>.
  • There exists a verifier <math>TM</math>.
  • For any <math>x</math>, <math>x \in L</math> iff there exists a certificate <math>u</math> with length <math>|u| \leq p(|x|)</math>, such that <math>TM(x, u) = 1</math>.

In words, it means that if a sentence is in the language, then there exists a polynomial-length proof that it is in the language. It does not say anything about the case where the sentence is not in the language, though by the Immerman–Szelepcsényi theorem, it is clear that there exists some verifier that can verify both <math>x \in L</math> and <math>x \not\in L</math>.

Note that the read-once condition is necessary. If the verifier can read forwards and backwards, this extends the class to the NP class.<ref name=":0" />Template:Pg

Cem Say and Abuzer Yakaryılmaz have proven that the deterministic logarithmic-space Turing machine in the statement above can be replaced by a bounded-error probabilistic constant-space Turing machine that is allowed to use only a constant number of random bits.<ref>A. C. Cem Say, Abuzer Yakaryılmaz, "Finite state verifiers with constant randomness," Logical Methods in Computer Science, Vol. 10(3:6)2014, pp. 1-17.</ref>

Descriptive definitionEdit

In descriptive complexity theory, NL is defined as those languages expressible in first-order logic with an added transitive closure operator.

Closure propertiesEdit

The class NL is closed under the operations complementation, union, and therefore intersection, concatenation, and Kleene star.

NL-completenessEdit

A problem is NL-complete iff it is NL, and any problem in NL is log-space reducible to it.

Problems that are known to be NL-complete including ST-connectivity and 2-satisfiability.

ST-connectivity asks, for nodes S and T in a directed graph, whether T is reachable from S.

2-satisfiability asks, given a propositional formula of which each clause is the disjunction of two literals, if there is a variable assignment that makes the formula true. An example instance, where <math> \neg </math> indicates not, might be:

<math>(x_1 \vee \neg x_3) \wedge (\neg x_2 \vee x_3) \wedge (\neg x_1 \vee \neg x_2)</math>

ContainmentsEdit

It is known that Template:Sans-serif is contained in Template:Sans-serif, since there is a polynomial-time algorithm for 2-satisfiability, but it is not known whether Template:Sans-serif or whether Template:Sans-serif. It is known that Template:Sans-serif, where Template:Sans-serif is the class of languages whose complements are in Template:Sans-serif. This result (the Immerman–Szelepcsényi theorem) was independently discovered by Neil Immerman and Róbert Szelepcsényi in 1987; they received the 1995 Gödel Prize for this work.

In circuit complexity, Template:Sans-serif can be placed within the Template:Sans-serif hierarchy. In Papadimitriou 1994, Theorem 16.1, we have:

<math>\mathsf{NC_1 \subseteq L \subseteq NL \subseteq NC_2}</math>.

More precisely, Template:Sans-serif is contained in Template:Sans-serif. It is known that Template:Sans-serif is equal to Template:Sans-serif, the class of problems solvable by randomized algorithms in logarithmic space and unbounded time, with no error. It is not, however, known or believed to be equal to Template:Sans-serif or Template:Sans-serif, the polynomial-time restrictions of Template:Sans-serif and Template:Sans-serif, which some authors refer to as Template:Sans-serif and Template:Sans-serif.

We can relate Template:Sans-serif to deterministic space using Savitch's theorem, which tells us that any nondeterministic algorithm can be simulated by a deterministic machine in at most quadratically more space. From Savitch's theorem, we have directly that:

<math>\mathsf{NL \subseteq SPACE}(\log^2 n) \ \ \ \ \text{equivalently, } \mathsf{NL \subseteq L}^2.</math>

This was the strongest deterministic-space inclusion known in 1994 (Papadimitriou 1994 Problem 16.4.10, "Symmetric space"). Since larger space classes are not affected by quadratic increases, the nondeterministic and deterministic classes are known to be equal, so that for example we have Template:Sans-serif.

NotesEdit

Template:Reflist

ReferencesEdit

Template:ComplexityClasses