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
BPP (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|Concept in computer science}} <span lang="es" dir="ltr">In</span> [[computational complexity theory]], a branch of computer science, '''bounded-error probabilistic polynomial time''' ('''BPP''') is the class of [[decision problem]]s solvable by a [[probabilistic Turing machine]] in [[polynomial time]] with an error [[probability]] bounded by 1/3 for all instances. '''BPP''' is one of the largest ''practical'' classes of problems, meaning most problems of interest in '''BPP''' have efficient [[probabilistic algorithm]]s that can be run quickly on real modern machines. '''BPP''' also contains '''[[P (complexity)|P]]''', the class of problems solvable in polynomial time with a deterministic machine, since a deterministic machine is a special case of a probabilistic machine. {| class="wikitable" style="float:right; clear:right; text-align:center; margin-left:1em;" |- !colspan="3"| BPP algorithm (1 run) |- ! {{diagonal split header|Correct<br />answer|Answer<div style{{=}}"padding-left:4em;">produced</div>}} ! {{yes}} ! {{no}} |- ! {{yes}} | ≥ 2/3 | ≤ 1/3 |- ! {{no}} | ≤ 1/3 | ≥ 2/3 |- !colspan="3"| BPP algorithm (''k'' runs) |- ! {{diagonal split header|Correct<br />answer|<div style{{=}}"padding-left:4em;">Answer</div>produced}} ! {{yes}} ! {{no}} |- ! {{yes}} | > 1 − 2<sup>−''ck''</sup> | < 2<sup>−''ck''</sup> |- ! {{no}} | < 2<sup>−''ck''</sup> | > 1 − 2<sup>−''ck''</sup> |- |colspan="3" style="font-size:85%"|for some constant ''c'' > 0 |} Informally, a problem is in '''BPP''' if there is an algorithm for it that has the following properties: *It is allowed to flip coins and make random decisions *It is guaranteed to run in polynomial time *On any given run of the algorithm, it has a probability of at most 1/3 of giving the wrong answer, whether the answer is YES or NO. == Definition == A language ''L'' is in '''BPP''' if and only if there exists a [[probabilistic Turing machine]] ''M'', such that * ''M'' runs for polynomial time on all inputs * For all ''x'' in ''L'', ''M'' outputs 1 with probability greater than or equal to 2/3 * For all ''x'' not in ''L'', ''M'' outputs 1 with probability less than or equal to 1/3 Unlike the complexity class '''[[ZPP (complexity)|ZPP]]''', the machine ''M'' is required to run for polynomial time on all inputs, regardless of the outcome of the random coin flips. Alternatively, '''BPP''' can be defined using only deterministic Turing machines. A language ''L'' is in '''BPP''' if and only if there exists a polynomial ''p'' and deterministic Turing machine ''M'', such that * ''M'' runs for polynomial time on all inputs * For all ''x'' in ''L'', the fraction of strings ''y'' of length ''p''(|''x''|) which satisfy {{tmath|1=M(x,y) = 1}} is greater than or equal to 2/3 * For all ''x'' not in ''L'', the fraction of strings ''y'' of length ''p''(|''x''|) which satisfy {{tmath|1=M(x,y) = 1}} is less than or equal to 1/3 In this definition, the string ''y'' corresponds to the output of the random coin flips that the probabilistic Turing machine would have made. For some applications this definition is preferable since it does not mention probabilistic Turing machines. In practice, an error probability of 1/3 might not be acceptable; however, the choice of 1/3 in the definition is arbitrary. Modifying the definition to use any [[mathematical constant|constant]] between 0 and 1/2 (exclusive) in place of 1/3 would not change the resulting set '''BPP'''. For example, if one defined the class with the restriction that the algorithm can be wrong with probability at most 1/2<sup>100</sup>, this would result in the same class of problems. The error probability does not even have to be constant: the same class of problems is defined by allowing error as high as 1/2 − ''n''<sup>−''c''</sup> on the one hand, or requiring error as small as 2<sup>−''n<sup>c</sup>''</sup> on the other hand, where ''c'' is any positive constant, and ''n'' is the length of input. This flexibility in the choice of error probability is based on the idea of running an error-prone algorithm many times, and using the majority result of the runs to obtain a more accurate algorithm. The chance that the majority of the runs are wrong [[exponential decay|drops off exponentially]] as a consequence of the [[Chernoff bound]].<ref>Valentine Kabanets, [http://www.cs.sfu.ca/~kabanets/cmpt710/lec16.pdf CMPT 710 - Complexity Theory: Lecture 16], October 28, 2003</ref> == Problems == {{unsolved|computer science|{{tmath|1= \mathsf P \overset{?}{=} \mathsf{BPP} }}}} All problems in '''P''' are obviously also in '''BPP'''. However, many problems have been known to be in '''BPP''' but not known to be in '''P'''. The number of such problems is decreasing, and it is conjectured that '''P''' = '''BPP'''. For a long time, one of the most famous problems known to be in '''BPP''' but not known to be in '''P''' was the problem of [[primality test|determining]] whether a given number is [[prime number|prime]]. However, in the 2002 paper ''[[AKS primality test|PRIMES is in '''P''']]'', [[Manindra Agrawal]] and his students [[Neeraj Kayal]] and [[Nitin Saxena]] found a deterministic polynomial-time algorithm for this problem, thus showing that it is in '''P'''. An important example of a problem in '''BPP''' (in fact in '''[[RP (complexity)|co-RP]]''') still not known to be in '''P''' is [[polynomial identity testing]], the problem of determining whether a polynomial is identically equal to the zero polynomial, when you have access to the value of the polynomial for any given input, but not to the coefficients. In other words, is there an assignment of values to the variables such that when a nonzero polynomial is evaluated on these values, the result is nonzero? It suffices to choose each variable's value uniformly at random from a finite subset of at least ''d'' values to achieve bounded error probability, where ''d'' is the total degree of the polynomial.<ref>Madhu Sudan and Shien Jin Ong. Massachusetts Institute of Technology: 6.841/18.405J Advanced Complexity Theory: [http://people.csail.mit.edu/madhu/ST03/scribe/lect06.pdf Lecture 6: Randomized Algorithms, Properties of BPP]. February 26, 2003.</ref> == Related classes == If the access to randomness is removed from the definition of '''BPP''', we get the complexity class '''P'''. In the definition of the class, if we replace the ordinary [[Turing machine]] with a [[quantum computer]], we get the class '''[[BQP]]'''. Adding [[postselection]] to '''BPP''', or allowing computation paths to have different lengths, gives the class '''BPP'''<sub>path</sub>.<ref>{{cite web | url=https://complexityzoo.net/Complexity_Zoo:B#bpppath | title=Complexity Zoo:B - Complexity Zoo }}</ref> '''BPP'''<sub>path</sub> is known to contain '''NP''', and it is contained in its quantum counterpart '''[[PostBQP]]'''. A [[Monte Carlo algorithm]] is a [[randomized algorithm]] which is likely to be correct. Problems in the class '''BPP''' have Monte Carlo algorithms with polynomial bounded running time. This is compared to a [[Las Vegas algorithm]] which is a randomized algorithm which either outputs the correct answer, or outputs "fail" with low probability. Las Vegas algorithms with polynomial bound running times are used to define the class '''[[ZPP (complexity)|ZPP]]'''. Alternatively, '''ZPP''' contains probabilistic algorithms that are always correct and have expected polynomial running time. This is weaker than saying it is a polynomial time algorithm, since it may run for super-polynomial time, but with very low probability. == Complexity-theoretic properties == [[File:Randomised Complexity Classes 2.svg|alt=Diagram of randomised complexity classes|thumb|upright=1.25|BPP in relation to other probabilistic complexity classes ([[ZPP (complexity)|ZPP]], [[RP (complexity)|RP]], co-RP, [[BQP]], [[PP (complexity)|PP]]), which generalise [[P (complexity)|P]] within [[PSPACE]]. It is unknown if any of these containments are strict.]] [[File:Complexity-classes-polynomial.svg|thumb|Inclusions of complexity classes including [[P (complexity)|P]], [[NP (complexity)|NP]], [[co-NP]], BPP, [[P/poly]], [[PH (complexity)|PH]], and [[PSPACE]]]] It is known that '''BPP''' is closed under [[Complement (complexity)|complement]]; that is, '''BPP''' = '''co-BPP'''. '''BPP''' is [[low (complexity)|low]] for itself, meaning that a '''BPP''' machine with the power to solve '''BPP''' problems instantly (a '''BPP''' [[oracle machine]]) is not any more powerful than the machine without this extra power. In symbols, '''BPP'''<sup>'''BPP'''</sup> = '''BPP'''. The relationship between '''BPP''' and '''[[NP (complexity)|NP]]''' is unknown: it is not known whether '''BPP''' is a [[subset]] of '''[[NP (complexity)|NP]]''', '''NP''' is a subset of '''BPP''' or neither. If '''NP''' is contained in '''BPP''', which is considered unlikely since it would imply practical solutions for [[NP-complete]] problems, then '''NP''' = '''RP''' and '''[[PH (complexity)|PH]]''' ⊆ '''BPP'''.<ref>Lance Fortnow, [http://weblog.fortnow.com/2005/12/pulling-out-quantumness.html Pulling Out The Quantumness], December 20, 2005</ref> It is known that '''[[RP (complexity)|RP]]''' is a subset of '''BPP''', and '''BPP''' is a subset of '''[[PP (complexity)|PP]]'''. It is not known whether those two are strict subsets, since we don't even know if '''P''' is a strict subset of '''PSPACE'''. '''BPP''' is contained in the second level of the [[polynomial hierarchy]] and therefore it is contained in '''PH'''. More precisely, the [[Sipser–Lautemann theorem]] states that <math>\mathsf{BPP} \subseteq \Sigma_2 \cap \Pi_2 </math>. As a result, '''P''' = '''NP''' leads to '''P''' = '''BPP''' since '''PH''' collapses to '''P''' in this case. Thus either '''P''' = '''BPP''' or '''P''' ≠ '''NP''' or both. [[Adleman's theorem]] states that membership in any language in '''BPP''' can be determined by a family of polynomial-size [[Boolean circuit]]s, which means '''BPP''' is contained in '''[[P/poly]]'''.<ref>{{cite conference | author = Adleman, L. M. | author-link = Leonard Adleman | title = Two theorems on random polynomial time | book-title = Proceedings of the Nineteenth Annual IEEE Symposium on Foundations of Computing | year = 1978 | pages = 75–83}}</ref> Indeed, as a consequence of the proof of this fact, every '''BPP''' algorithm operating on inputs of bounded length can be derandomized into a deterministic algorithm using a fixed string of random bits. Finding this string may be expensive, however. Some weak separation results for Monte Carlo time classes were proven by {{harvtxt|Karpinski|Verbeek|1987a}}, see also {{harvtxt|Karpinski|Verbeek|1987b}}. === Closure properties === The class BPP is closed under complementation, union, intersection, and concatenation. === Relativization === Relative to oracles, we know that there exist oracles A and B, such that '''P'''<sup>A</sup> = '''BPP'''<sup>A</sup> and '''P'''<sup>B</sup> ≠ '''BPP'''<sup>B</sup>. Moreover, relative to a [[random oracle]] with probability 1, '''P''' = '''BPP''' and '''BPP''' is strictly contained in '''NP''' and '''co-NP'''.<ref>{{Citation | last1=Bennett | first1=Charles H. | author1-link=Charles H. Bennett (computer scientist) | last2=Gill | first2=John | title=Relative to a Random Oracle A, P^A != NP^A != co-NP^A with Probability 1 | year=1981 | journal=SIAM Journal on Computing | issn=1095-7111 | volume=10 | issue=1 | pages=96–113 | doi=10.1137/0210008}}</ref> There is even an oracle in which {{tmath|1=\mathsf{BPP}=\mathsf{EXP}^\mathsf{NP} }} (and hence {{tmath|1=\mathsf{P<NP<BPP=EXP=NEXP} }}),<ref>{{Citation | last=Heller | first=Hans | title=On relativized exponential and probabilistic complexity classes | year=1986 | journal=Information and Control | volume=71 | issue=3 | pages=231–243 | doi=10.1016/S0019-9958(86)80012-2| doi-access=free }}</ref> which can be iteratively constructed as follows. For a fixed [[E (complexity)|E]]<sup>NP</sup> (relativized) complete problem, the oracle will give correct answers with high probability if queried with the problem instance followed by a random string of length ''kn'' (''n'' is instance length; ''k'' is an appropriate small constant). Start with ''n''=1. For every instance of the problem of length ''n'' fix oracle answers (see lemma below) to fix the instance output. Next, provide the instance outputs for queries consisting of the instance followed by ''kn''-length string, and then treat output for queries of length ≤(''k''+1)''n'' as fixed, and proceed with instances of length ''n''+1. {{Math theorem |name=Lemma|Given a problem (specifically, an oracle machine code and time constraint) in relativized {{math|{{sans-serif|E<sup>NP</sup>}}}}, for every partially constructed oracle and input of length ''n'', the output can be fixed by specifying 2<sup>''O''(''n'')</sup> oracle answers.}} {{Math proof|The machine is simulated, and the oracle answers (that are not already fixed) are fixed step-by-step. There is at most one oracle query per deterministic computation step. For the relativized NP oracle, if possible fix the output to be yes by choosing a computation path and fixing the answers of the base oracle; otherwise no fixing is necessary, and either way there is at most 1 answer of the base oracle per step. Since there are 2<sup>''O''(''n'')</sup> steps, the lemma follows.}} The lemma ensures that (for a large enough ''k''), it is possible to do the construction while leaving enough strings for the relativized {{math|{{sans-serif|E<sup>NP</sup>}}}} answers. Also, we can ensure that for the relativized {{math|{{sans-serif|E<sup>NP</sup>}}}}, linear time suffices, even for function problems (if given a function oracle and linear output size) and with exponentially small (with linear exponent) error probability. Also, this construction is effective in that given an arbitrary oracle A we can arrange the oracle B to have {{math|{{sans-serif|P}}<sup>A</sup>≤{{sans-serif|P}}<sup>B</sup>}} and {{math|1={{sans-serif|EXP}}<sup>{{sans-serif|NP}}<sup>A</sup></sup>={{sans-serif|EXP}}<sup>{{sans-serif|NP}}<sup>B</sup></sup>={{sans-serif|BPP}}<sup>B</sup>}}. Also, for a {{math|{{sans-serif|1=[[ZPP (complexity)|ZPP]]=EXP}}}} oracle (and hence {{math|{{sans-serif|1=ZPP=BPP=EXP<NEXP}}}}), one would fix the answers in the relativized E computation to a special nonanswer, thus ensuring that no fake answers are given. == Derandomization == The existence of certain strong [[pseudorandom number generators]] is [[conjecture]]d by most experts of the field. Such generators could replace true random numbers in any polynomial-time randomized algorithm, producing indistinguishable results. The conjecture that these generators exist implies that randomness does not give additional computational power to polynomial time computation, that is, '''P''' = '''RP''' = '''BPP'''. More strongly, the assumption that '''P''' = '''BPP''' is in some sense equivalent to the existence of strong pseudorandom number generators.<ref>{{cite book | last = Goldreich | first = Oded | editor-last = Goldreich | editor-first = Oded | contribution = In a World of P=BPP | contribution-url = https://www.wisdom.weizmann.ac.il/~oded/PDF/bpp.pdf | doi = 10.1007/978-3-642-22670-0_20 | pages = 191–232 | publisher = Springer | series = Lecture Notes in Computer Science | title = Studies in Complexity and Cryptography. Miscellanea on the Interplay between Randomness and Computation - In Collaboration with Lidor Avigad, Mihir Bellare, Zvika Brakerski, Shafi Goldwasser, Shai Halevi, Tali Kaufman, Leonid Levin, Noam Nisan, Dana Ron, Madhu Sudan, Luca Trevisan, Salil Vadhan, Avi Wigderson, David Zuckerman | volume = 6650 | year = 2011}}</ref> [[László Babai]], [[Lance Fortnow]], [[Noam Nisan]], and [[Avi Wigderson]] showed that unless '''[[EXPTIME]]''' collapses to '''[[MA (complexity)|MA]]''', '''BPP''' is contained in<ref name="Babai">{{cite journal | last1 = Babai | first1 = László | last2 = Fortnow | first2 = Lance | last3 = Nisan | first3 = Noam | last4 = Wigderson | first4 = Avi | year = 1993 | title = '''BPP''' has subexponential time simulations unless '''EXPTIME''' has publishable proofs | journal = Computational Complexity | volume = 3 | issue = 4 | pages = 307–318 | doi=10.1007/bf01275486| s2cid = 14802332 }}</ref> :<math>\textsf{i.o.-SUBEXP} = \bigcap\nolimits_{\varepsilon>0} \textsf{i.o.-DTIME} \left (2^{n^\varepsilon} \right).</math> The class '''i.o.-SUBEXP''', which stands for infinitely often '''SUBEXP''', contains problems which have [[sub-exponential time]] algorithms for infinitely many input sizes. They also showed that '''P''' = '''BPP''' if the exponential-time hierarchy, which is defined in terms of the [[polynomial hierarchy]] and '''E''' as '''E<sup>PH</sup>''', collapses to '''E'''; however, note that the exponential-time hierarchy is usually conjectured ''not'' to collapse. [[Russell Impagliazzo]] and [[Avi Wigderson]] showed that if any problem in '''[[E (complexity)|E]]''', where :<math>\mathsf{E} = \mathsf{DTIME} \left( 2^{O(n)} \right),</math> has circuit complexity 2<sup>Ω(''n'')</sup> then '''P''' = '''BPP'''.<ref>Russell Impagliazzo and Avi Wigderson (1997). "'''P''' = '''BPP''' if E requires exponential circuits: Derandomizing the XOR Lemma". ''Proceedings of the Twenty-Ninth Annual ACM Symposium on Theory of Computing'', pp. 220–229. {{doi|10.1145/258533.258590}}</ref> == See also == * '''[[RP (complexity)|RP]]''' * '''[[ZPP (complexity)|ZPP]]''' *'''[[BQP]]''' * [[List of complexity classes]] == References == {{Reflist}} * <span id="Kabanets">Valentine Kabanets (2003). "CMPT 710 – Complexity Theory: Lecture 16". [[Simon Fraser University]].</span> * {{cite book|author = Christos Papadimitriou|author-link = Christos Papadimitriou| year = 1993 | title = Computational Complexity | publisher = Addison Wesley | edition = 1st | isbn = 0-201-53082-1}} Pages 257–259 of section 11.3: Random Sources. Pages 269–271 of section 11.4: Circuit complexity. * {{cite book | author = Michael Sipser | author-link = Michael Sipser | year = 1997 | title = Introduction to the Theory of Computation | publisher = PWS Publishing | isbn = 0-534-94728-X | url-access = registration | url = https://archive.org/details/introductiontoth00sips }} Section 10.2.1: The class BPP, pp. 336–339. *{{cite book | last1 = Karpinski | first1 = Marek | author1-link = Marek Karpinski | last2 = Verbeek | first2 = Rutger | editor-last = Börger | editor-first = Egon | contribution = Randomness, provability, and the separation of Monte Carlo time and space | doi = 10.1007/3-540-18170-9_166 | pages = 189–207 | publisher = Springer | series = Lecture Notes in Computer Science | title = Computation Theory and Logic, In Memory of Dieter Rödding | volume = 270 | year = 1987a}} * {{cite journal| journal=Information and Computation| volume=75| issue=2| year=1987b| pages=178–189| title=On the Monte Carlo space constructible functions and separation results for probabilistic complexity classes| last1=Karpinski| first1=Marek| author-link1=Marek Karpinski| last2=Verbeek | first2=Rutger| doi=10.1016/0890-5401(87)90057-5| doi-access=free}} * Arora, Sanjeev; Boaz Barak (2009). "Computational Complexity: A Modern Approach". == External links == * [http://www.cs.princeton.edu/courses/archive/fall03/cs597E/ Princeton CS 597E: Derandomization paper list] * [http://www.courses.fas.harvard.edu/~cs225/ Harvard CS 225: Pseudorandomness] {{Webarchive|url=https://web.archive.org/web/20030805021413/http://www.courses.fas.harvard.edu/~cs225/ |date=2003-08-05 }} {{ComplexityClasses}} {{DEFAULTSORT:Bpp}} [[Category:Probabilistic complexity classes]]
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:Citation
(
edit
)
Template:Cite book
(
edit
)
Template:Cite conference
(
edit
)
Template:Cite journal
(
edit
)
Template:Cite web
(
edit
)
Template:ComplexityClasses
(
edit
)
Template:Diagonal split header
(
edit
)
Template:Doi
(
edit
)
Template:Harvtxt
(
edit
)
Template:Math
(
edit
)
Template:Math proof
(
edit
)
Template:Math theorem
(
edit
)
Template:No
(
edit
)
Template:Reflist
(
edit
)
Template:Short description
(
edit
)
Template:Tmath
(
edit
)
Template:Unsolved
(
edit
)
Template:Webarchive
(
edit
)
Template:Yes
(
edit
)