Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Computational complexity theory
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
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!
==Complexity classes== {{main|Complexity class}} ===Defining complexity classes=== A '''complexity class''' is a set of problems of related complexity. Simpler complexity classes are defined by the following factors: * The type of computational problem: The most commonly used problems are decision problems. However, complexity classes can be defined based on [[function problem]]s, [[counting problem (complexity)|counting problem]]s, [[optimization problem]]s, [[promise problem]]s, etc. * The model of computation: The most common model of computation is the deterministic Turing machine, but many complexity classes are based on non-deterministic Turing machines, [[Boolean circuit]]s, [[quantum Turing machine]]s, [[monotone circuit]]s, etc. * The resource (or resources) that is being bounded and the bound: These two properties are usually stated together, such as "polynomial time", "logarithmic space", "constant depth", etc. Some complexity classes have complicated definitions that do not fit into this framework. Thus, a typical complexity class has a definition like the following: :The set of decision problems solvable by a deterministic Turing machine within time <math>f(n)</math>. (This complexity class is known as DTIME(<math>f(n)</math>).) But bounding the computation time above by some concrete function <math>f(n)</math> often yields complexity classes that depend on the chosen machine model. For instance, the language <math>\{xx \mid x \text{ is any binary string}\}</math> can be solved in [[linear time]] on a multi-tape Turing machine, but necessarily requires quadratic time in the model of single-tape Turing machines. If we allow polynomial variations in running time, [[Cobham's thesis|Cobham-Edmonds thesis]] states that "the time complexities in any two reasonable and general models of computation are polynomially related" {{Harv|Goldreich|2008|loc=Chapter 1.2}}. This forms the basis for the complexity class [[P (complexity)|P]], which is the set of decision problems solvable by a deterministic Turing machine within polynomial time. The corresponding set of function problems is [[FP (complexity)|FP]]. ===Important complexity classes=== [[File:Complexity subsets pspace.svg|thumb|right|A representation of the relation among complexity classes; L would be another step "inside" NL]] Many important complexity classes can be defined by bounding the time or space used by the algorithm. Some important complexity classes of decision problems defined in this manner are the following: {| class="wikitable sortable" ! scope=col | Resource ! scope=col | <abbr title="of Turing Machine used to Model Computation">Determinism</abbr> ! scope=col | Complexity class ! scope=col | Resource constraint |- ! scope=rowgroup rowspan=8 style="text-align:center;" | Space ! scope=rowgroup rowspan=4 style="text-align:center;" | Non-Deterministic | [[NSPACE]](<math>f(n)</math>) | data-sort-value=0 | <math>O(f(n))</math> |- | [[NL (complexity)|NL]] | data-sort-value=1 | <math>O(\log n)</math> |- | [[NPSPACE]] | data-sort-value=2 | <math>O(\text{poly}(n))</math> |- | [[NEXPSPACE]] | data-sort-value=4 | <math>O(2^{\text{poly}(n)})</math> |- ! scope=rowgroup rowspan=4 style="text-align:center;" | Deterministic | [[DSPACE]](<math>f(n)</math>) | data-sort-value=0 | <math>O(f(n))</math> |- | [[L (complexity)|L]] | data-sort-value=1 | <math>O(\log n)</math> |- | [[PSPACE]] | data-sort-value=2 | <math>O(\text{poly}(n))</math> |- | [[EXPSPACE]] | data-sort-value=4 | <math>O(2^{\text{poly}(n)})</math> |- ! scope=rowgroup rowspan=6 style="text-align:center;" | Time ! scope=rowgroup rowspan=3 style="text-align:center;" | Non-Deterministic | [[NTIME]](<math>f(n)</math>) | data-sort-value=0 | <math>O(f(n))</math> |- | [[NP (complexity)|NP]] | data-sort-value=2 | <math>O(\text{poly}(n))</math> |- | [[NEXPTIME]] | data-sort-value=4 | <math>O(2^{\text{poly}(n)})</math> |- ! scope=rowgroup rowspan=3 style="text-align:center;" | Deterministic | [[DTIME]](<math>f(n)</math>) | data-sort-value=0 | <math>O(f(n))</math> |- | [[P (complexity)|P]] | data-sort-value=2 | <math>O(\text{poly}(n))</math> |- | [[EXPTIME]] | data-sort-value=4 | <math>O(2^{\text{poly}(n)})</math> |} Logarithmic-space classes do not account for the space required to represent the problem. It turns out that PSPACE = NPSPACE and EXPSPACE = NEXPSPACE by [[Savitch's theorem]]. Other important complexity classes include [[BPP (complexity)|BPP]], [[ZPP (complexity)|ZPP]] and [[RP (complexity)|RP]], which are defined using [[probabilistic Turing machine]]s; [[AC (complexity)|AC]] and [[NC (complexity)|NC]], which are defined using Boolean circuits; and [[BQP]] and [[QMA]], which are defined using quantum Turing machines. [[Sharp-P|#P]] is an important complexity class of counting problems (not decision problems). Classes like [[IP (complexity)|IP]] and [[AM (complexity)|AM]] are defined using [[Interactive proof system]]s. [[ALL (complexity)|ALL]] is the class of all decision problems. ===Hierarchy theorems=== {{main|time hierarchy theorem|space hierarchy theorem}} For the complexity classes defined in this way, it is desirable to prove that relaxing the requirements on (say) computation time indeed defines a bigger set of problems. In particular, although DTIME(<math>n</math>) is contained in DTIME(<math>n^2</math>), it would be interesting to know if the inclusion is strict. For time and space requirements, the answer to such questions is given by the time and space hierarchy theorems respectively. They are called hierarchy theorems because they induce a proper hierarchy on the classes defined by constraining the respective resources. Thus there are pairs of complexity classes such that one is properly included in the other. Having deduced such proper set inclusions, we can proceed to make quantitative statements about how much more additional time or space is needed in order to increase the number of problems that can be solved. More precisely, the [[time hierarchy theorem]] states that <math>\mathsf{DTIME}\big(o(f(n)) \big) \subsetneq \mathsf{DTIME} \big(f(n) \cdot \log(f(n)) \big)</math>. The [[space hierarchy theorem]] states that <math>\mathsf{DSPACE}\big(o(f(n))\big) \subsetneq \mathsf{DSPACE} \big(f(n) \big)</math>. The time and space hierarchy theorems form the basis for most separation results of complexity classes. For instance, the time hierarchy theorem tells us that P is strictly contained in EXPTIME, and the space hierarchy theorem tells us that L is strictly contained in PSPACE. ===Reduction=== {{main|Reduction (complexity)}} Many complexity classes are defined using the concept of a reduction. A reduction is a transformation of one problem into another problem. It captures the informal notion of a problem being at most as difficult as another problem. For instance, if a problem <math>X</math> can be solved using an algorithm for <math>Y</math>, <math>X</math> is no more difficult than <math>Y</math>, and we say that <math>X</math> ''reduces'' to <math>Y</math>. There are many different types of reductions, based on the method of reduction, such as Cook reductions, Karp reductions and Levin reductions, and the bound on the complexity of reductions, such as [[polynomial-time reduction]]s or [[log-space reduction]]s. The most commonly used reduction is a polynomial-time reduction. This means that the reduction process takes polynomial time. For example, the problem of squaring an integer can be reduced to the problem of multiplying two integers. This means an algorithm for multiplying two integers can be used to square an integer. Indeed, this can be done by giving the same input to both inputs of the multiplication algorithm. Thus we see that squaring is not more difficult than multiplication, since squaring can be reduced to multiplication. This motivates the concept of a problem being hard for a complexity class. A problem <math>X</math> is ''hard'' for a class of problems <math>C</math> if every problem in <math>C</math> can be reduced to <math>X</math>. Thus no problem in <math>C</math> is harder than <math>X</math>, since an algorithm for <math>X</math> allows us to solve any problem in <math>C</math>. The notion of hard problems depends on the type of reduction being used. For complexity classes larger than P, polynomial-time reductions are commonly used. In particular, the set of problems that are hard for NP is the set of [[NP-hard]] problems. If a problem <math>X</math> is in <math>C</math> and hard for <math>C</math>, then <math>X</math> is said to be ''[[complete (complexity)|complete]]'' for <math>C</math>. This means that <math>X</math> is the hardest problem in <math>C</math>. (Since many problems could be equally hard, one might say that <math>X</math> is one of the hardest problems in <math>C</math>.) Thus the class of [[NP-complete]] problems contains the most difficult problems in NP, in the sense that they are the ones most likely not to be in P. Because the problem P = NP is not solved, being able to reduce a known NP-complete problem, <math>\Pi_2</math>, to another problem, <math>\Pi_1</math>, would indicate that there is no known polynomial-time solution for <math>\Pi_1</math>. This is because a polynomial-time solution to <math>\Pi_1</math> would yield a polynomial-time solution to <math>\Pi_2</math>. Similarly, because all NP problems can be reduced to the set, finding an [[NP-complete]] problem that can be solved in polynomial time would mean that P = NP.<ref name="Sipser2006"/>
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Computational complexity theory
(section)
Add topic