Math 2.0

Computer science Definition

BPP

Builds on Probabilistic Turing machineComplexity classFormal language

Definition

A language L⊆{0,1}∗L \subseteq \set{0,1}^* is in BPP if there are a polynomial pp and a probabilistic Turing machine MM such that:

  1. on every input xx and for every outcome of its coin flips, MM halts within p(∣x∣)p(\abs{x}) steps and outputs 00 or 11;
  2. for every x∈Lx \in L, Pr⁡[M(x)=1]≥2/3\Pr[M(x) = 1] \ge 2/3;
  3. for every x∉Lx \notin L, Pr⁡[M(x)=1]≤1/3\Pr[M(x) = 1] \le 1/3.

The probabilities are over the fair coin flips of MM.

Remarks

Example: let LL be the set of triples (A,B,C)(A, B, C) of n×nn \times n matrices over 𝔽2\F_2 with AB=CAB = C. The machine MM picks two independent uniform vectors r∈𝔽2nr \in \F_2^n and accepts if A(Br)=CrA(Br) = Cr for both, which takes O(n2)O(n^2) steps for each. If AB=CAB = C, then MM always accepts. If AB≠CAB \ne C, then D=AB−CD = AB - C has a nonzero row, and Dr=0Dr = 0 for at most half of the vectors rr, so MM accepts with probability at most 1/41/4. So LL is in BPP; this test is Freivalds' algorithm.

Non-example: a machine that accepts each x∈Lx \in L with probability 1/2+2−∣x∣1/2 + 2^{-\abs{x}} and each x∉Lx \notin L with probability 1/21/2 fails clause 2. Machines with such a vanishing gap define the class PP, which contains BPP.

The constants 2/32/3 and 1/31/3 can be replaced by 1/2+ε1/2 + \varepsilon and 1/2−ε1/2 - \varepsilon for any fixed ε>0\varepsilon > 0, or by 1−2−q(n)1 - 2^{-q(n)} and 2−q(n)2^{-q(n)} for any polynomial qq. This follows by running MM many times and taking the majority vote, with the Chernoff bound. Equivalently, L∈BPPL \in \mathrm{BPP} if there are a polynomial-time deterministic machine VV and a polynomial pp with the following property. For every xx and a uniform r∈{0,1}p(∣x∣)r \in \set{0,1}^{p(\abs{x})}, the output V(x,r)V(x, r) is 11 if x∈Lx \in L and 00 if x∉Lx \notin L with probability at least 2/32/3.

Reading path

To understand this page from the ground up, read these 4 pages in order. The foundations come first.

Show the path as a graph
Each page uses the pages above it. The colour of the bar on a box shows how strong the evidence is, and the box also gives it as text. The list has the same pages.
  • no evidence level
  1. Complexity class concept
  2. Formal language concept
  3. Probabilistic Turing machine concept
  4. BPP definition

Further reading

  1. Web https://en.wikipedia.org/wiki/BPP_(complexity)
About this page
TagBBCY0Q2FV8
URIm2://BBCY0Q2FV8
Kinddefinition
WritingW0 stub
MSC68Q15, 68Q10, 68W20
DefinesBPP
UsesProbabilistic Turing machine, Complexity class, Formal language
Changed3 November 2026

Markdown · JSON · Edit on GitHub

What this page needs for W1

  • an inventory row: the row of the inventory that the node accounts for (0 of 1)
  • a source with a locator (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

No page links to this page yet.