Skip to content
Surf Wiki
Save to docs
general/complexity-classes

From Surf Wiki (app.surf) — the open knowledge base

L (complexity)

Complexity class (logarithmic space)


Complexity class (logarithmic space)

In computational complexity theory, L (also known as LSPACE, LOGSPACE or DLOGSPACE) is the complexity class containing decision problems that can be solved by a deterministic Turing machine using a logarithmic amount of writable memory space. Formally, the Turing machine has two tapes, one of which encodes the input and can only be read, whereas the other tape has logarithmic size but can be written as well as read. Logarithmic space is sufficient to hold a constant number of pointers into the input and a logarithmic number of Boolean flags, and many basic logspace algorithms use the memory in this way.

Complete problems and logical characterization

Every non-trivial problem in L is complete under log-space reductions, so weaker reductions are required to identify meaningful notions of L-completeness, the most common being first-order reductions.

A 2004 result by Omer Reingold shows that USTCON, the problem of whether there exists a path between two vertices in a given undirected graph, is in L, showing that L = SL, since USTCON is SL-complete.{{cite conference

One consequence of this is a simple logical characterization of L: it contains precisely those languages expressible in first-order logic with an added commutative transitive closure operator (in graph theoretical terms, this turns every connected component into a clique). This result has application to database query languages: data complexity of a query is defined as the complexity of answering a fixed query considering the data size as the variable input. For this measure, queries against relational databases with complete information (having no notion of nulls) as expressed for instance in relational algebra are in L.

Random versions

Just as how P has several random versions: BPP, ZPP, PP, and RP, there are several random versions of L.

Bounded-error Probability L (BPL) is defined like BPP, as the complexity class of problems solvable with a logspace Turing machine such that:

  • Other than the usual tapes of a logspace Turing machine, the machine also takes a tape filled with random bits.
  • The randomness is read-only and one-way. That is, the read-head on the random tape can only move in one direction. To reference a previous random bit, the machine must store it in the work tape.
  • The Turing machine has to halt for every input and every random tape.
  • If the answer is 'yes' then the machine accepts with probability at least 2/3. If the answer is 'no' then the machine rejects with probability at least 2/3.

It is contained in NC2, which is contained in P.

BP•L is defined the same as BPL, except that the machine is allowed to read the random tape both forwards and backwards. It contains BPL. It is also exactly equal to the class of languages that are nearly logspace: a language is nearly logspace if, relative to almost every oracle, the language is in L.

ZP•L is defined like BP•L, except that the machine may output "unknown", and must never make an error (i.e. accept when the answer is 'no', and vice versa). The relation of ZP•L to BP•L, is the same as the relation of ZPP to BPP. It contains BPL and is contained by BP•L.

Randomized L (RL) is defined like BPL:

  • Other than the usual tapes of a logspace Turing machine, the machine also takes a read-only one-way tape filled with random bits.
  • The Turing machine has to halt for every input and every random tape.
  • If the answer is 'yes,' accept with probability at least 1/2.
  • If the answer is 'no,' always reject.

Also, it must always run in polynomial time (since otherwise we would just get NL). It is strongly suspected that RL = L.

Both BPL and RL are contained in Steve's Class.

Probabilistic L (PL) has the same relation to L that PP has to P:

  • If the answer is 'yes,' accept with probability at least 1/2.
  • If the answer is 'no,' reject with probability at least 1/2. It contains BPL, and is contained by NC2.

Additional properties

L is low for itself, because it can simulate log-space oracle queries (roughly speaking, "function calls which use log space") in log space, reusing the same space for each query.

Other uses

The main idea of logspace is that one can store a polynomial-magnitude number in logspace and use it to remember pointers to a position of the input.

The logspace class is therefore useful to model computation where the input is too big to fit in the RAM of a computer. Long DNA sequences and databases are good examples of problems where only a constant part of the input will be in RAM at a given time and where we have pointers to compute the next part of the input to inspect, thus using only logarithmic memory.

Notes

References

References

  1. {{harvp. Sipser. 1997
  2. {{harvp. Garey. Johnson. 1979
  3. On a read/write input tape, a linear amount of memory could be obtained by packing of symbols (as in the proof of the [[linear speedup theorem]]), thus evading the logspace contraint.
  4. See {{harvp. Garey. Johnson. 1979
  5. {{harvtxt. Sipser. 1997, Corollary 8.21, p. 299.
  6. {{harvp. Sipser. 1997. Garey. Johnson. 1979
  7. "Complexity theory - is it possible that L = NP".
  8. (1983-07-01). "Parallel computation for well-endowed rings and space-bounded probabilistic machines". Information and Control.
  9. Nisan, Noam. (1993-01-04). "On read once vs. multiple access to randomness in logspace". Theoretical Computer Science.
  10. (2006-05-21). "Proceedings of the thirty-eighth annual ACM symposium on Theory of Computing". Association for Computing Machinery.
  11. Nisan, Noam. (1994-03-01). "RL ⊆ SC". Computational Complexity.
  12. Cook, Stephen A.. (1985-01-01). "A taxonomy of problems with fast parallel algorithms". Information and Control.
Info: Wikipedia Source

This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page.

Want to explore this topic further?

Ask Mako anything about L (complexity) — get instant answers, deeper analysis, and related topics.

Research with Mako

Free with your Surf account

Content sourced from Wikipedia, available under CC BY-SA 4.0.

This content may have been generated or modified by AI. CloudSurf Software LLC is not responsible for the accuracy, completeness, or reliability of AI-generated content. Always verify important information from primary sources.

Report