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
NC (complexity)
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!
{{Short description|Class in computational complexity theory}} {{unsolved|computer science|{{tmath|1= \mathsf{NC} \overset{?}{=} \mathsf{P} }}}} In [[computational complexity theory]], the class '''NC''' (for "Nick's Class") is the set of [[decision problem]]s decidable in [[polylogarithmic time]] on a [[parallel computing|parallel computer]] with a polynomial number of processors. In other words, a problem with input size ''n'' is in '''NC''' if there exist constants ''c'' and ''k'' such that it can be solved in time {{math|''[[Big O notation|O]]''((log ''n'')<sup>''c''</sup>)}} using {{math|''O''(''n''<sup>''k''</sup>)}} parallel processors. [[Stephen Cook]]<ref>{{Cite journal|last=Cook|first=S.A.|title=Towards a complexity theory of synchronous parallel computation|journal=L'Enseignement Mathématique|date=1981|volume=27|pages=99–124|url=http://citeseerx.ist.psu.edu/showciting?cid=1672592|language=en|archive-url=https://web.archive.org/web/20220310162138/http://citeseerx.ist.psu.edu/showciting?cid=1672592|archive-date=2022-03-10}}</ref><ref>{{Cite journal|last=Cook|first=Stephen A.|date=1985-01-01|title=A taxonomy of problems with fast parallel algorithms|journal=Information and Control|series=International Conference on Foundations of Computation Theory|language=en|volume=64|issue=1|pages=2–22|doi=10.1016/S0019-9958(85)80041-3|issn=0019-9958|doi-access=free}}</ref> coined the name "Nick's class" after [[Nick Pippenger]], who had done extensive research<ref>{{Cite journal|last=Pippenger|first=Nicholas|date=1979|title=On simultaneous resource bounds|url=https://www.infona.pl//resource/bwmeta1.element.ieee-art-000004568025|journal=20th Annual Symposium on Foundations of Computer Science (SFCS 1979)|language=en|pages=307–311|doi=10.1109/SFCS.1979.29|s2cid=7029313 |issn=0272-5428}}</ref> on circuits with polylogarithmic depth and polynomial size.<ref name=AB120>Arora & Barak (2009) p.120</ref> As in the case of [[circuit complexity]] theory, usually the class has an extra constraint that the circuit family must be ''uniform'' ([[NC (complexity)#Uniformity|see below]]). Just as the class '''[[P (complexity)|P]]''' can be thought of as the tractable problems ([[Cobham's thesis]]), so '''NC''' can be thought of as the problems that can be efficiently solved on a parallel computer.<ref name=AB118>Arora & Barak (2009) p.118</ref> '''NC''' is a subset of '''P''' because polylogarithmic parallel computations can be simulated by polynomial-time sequential ones. It is unknown whether '''NC''' = '''P''', but most researchers suspect this to be false, meaning that there are probably some tractable problems that are "inherently sequential" and cannot significantly be sped up by using parallelism. Just as the class '''[[NP-complete]]''' can be thought of as "probably intractable", so the class '''[[P-complete]]''', when using '''NC''' reductions, can be thought of as "probably not parallelizable" or "probably inherently sequential". The parallel computer in the definition can be assumed to be a ''parallel, random-access machine'' ([[parallel random access machine|PRAM]]). That is a parallel computer with a central pool of memory, and any processor can access any bit of memory in constant time. The definition of '''NC''' is not affected by the choice of how the PRAM handles simultaneous access to a single bit by more than one processor. It can be CRCW, CREW, or EREW. See [[parallel random access machine|PRAM]] for descriptions of those models. Equivalently, '''NC''' can be defined as those decision problems decidable by a [[Boolean circuit|uniform Boolean circuit]] (which can be calculated from the length of the input, for NC, we suppose we can compute the Boolean circuit of size ''n'' in logarithmic space in ''n'') with [[polylogarithmic]] depth and a polynomial number of gates with a maximum fan-in of 2. '''RNC''' is a class extending '''NC''' with access to randomness. == Problems in NC == As with '''P''', by a slight abuse of language, one might classify function problems and search problems as being in '''NC'''. '''NC''' is known to include many problems, including * Integer addition, multiplication and division; * [[Matrix multiplication]], determinant, [[matrix inverse|inverse]], rank; * Polynomial GCD, by a reduction to linear algebra using [[Sylvester matrix]] * Finding a maximal matching. Often algorithms for those problems had to be separately invented and could not be naïvely adapted from well-known algorithms – [[Gaussian elimination]] and [[Euclidean algorithm]] rely on operations performed in sequence. One might contrast [[ripple carry adder]] with a [[carry-lookahead adder]]. === Example === An example of problem in NC<sup>1</sup> is the parity check on a bit string.<ref>{{cite web|url=https://lin-web.clarkson.edu/~alexis/PCMI/Notes/lectureB02.pdf|title=Lecture 2: The Complexity of Some Problems|date=2000-07-18|author1=David Mix Barrington|author2=Alexis Maciel|work=IAS/PCMI Summer Session 2000 - Clay Mathematics Undergraduate Program - Basic Course on Computational Complexity|publisher=[[Clarkson University]]|accessdate=2021-11-11}}</ref> The problem consists in counting the number of 1s in a string made of 1 and 0. A simple solution consists in summing all the string's bits. Since [[addition]] is associative, <math display="block">x_1 + \cdots + x_n = \left(x_1 + \cdots + x_{\frac{n}{2}}\right) + \left(x_{\frac{n}{2} + 1} + \cdots + x_n\right).</math> Recursively applying such property, it is possible to build a [[binary tree]] of length <math>O(\log(n))</math> in which every sum between two bits <math>x_i</math> and <math>x_j</math> is expressible by means of basic [[logical operator]]s, e.g. through the boolean expression <math>(x_i \land \neg x_j) \lor (\neg x_i \land x_j)</math>. == The NC hierarchy == '''NC'''<sup>''i''</sup> is the class of decision problems decidable by uniform boolean circuits with a polynomial number of gates of at most two inputs and depth {{math|''O''((log ''n'')<sup>''i''</sup>)}}, or the class of decision problems solvable in time ''O''((log ''n'')<sup>''i''</sup>) on a parallel computer with a polynomial number of processors. Clearly, :<math>\mathsf{NC}^0 \subseteq \mathsf{NC}^1 \subseteq \cdots \subseteq \mathsf{NC}^i \subseteq \cdots \subseteq \mathsf{NC}</math> which forms the '''NC'''-hierarchy. The smallest class, '''NC'''<sup>''0''</sup>, is the class of functions definable by boolean circuits with constant depth and bounded fan-in. The next-smallest class, '''NC'''<sup>''1''</sup>, is equal to '''BW'''<sub>4</sub><sup>''0''</sup> , the set of all problems solvable by polynomial-size, bounded fan-in circuits of width 4 or less. This is true for both the uniform and nonuniform case (DLOGTIME-uniformity suffices).<ref name=":0" />{{Pg|page=142}} One can relate the '''NC''' classes to the space classes '''[[L (complexity)|L]]''', '''[[SL (complexity)|SL]]''',<ref name=":0">{{Cite book |title=Handbook of theoretical computer science |date=1990 |publisher=Elsevier ; MIT Press |isbn=978-0-444-88075-8 |editor-last=Leeuwen |editor-first=J. van |location=Amsterdam ; New York : Cambridge, Mass}}</ref>{{Pg|page=137}} '''[[NL (complexity)|NL]]''',<ref>Papadimitriou (1994) Theorem 16.1</ref> '''[[LOGCFL]]''', and '''[[AC (complexity)|AC]]'''.<ref name="CK437">Clote & Kranakis (2002) p.437</ref> :<math> \mathsf{NC}^1 \subseteq \mathsf{L} = \mathsf{SL} \subseteq \mathsf{NL} \subseteq \mathsf{LOGCFL} \subseteq \mathsf{AC}^1 \subseteq \mathsf{NC}^2.</math> The NC classes are related to the AC classes, which are defined similarly, but with gates having unbounded fan-in. For each ''i'',<ref name=AB118/><ref name="CK437"/><ref>{{Cite web |title=Complexity Zoo:T - Complexity Zoo |url=https://complexityzoo.net/Complexity_Zoo:T |access-date=2025-03-10 |website=complexityzoo.net}}</ref> :<math>\mathsf{NC}^i \subseteq \mathsf{AC}^i \subseteq \mathsf{AC}^{i}[p] \subseteq \mathsf{ACC}^{i}\subseteq \mathsf{TC}^{i} \subseteq \mathsf{NC}^{i+1}</math> As an immediate consequence of this, '''NC''' = '''AC'''.<ref name=CK12>Clote & Kranakis (2002) p.12</ref> Also, <math>\mathsf{NC}^0 \subsetneq \mathsf{AC}^0 \subsetneq \mathsf{ACC}^{0}</math>.<ref name="AB118" /> Similarly, '''NC''' is equivalent to the problems solvable on an [[alternating Turing machine]] restricted to at most two options at each step with ''O''(log ''n'') space and <math>(\log n)^{O(1)}</math> alternations.<ref>{{cite journal|author=S. Bellantoni and I. Oitavem|title=Separating NC along the delta axis|journal=Theoretical Computer Science|volume=318|issue=1–2|year=2004|pages=57–78|doi=10.1016/j.tcs.2003.10.021|doi-access=}}</ref> It is a major open question whether <math>\mathsf{TC}^{0} \subsetneq \mathsf{NC}^{1}</math> {{Harvard citation|Vollmer|1998|p=126}}. A significant partial result states that if there exists some <math>\epsilon > 0</math>, and a problem in <math>\mathsf{NC}^{1}</math>, such that it requires at least <math>\Omega(n^{1+\epsilon}) </math> gates in <math>\mathsf{TC}^{0}</math>, then this can be bootstrapped so that it requires superpolynomial gates, and thus not in <math>\mathsf{TC}^{0}</math>.<ref>{{Cite journal |last1=Allender |first1=Eric |last2=Koucký |first2=Michal |date=March 2010 |title=Amplifying lower bounds by means of self-reducibility |url=https://dl.acm.org/doi/10.1145/1706591.1706594 |journal=Journal of the ACM |language=en |volume=57 |issue=3 |pages=1–36 |doi=10.1145/1706591.1706594 |issn=0004-5411}}</ref> === Uniformity === There are various levels of uniformity being considered. A family of boolean circuits is uniform if the schematics for any member of the family can be produced by a Turing machine under various resource constraints. With different levels of constraints, we would obtain possibly different complexity classes, with a more stringent constraint leading to a possibly smaller complexity class. In the literature, the following uniformities have been considered for the '''NC'''<sup>''1''</sup> class, arranged according to strength:<ref name=":0" />{{Pg|page=139}}<ref>{{Cite journal |last1=Mix Barrington |first1=David A. |last2=Immerman |first2=Neil |last3=Straubing |first3=Howard |date=1990-12-01 |title=On uniformity within NC1 |url=https://dx.doi.org/10.1016/0022-0000%2890%2990022-D |journal=Journal of Computer and System Sciences |volume=41 |issue=3 |pages=274–306 |doi=10.1016/0022-0000(90)90022-D |issn=0022-0000}}</ref> * '''NC'''<sup>''1''</sup> itself. This is also called the <math>U_{E^*}</math>-uniformity. It is equivalent to [[Alternating Turing machine|'''ALOGTIME''']]. * '''LOGSPACE'''. * '''P'''. * '''Computable'''. Any halting Turing machine is allowed. * '''Non-uniform'''. This is the strongest case. The boolean circuit family may contain arbitrary elements of the correct width and depth, even if the family cannot be generated by any algorithm. By default, the literature uses '''LOGSPACE''' uniformity. Because it is possible that <math>\mathsf{NC}^1 \subsetneq \mathsf{LOGSPACE}</math>, researchers may use '''NC'''<sup>''1''</sup>-uniformity, since it is a possible strengthening. To avoid self-reference, '''NC'''<sup>''1''</sup>-uniform '''NC'''<sup>''1''</sup> is defined as follows: A '''NC'''<sup>''1''</sup> Boolean circuit family is '''NC'''<sup>''1''</sup>-uniform if the set of descriptions is decided by an '''ALOGTIME''' [[alternating Turing machine]]. The machine reads in a length-<math>n</math> description of a Boolean circuit, and halts in time <math>O(\log n)</math>.<ref name=":0" />{{Pg|page=139}} For higher classes '''NC'''<sup>''2''</sup>, '''NC'''<sup>''3''</sup>, ..., there are similar uniformities definable. However, for <math>k \geq 2</math>, '''NC'''<sup>''k''</sup>-uniform '''NC'''<sup>''k''</sup> and '''LOGSPACE'''-uniform '''NC'''<sup>''k''</sup> are equal, and both are equivalent to the following definition: The family is decided by an [[alternating Turing machine]]. The machine reads in a length-<math>n</math> description of a Boolean circuit, and halts in time <math>O((\log n)^k)</math> and space <math>O(\log n)</math>.<ref name=":0" />{{Pg|page=139}} === Open problem: Is NC proper? === {{unsolved|computer science|Is the <math>\mathsf{NC}</math> hierarchy proper?}} One major open question in [[computational complexity theory|complexity theory]] is whether or not every containment in the '''NC''' hierarchy is proper. It was observed by Papadimitriou that, if '''NC'''<sup>''i''</sup> = '''NC'''<sup>''i''+1</sup> for some ''i'', then '''NC'''<sup>''i''</sup> = '''NC'''<sup>''j''</sup> for all ''j'' ≥ ''i'', and as a result, '''NC'''<sup>''i''</sup> = '''NC'''. This observation is known as '''NC'''-hierarchy collapse because even a single equality in the chain of containments :<math>\mathsf{NC}^1 \subseteq \mathsf{NC}^2 \subseteq \cdots</math> implies that the entire '''NC''' hierarchy "collapses" down to some level ''i''. Thus, there are 2 possibilities: # <math>\mathsf{NC}^1 \subset \cdots \subset \mathsf{NC}^i \subset \cdots \subset \mathsf{NC}^{i+j} \subset \cdots \mathsf{NC}</math> # <math>\mathsf{NC}^1 \subset \cdots \subset \mathsf{NC}^i = \cdots = \mathsf{NC}^{i+j} = \cdots \mathsf{NC}</math> It is widely believed that (1) is the case, although no proof as to the truth of either statement has yet been discovered. If there exists a problem that is '''NC'''-complete under '''LOGSPACE''' or '''NC'''<sup>''1''</sup> reductions, then the '''NC''' hierarchy collapses.<ref name=":0" />{{Pg|page=136}} ==Barrington's theorem== A '''branching program''' with ''n'' variables of width ''k'' and length ''m'' consists of a sequence of ''m'' instructions. Each of the instructions is a tuple (''i'', ''p'', ''q'') where ''i'' is the index of variable to check (1 ≤ ''i'' ≤ ''n''), and ''p'' and ''q'' are functions from {1, 2, ..., ''k''} to {1, 2, ..., ''k''}. Numbers 1, 2, ..., ''k'' are called states of the branching program. The program initially starts in state 1, and each instruction (''i'', ''p'', ''q'') changes the state from ''x'' to ''p''(''x'') or ''q''(''x''), depending on whether the ''i''th variable is 0 or 1. The function mapping an input to a final state of the program is called the ''yield'' of the program (more precisely, the yield on an input is the function mapping any initial state to the corresponding final state). The program ''accepts'' a set <math>A \subset 2^n</math> of variable values when there is some set of functions <math>F \subset k^k</math> such that a variable sequence <math>x \in 2^n</math> is in ''A'' precisely when its yield is in ''F''. A family of branching programs consists of a branching program with ''n'' variables for each ''n''. It accepts a language when the ''n'' variable program accepts the language restricted to length ''n'' inputs. It is easy to show that every language ''L'' on {0,1} can be recognized by a family of branching programs of width 5 and exponential length, or by a family of exponential width and linear length. Every regular language on {0,1} can be recognized by a family of branching programs of constant width and linear number of instructions (since a DFA can be converted to a branching program). '''BWBP''' denotes the class of languages recognizable by a family of branching programs of bounded width and polynomial length.<ref name=CK50>Clote & Kranakis (2002) p.50</ref> '''Barrington's theorem'''<ref name=Bar89>{{cite journal | zbl=0667.68059 | last=Barrington | first=David A. | journal=J. Comput. Syst. Sci. | volume=38 | number=1 | pages=150–164 | year=1989 | issn=0022-0000 | url=http://www.cs.umass.edu/~barring/publications/bwbp.pdf | title=Bounded-Width Polynomial-Size Branching Programs Recognize Exactly Those Languages in '''NC'''<sup>1</sup> | doi=10.1016/0022-0000(89)90037-8| doi-access=free }}</ref> says that '''BWBP''' is exactly [[uniformity (circuit)|nonuniform]] '''NC'''<sup>1</sup>. The proof uses the [[solvable group|nonsolvability]] of the symmetric group S<sub>5</sub>.<ref name=CK50/> The theorem is rather surprising. For instance, it implies that the [[majority function]] can be computed by a family of branching programs of constant width and polynomial size, while intuition might suggest that to achieve polynomial size, one needs a linear number of states. ===Proof of Barrington's theorem=== A branching program of constant width and polynomial size can be easily converted (via divide-and-conquer) to a circuit in '''NC'''<sup>1</sup>. Conversely, suppose a circuit in '''NC'''<sup>1</sup> is given. Without loss of generality, assume it uses only AND and NOT gates. {{math_theorem|name=Lemma 1|If there exists a branching program that sometimes works as a permutation ''P'' and sometimes as a permutation ''Q'', by right-multiplying permutations in the first instruction by {{var|α}}, and in the last instruction left-multiplying by {{var|β}}, we can make a circuit of the same length that behaves as {{var|β}}''P''{{var|α}} or {{var|β}}''Q''{{var|α}}, respectively.}} Call a branching program α-computing a circuit ''C'' if it works as identity when {{var|C}}'s output is 0, and as {{var|α}} when {{var|C}}'s output is 1. As a consequence of Lemma 1 and the fact that all cycles of length 5 are [[Conjugacy class|conjugate]], for any two 5-cycles {{var|α}}, {{var|β}}, if there exists a branching program α-computing a circuit ''C'', then there exists a branching program β-computing the circuit ''C'', of the same length. {{math_theorem|name=Lemma 2|1=There exist 5-cycles {{var|γ}}, {{var|δ}} such that their [[commutator]] {{math|1=''ε''=''γδγ''<sup>−1</sup>''δ''<sup>−1</sup>}} is a 5-cycle. For example, {{var|γ}} = (1 2 3 4 5), {{var|δ}} = (1 3 5 4 2) giving {{var|ε}} = (1 3 2 5 4).}} {{math proof|1=We will now prove Barrington's theorem by induction: Suppose we have a circuit ''C'' which takes inputs ''x''<sub>1</sub>,...,''x''<sub>''n''</sub> and assume that for all subcircuits ''D'' of ''C'' and 5-cycles α, there exists a branching program α-computing ''D''. We will show that for all 5-cycles α, there exists a branching program α-computing ''C''. * If the circuit ''C'' simply outputs some input bit ''x<sub>i</sub>'', the branching program we need has just one instruction: checking {{var|x<sub>i</sub>}}'s value (0 or 1), and outputting the identity or {{var|α}} (respectively). * If the circuit ''C'' outputs ¬''A'' for some different circuit ''A'', create a branching program {{var|α}}<sup>−1</sup>-computing ''A'' and then multiply the output of the program by α. By Lemma 1, we get a branching program for ''A'' outputting the identity or α, i.e. {{var|α}}-computing ¬''A''=''C''. * If the circuit ''C'' outputs {{nowrap|''A''∧''B''}} for circuits ''A'' and ''B'', join the branching programs that {{var|γ}}-compute ''A'', {{var|δ}}-compute ''B'', {{var|γ}}<sup>−1</sup>-compute ''A'', and δ<sup>−1</sup>-compute B for a choice of 5-cycles γ and δ such that their commutator {{math|1=''ε''=''γδγ''<sup>−1</sup>''δ''<sup>−1</sup>}} is also a 5-cycle. (The existence of such elements was established in Lemma 2.) If one or both of the circuits outputs 0, the resulting program will be the identity due to cancellation; if both circuits output 1, the resulting program will output the commutator {{var|ε}}. In other words, we get a program {{var|ε}}-computing {{nowrap|''A''∧''B''}}. Because {{var|ε}} and {{var|α}} are two 5-cycles, they are conjugate, and hence there exists a program {{var|α}}-computing {{nowrap|''A''∧''B''}} by Lemma 1. By assuming the subcircuits have branching programs so that they are {{var|α}}-computing for all 5-cycles {{math|{{var|α}}∈''S''<sub>5</sub>}}, we have shown ''C'' also has this property, as required. }} The size of the branching program is at most 4<sup>{{var|d}}</sup>, where ''d'' is the depth of the circuit. If the circuit has logarithmic depth, the branching program has polynomial length. ==Notes== {{reflist}} ==References== * {{cite book | zbl=1193.68112 | last1=Arora | first1=Sanjeev | author-link1=Sanjeev Arora | last2=Barak | first2=Boaz | title=Computational complexity. A modern approach | publisher=[[Cambridge University Press]] | year=2009 | isbn=978-0-521-42426-4 }} * {{cite book | last1=Clote | first1=Peter | last2=Kranakis |first2=Evangelos | title=Boolean functions and computation models | series=Texts in Theoretical Computer Science. An EATCS Series | location=Berlin | publisher=[[Springer-Verlag]] | year=2002 | isbn=3-540-59436-1 | zbl=1016.94046 }} * [http://www.cs.armstrong.edu/greenlaw/research/PARALLEL/limits.pdf Greenlaw, Raymond, James Hoover, and Walter Ruzzo. ''Limits To Parallel computation; P-Completeness Theory''.] {{isbn|0-19-508591-4}} * {{cite book| first=Dexter C. | last=Kozen | author-link=Dexter Kozen | year = 1992 | title = The design and analysis of algorithms}} Lectures 28 - 34 and 36 * {{cite book| first=Dexter C. | last=Kozen | author-link=Dexter Kozen | year = 2006 | title = Theory of Computation | publisher = [[Springer-Verlag]] | isbn = 1-84628-297-7 | zbl=1102.68025 | series=Texts in Computer Science }} Lecture 12: Relation of ''NC'' to Time-Space Classes * {{cite book| first=Christos | last=Papadimitriou | author-link=Christos Papadimitriou | year = 1993 | title = Computational Complexity | publisher = Addison Wesley | edition = 1st | isbn = 0-201-53082-1 | chapter = Section 15.3: The class '''NC''' | pages=375–381 }} * {{cite book | last=Straubing | first=Howard | title=Finite automata, formal logic, and circuit complexity | url=https://archive.org/details/finiteautomatafo0000stra | url-access=registration | series=Progress in Theoretical Computer Science | location=Basel | publisher=Birkhäuser | year=1994 | isbn=3-7643-3719-2 | zbl=0816.68086 }} * {{cite book | last=Vollmer | first=Heribert | title=Introduction to circuit complexity. A uniform approach | series=Texts in Theoretical Computer Science | location=Berlin | publisher=[[Springer-Verlag]] | year=1998 | isbn=3-540-64310-9 | zbl=0931.68055 | url=https://books.google.com/books?id=55ZTgOJs8bsC}} {{ComplexityClasses}} {{DEFAULTSORT:Nc (Complexity)}} [[Category:Complexity classes]] [[Category:Circuit complexity]]
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)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Cite book
(
edit
)
Template:Cite journal
(
edit
)
Template:Cite web
(
edit
)
Template:ComplexityClasses
(
edit
)
Template:Harvard citation
(
edit
)
Template:Isbn
(
edit
)
Template:Math
(
edit
)
Template:Math proof
(
edit
)
Template:Math theorem
(
edit
)
Template:Pg
(
edit
)
Template:Reflist
(
edit
)
Template:Short description
(
edit
)
Template:Unsolved
(
edit
)
Template:Var
(
edit
)