Error thresholds of BPP, RP and ZPP #
The thresholds 2 / 3 of BPP (Cslib.Complexity.BPP) and 1 / 2 of RP and ZPP
(Cslib.Complexity.RP, Cslib.Complexity.ZPP) can be replaced by any threshold that is
inverse-polynomially better than a coin flip, and by thresholds exponentially close to certainty.
The relaxed classes take the threshold as a function of the length n of the encoded instance:
Cslib.Complexity.BPPWithError enc ε: decided in polynomial time with error at mostε(n)on every instance, the classBPP_εof Goldreich, Exercise 6.4;Cslib.Complexity.RPWithSuccess enc ρ: members accepted with probability at leastρ(n)and non-members never accepted, the classRP_ρof Goldreich, Exercise 6.5;Cslib.Complexity.ZPPWithSuccess enc ρ: answers never wrong, and an answer other thannonewith probability at leastρ(n), the classZPP_ρof Goldreich, Exercise 6.6.
As everywhere in this library, the machines are deterministic polynomial-time verifiers reading a
random string of polynomial length p(n), and probabilities are counts over these strings
(Cslib.Complexity.acceptCount). Thresholds are real numbers.
Weak-gap amplification #
The strict majority of 2 q(n) ^ 2 runs on independent blocks of random bits
(Cslib.Complexity.repeatMajority) turns success probability 1 / 2 + 1 / q(n) into success
probability 4 / 5: by the exponential-moment bound
Cslib.five_mul_card_filter_card_filter_le_sq_le, at most a fifth of the random strings give at
most q(n) ^ 2 right runs (Cslib.Complexity.boundedErrorAt_repeatMajority_sq). The disjunction of
q(n) runs (Cslib.Complexity.repeatAny) turns acceptance probability 1 / q(n) into acceptance
probability 1 / 2, since (1 - 1 / q) ^ q ≤ 1 / 2
(Cslib.Complexity.two_pow_le_two_mul_acceptCount_repeatAny). Both trial counts depend on the input
length through the polynomial q. Combined with the exponential error reduction for BPP and RP
and with ZPP = RP ∩ coRP, this gives the following.
Main results #
Cslib.Complexity.BPPWithError_subset_BPP: an error at most1 / 2 - 1 / q(n)at all sufficiently large lengths givesBPP; the finitely many shorter instances are decided by table lookup.Cslib.Complexity.BPP_subset_BPPWithError,Cslib.Complexity.RP_subset_RPWithSuccess,Cslib.Complexity.ZPP_subset_ZPPWithSuccess: error2 ^ (-q(n)).Cslib.Complexity.RPWithSuccess_subset_RP,Cslib.Complexity.ZPPWithSuccess_subset_ZPP: success probability1 / q(n)givesRP, resp.ZPP.Cslib.Complexity.BPPWithError_eq_BPP,Cslib.Complexity.RPWithSuccess_inv_eq_RP,Cslib.Complexity.ZPPWithSuccess_inv_eq_ZPP,Cslib.Complexity.ZPP_eq_ZPPWithSuccess: Goldreich, Exercises 6.4(1), 6.5(1), 6.6(1) and 6.6(2).Cslib.Complexity.setOf_exists_BPPWithError_rpow_eq_BPP: Arora–Barak, Lemma 7.9, with the printed bound required from some length on.Cslib.Complexity.setOf_exists_BPPWithError_rpow_subset_two_rpow: Arora–Barak, Theorem 7.10.Cslib.Complexity.RPWithSuccess_succ_rpow_subset_one_sub_two_rpow: Arora–Barak, Theorem 7.12.
Corrections of the sources #
- Arora–Barak, Lemma 7.9 and Theorem 7.10 require success probability
1 / 2 + |x| ^ (-c)on every string. This is impossible whenever|x| ^ c < 2, in particular at length1, and undefined at length0, so the classBPP_{n^{-c}}as printed misses every problem with such instances. We require the printed bound only from some length on; this class is exactlyBPP(Cslib.Complexity.setOf_exists_BPPWithError_rpow_eq_BPP). Scaling to1 / 2 + (n + 1) ^ (-c)on all instances does not repair the statement: an instance with the empty encoding, such as the empty string underencBits, would still need success probability3 / 2. Bounds of this kind at all lengths are instances ofCslib.Complexity.BPPWithError_subset_BPP. Theorem 7.12 is stated with(n + 1) ^ (-c), which is at most1, in place of the printedn ^ (-c), which is undefined atn = 0. - Goldreich, Exercise 6.4(1) is stated for every positive polynomial
p, withε(n) = 1 / 2 - 1 / p(n)taking values in[0, 1]. Forp = 2, the classBPP_0isP, so the equality would sayP = BPP, which is open. We assumep(n) > 2for everyn. Likewise, forp = 1the classesRP_1andZPP_1of Exercises 6.5(1) and 6.6(1) areP, and the equalities would sayP = RPandP = ZPP; we assumep(n) ≥ 2.
References #
- S. Arora, B. Barak, Computational Complexity: A Modern Approach, draft of 2007-01-08, Section 7.4.1, Lemma 7.9 and Theorems 7.10 and 7.12 (printed pages 121–122, PDF pages 137–138).
- O. Goldreich, Computational Complexity: A Conceptual Perspective, draft
r3.pdfof February 2007, Exercises 6.4–6.6 (printed page 254, PDF page 52).
The relaxed classes #
V decides A with error at most ε(n), using random strings whose length is p evaluated at
the length n of the encoded instance: members are accepted, and non-members rejected, on all but
at most an ε(n) fraction of the random strings.
The problems decided with error at most ε(n) by polynomial-time machines reading
polynomially long random strings, where n is the length of the encoded instance: the class
BPP_ε of Goldreich, Exercise 6.4.
V decides A with one-sided error and success probability at least ρ(n), using random
strings whose length is p evaluated at the length n of the encoded instance: members are
accepted on at least a ρ(n) fraction of the random strings, and non-members on none.
V decides A with zero error and success probability at least ρ(n), using random strings
whose length is p evaluated at the length n of the encoded instance: an answer some b is
always right, b = true exactly when a ∈ A, and at least a ρ(n) fraction of the random strings
give an answer.
Numeric bridges #
BPP #
Weak-gap majority at one instance. If a single run of V gives b on a fraction at least
1 / 2 + 1 / q(n) of the random strings, that is 2 · 2 ^ p(n) ≤ q(n) (2 G - 2 ^ p(n)) for the
number G of such strings, then the strict majority of 2 q(n) ^ 2 runs on independent blocks of
random bits gives b with bounded error.
Weak-gap amplification for BPP. If, at all sufficiently large lengths n, the error
bound ε(n) is at most 1 / 2 - 1 / q(n) for a polynomial q, then BPP_ε ⊆ BPP. The strict
majority of 2 q(n) ^ 2 runs decides the problem with bounded error at these lengths, and the
finitely many instances of the other lengths are decided by table lookup.
Exponential error reduction into BPP_ε. If 2 ^ (-q(n)) ≤ ε(n) for a polynomial q, then
BPP ⊆ BPP_ε.
Goldreich, Exercise 6.4(1): for a polynomial p with p(n) > 2 for
every n, and ε(n) = 1 / 2 - 1 / p(n), the class BPP_ε equals BPP, for every encoding of the
instances. Goldreich states the exercise for every positive polynomial; for p = 2 the class
BPP_0 is P, and the equality would assert the open P = BPP; we assume p(n) > 2.
Arora–Barak, Lemma 7.9, with the printed bound from some length on: for
c > 0, the problems decided in polynomial time with success probability at least
1 / 2 + n ^ (-c) on all instances of every length n ≥ N, for some N, are exactly BPP, for
every encoding of the instances. The draft requires the bound on every string, which is impossible
whenever n ^ c < 2; below N nothing is required here (error at most 1).
Arora–Barak, Theorem 7.10 (error reduction), with the hypothesis of
Lemma 7.9 read from some length on (Cslib.Complexity.setOf_exists_BPPWithError_rpow_eq_BPP): for
c > 0, a problem decided in polynomial time with success probability at least 1 / 2 + n ^ (-c)
on all instances of every length n ≥ N is, for every d, decided in polynomial time with success
probability at least 1 - 2 ^ (-(n + 1) ^ d) on every instance, where n is the length of the
encoded instance. The draft states the error 2 ^ (-|x| ^ d), which is trivial at length 0.
RP #
Repetition at inverse-polynomial success. If a single run of V accepts a on at least a
1 / q(n) fraction of the random strings, the disjunction of q(n) runs on independent blocks of
random bits accepts on at least half of them, since (1 - 1 / q) ^ q ≤ 1 / 2.
Inverse-polynomial success gives RP. If ρ(n) ≥ 1 / q(n) > 0 for a polynomial q, then
RP_ρ ⊆ RP: the disjunction of q(n) runs accepts members on at least half of the random
strings.
Exponential error reduction into RP_ρ. If ρ(n) ≤ 1 - 2 ^ (-q(n)) for a polynomial q,
then RP ⊆ RP_ρ.
Goldreich, Exercise 6.5(1): for a polynomial p with p(n) ≥ 2 for
every n, the class RP_{1/p} equals RP, for every encoding of the instances. Goldreich states
the exercise for every positive polynomial; for p = 1 the class RP_1 is P, and
the equality would assert the open P = RP; we assume p(n) ≥ 2.
Arora–Barak, Theorem 7.12 (error reduction for RP): a problem decided in
polynomial time with one-sided error and success probability at least (n + 1) ^ (-c) is, for every
d, decided in polynomial time with one-sided error and success probability at least
1 - 2 ^ (-(n + 1) ^ d), where n is the length of the encoded instance. The draft writes n in
place of n + 1; at n = 0 its bounds are undefined, resp. trivial.
ZPP #
Accepting exactly on the answer some true decides the problem with one-sided error and the
same success probability: ZPP_ρ ⊆ RP_ρ.
ZPP_ρ is closed under complement: negate the answers.
Inverse-polynomial success gives ZPP. If ρ(n) ≥ 1 / q(n) > 0 for a polynomial q, then
ZPP_ρ ⊆ ZPP: the problem and its complement are in RP_ρ ⊆ RP, and ZPP = RP ∩ coRP.
Exponential error reduction into ZPP_ρ. If ρ(n) ≤ 1 - 2 ^ (-q(n)) for a polynomial q,
then ZPP ⊆ ZPP_ρ (Cslib.Complexity.exists_zeroError_errorExponent_of_mem_RP_inter_coRP).
Goldreich, Exercise 6.6(1): for a polynomial p with p(n) ≥ 2 for
every n, the class ZPP_{1/p} equals ZPP, for every encoding of the instances. Goldreich states
the exercise for every positive polynomial; for p = 1 the class ZPP_1 is P, and
the equality would assert the open P = ZPP; we assume p(n) ≥ 2.
Goldreich, Exercise 6.6(2): for every positive polynomial p, the
class ZPP equals ZPP_ρ for ρ(n) = 1 - 2 ^ (-p(n)), for every encoding of the instances.