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)
(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!
=== 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>.
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)