A language L is in PP if and only if there exists a probabilistic Turing machine M, such that
Alternatively, PP can be defined using only deterministic Turing machines. A language L is in PP if and only if there exists a polynomial p and deterministic Turing machine M, such that
In this definition, the string y corresponds to the output of the random coin flips that the probabilistic Turing machine would have made.
In both definitions, "less than" can be changed to "less than or equal to" (see below), and the threshold 1/2 can be replaced by any fixed rational number in (0,1), without changing the class.
BPP is a subset of PP; it can be seen as the subset for which there are efficient probabilistic algorithms. The distinction is in the error probability that is allowed: in BPP, an algorithm must give correct answer (YES or NO) with probability exceeding some fixed constant c > 1/2, such as 2/3 or 501/1000. If this is the case, then we can run the algorithm a number of times and take a majority vote to achieve any desired probability of correctness less than 1, using the Chernoff bound. This number of repeats increases if c becomes closer to 1/2, but it does not depend on the input size n.
More generally, if c can depend on the input size n {\displaystyle n} polynomially, as c = O ( n − k ) {\displaystyle c=O(n^{-k})} , then we can rerun the algorithm for O ( n 2 k ) {\displaystyle O(n^{2k})} and take the majority vote. By Hoeffding's inequality, this gives us a BPP algorithm.
The important thing is that this constant c is not allowed to depend on the input. On the other hand, a PP algorithm is permitted to do something like the following:
Because these two probabilities are exponentially close together, even if we run it for a polynomial number of times it is very difficult to tell whether we are operating on a YES instance or a NO instance. Attempting to achieve a fixed desired probability level using a majority vote and the Chernoff bound requires a number of repetitions that is exponential in n.
PP includes BPP, since probabilistic algorithms described in the definition of BPP form a subset of those in the definition of PP.
PP also includes NP. To prove this, we show that the NP-complete satisfiability problem belongs to PP. Consider a probabilistic algorithm that, given a formula F(x1, x2, ..., xn) chooses an assignment x1, x2, ..., xn uniformly at random. Then, the algorithm checks if the assignment makes the formula F true. If yes, it outputs YES. Otherwise, it outputs YES with probability 1 2 − 1 2 n + 1 {\displaystyle {\frac {1}{2}}-{\frac {1}{2^{n+1}}}} and NO with probability 1 2 + 1 2 n + 1 {\displaystyle {\frac {1}{2}}+{\frac {1}{2^{n+1}}}} .
If the formula is unsatisfiable, the algorithm will always output YES with probability 1 2 − 1 2 n + 1 < 1 2 {\displaystyle {\frac {1}{2}}-{\frac {1}{2^{n+1}}}<{\frac {1}{2}}} . If there exists a satisfying assignment, it will output YES with probability at least ( 1 2 − 1 2 n + 1 ) ⋅ ( 1 − 1 2 n ) + 1 ⋅ 1 2 n = 1 2 + 1 2 2 n + 1 > 1 2 {\displaystyle \left({\frac {1}{2}}-{\frac {1}{2^{n+1}}}\right)\cdot \left(1-{\frac {1}{2^{n}}}\right)+1\cdot {\frac {1}{2^{n}}}={\frac {1}{2}}+{\frac {1}{2^{2n+1}}}>{\frac {1}{2}}} (exactly 1/2 if it picked an unsatisfying assignment and 1 if it picked a satisfying assignment, averaging to some number greater than 1/2). Thus, this algorithm puts satisfiability in PP. As SAT is NP-complete, and we can prefix any deterministic polynomial-time many-one reduction onto the PP algorithm, NP is included in PP. Because PP is closed under complement, it also includes co-NP.
Furthermore, PP includes MA,4 which subsumes the previous two inclusions.
PP also includes BQP, the class of decision problems solvable by efficient polynomial time quantum computers. In fact, BQP is low for PP, meaning that a PP machine achieves no benefit from being able to solve BQP problems instantly. The class of polynomial time on quantum computers with postselection, PostBQP, is equal to PP5 (see #PostBQP below).
Furthermore, PP includes QMA, which subsumes inclusions of MA and BQP.
A polynomial time Turing machine with a PP oracle (PPP) can solve all problems in PH, the entire polynomial hierarchy. This result was shown by Seinosuke Toda in 1989 and is known as Toda's theorem. This is evidence of how hard it is to solve problems in PP. The class #P is in some sense about as hard, since P#P = PPP and therefore P#P includes PH as well.6
PP strictly includes uniform TC0, the class of constant-depth, unbounded-fan-in boolean circuits with majority gates that are uniform (generated by a polynomial-time algorithm).7
PP is included in PSPACE. This can be easily shown by exhibiting a polynomial-space algorithm for MAJSAT, defined below; simply try all assignments and count the number of satisfying ones.
PP is not included in SIZE(nk) for any k, by Kannan's theorem.
Unlike BPP, PP is a syntactic rather than semantic class. Any polynomial-time probabilistic machine recognizes some language in PP. In contrast, given a description of a polynomial-time probabilistic machine, it is undecidable in general to determine if it recognizes a language in BPP.
PP has natural complete problems, for example, MAJSAT.8 MAJSAT is a decision problem in which one is given a Boolean formula F. The answer must be YES if more than half of all assignments x1, x2, ..., xn make F true and NO otherwise.
Let L be a language in PP. Let L c {\displaystyle L^{c}} denote the complement of L. By the definition of PP there is a polynomial-time probabilistic algorithm A with the property that
We claim that without loss of generality, the latter inequality is always strict; the theorem can be deduced from this claim: let A c {\displaystyle A^{c}} denote the machine which is the same as A except that A c {\displaystyle A^{c}} accepts when A would reject, and vice versa. Then
which implies that L c {\displaystyle L^{c}} is in PP.
Now we justify our without loss of generality assumption. Let f ( | x | ) {\displaystyle f(|x|)} be the polynomial upper bound on the running time of A on input x. Thus A makes at most f ( | x | ) {\displaystyle f(|x|)} random coin flips during its execution. In particular the probability of acceptance is an integer multiple of 2 − f ( | x | ) {\displaystyle 2^{-f(|x|)}} and we have:
Define a machine A′ as follows: on input x, A′ runs A as a subroutine, and rejects if A would reject; otherwise, if A would accept, A′ flips f ( | x | ) + 1 {\displaystyle f(|x|)+1} coins and rejects if they are all heads, and accepts otherwise. Then
and
This justifies the assumption (since A′ is still a polynomial-time probabilistic algorithm) and completes the proof.
David Russo proved in his 1985 Ph.D. thesis9 that PP is closed under symmetric difference. It was an open problem for 14 years whether PP was closed under union and intersection; this was settled in the affirmative by Beigel, Reingold, and Spielman.10 Alternate proofs were later given by Li11 and Aaronson (see #PostBQP below).
The quantum complexity class BQP is the class of problems solvable in polynomial time on a quantum Turing machine. By adding postselection, a larger class called PostBQP is obtained. Informally, postselection gives the computer the following power: whenever some event (such as measuring a qubit in a certain state) has nonzero probability, you are allowed to assume that it takes place.12 Scott Aaronson showed in 2004 that PostBQP is equal to PP.1314 This reformulation of PP makes it easier to show certain results, such as that PP is closed under intersection (and hence, under union), that BQP is low for PP, and that QMA is included in PP.
PP is also equal to another quantum complexity class known as PQP, which is the unbounded error analog of BQP. It denotes the class of decision problems solvable by a quantum computer in polynomial time, with an error probability of less than 1/2 for all instances. Even if all amplitudes used for PQP-computation are drawn from algebraic numbers, still PQP coincides with PP.15
Gill, John (1977). "Computational Complexity of Probabilistic Turing Machines". SIAM Journal on Computing. 6 (4): 675–695. doi:10.1137/0206049. /wiki/Doi_(identifier) ↩
Lindell, Yehuda; Katz, Jonathan (2015). Introduction to Modern Cryptography (2 ed.). Chapman and Hall/CRC. p. 46. ISBN 978-1-4665-7027-6. 978-1-4665-7027-6 ↩
Lance Fortnow. Computational Complexity: Wednesday, September 4, 2002: Complexity Class of the Week: PP. http://weblog.fortnow.com/2002/09/complexity-class-of-week-pp.html http://weblog.fortnow.com/2002/09/complexity-class-of-week-pp.html ↩
N.K. Vereshchagin, "On the Power of PP" http://lpcs.math.msu.su/~ver/papers/am-pp.ps ↩
Aaronson, Scott (2005). "Quantum computing, postselection, and probabilistic polynomial-time". Proceedings of the Royal Society A. 461 (2063): 3473–3482. arXiv:quant-ph/0412187. Bibcode:2005RSPSA.461.3473A. doi:10.1098/rspa.2005.1546. S2CID 1770389. /wiki/ArXiv_(identifier) ↩
Toda, Seinosuke (1991). "PP is as hard as the polynomial-time hierarchy". SIAM Journal on Computing. 20 (5): 865–877. doi:10.1137/0220053. MR 1115655. /wiki/Seinosuke_Toda ↩
Allender 1996, as cited in Burtschick 1999 ↩
David Russo (1985). Structural Properties of Complexity Classes (Ph.D Thesis). University of California, Santa Barbara. ↩
R. Beigel, N. Reingold, and D. A. Spielman, "PP is closed under intersection", Proceedings of ACM Symposium on Theory of Computing 1991, pp. 1–9, 1991. http://citeseer.ist.psu.edu/152946.html ↩
Lide Li (1993). On the Counting Functions (Ph.D Thesis). University of Chicago. ↩
Aaronson, Scott. "The Amazing Power of Postselection". Retrieved 2009-07-27. http://www.scottaaronson.com/talks/postselect.ppt ↩
Aaronson, Scott (2004-01-11). "Complexity Class of the Week: PP". Computational Complexity Weblog. Retrieved 2008-05-02. http://weblog.fortnow.com/2004/01/complexity-class-of-week-pp-by-guest.html ↩
Yamakami, Tomoyuki (1999). "Analysis of Quantum Functions". Int. J. Found. Comput. Sci. 14 (5): 815–852. arXiv:quant-ph/9909012. Bibcode:1999quant.ph..9012Y. doi:10.1142/S0129054103002047. S2CID 3265603. /wiki/ArXiv_(identifier) ↩