Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
NL (complexity)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Probabilistic definition=== Suppose ''C'' is the [[complexity class]] of [[decision problems]] solvable in logarithmithic space with [[probabilistic Turing machine]]s 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 (complexity)|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 (complexity)|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 2<sup>''n''</sup> times. Because no computation path exceeds length ''n'', and because there are 2<sup>''n''</sup> 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 2<sup>''n''</sup>. 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 2<sup>−''n''</sup>, we [[expected value|expect]] to take 2<sup>''n''</sup> 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 (complexity)|ZPLP]]. Thus, when we only look at space, it seems that randomization and nondeterminism are equally powerful.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)