The classes BPP and promise-BPP #
BPP is defined through deterministic polynomial-time machines that read a random string
Arora and Barak, Section 7.1: A ∈ BPP enc when there are a polynomial p
and a function V : α × List Bool → Bool, computable in polynomial time on inputs
encPair enc encBits (a, r) = frame (enc a) ++ r, such that for every instance a, at least two
thirds of the random strings r of length p (enc a).length give the right answer:
V (a, r) = true exactly when a ∈ A.
The bounded-error condition is stated once, for promise problems
(Cslib.Complexity.PromiseProblem.SolvesWithBoundedError): the right answer is required only on
the yes-instances and the no-instances Goldreich, Definition 1.2. A decision
problem A is the promise problem PromiseProblem.ofSet A, so DecidesWithBoundedError enc p V A
is (ofSet A).SolvesWithBoundedError enc p V, and A ∈ BPP enc is, by definition,
ofSet A ∈ PromiseBPP enc (Cslib.Complexity.ofSet_mem_PromiseBPP). Results proved for
PromiseBPP specialize to BPP in this way.
The probability is written as a count over the random strings, which are functions
Fin (p (enc a).length) → Bool. The characterisation by probabilistic machines
(Cslib.Complexity.mem_BPP_iff_exists_mem_BPTIME) is proved in
CslibFrontier.Computability.Complexity.Classes.Time.
Main definitions #
Cslib.Complexity.BoundedErrorAt: the per-instance bounded-error condition for a specified Boolean answer.Cslib.Complexity.PromiseProblem.SolvesWithBoundedError: the bounded-error condition on a promise problem.Cslib.Complexity.DecidesWithBoundedError: its specialization to a decision problem.Cslib.Complexity.PromiseBPP,Cslib.Complexity.BPP.
Main results #
Cslib.Complexity.boundedErrorAt_true_iff,Cslib.Complexity.boundedErrorAt_false_iff: per-instance bounded error as a bound onCslib.Complexity.acceptCount.Cslib.Complexity.BoundedErrorAt.congr,Cslib.Complexity.BoundedErrorAt.not: extensionality and negation for per-instance bounded error.Cslib.Complexity.PromiseProblem.SolvesWithBoundedError.compl,Cslib.Complexity.DecidesWithBoundedError.compl: negating the verifier solves the complement with bounded error.Cslib.Complexity.compl_mem_PromiseBPP,Cslib.Complexity.compl_mem_BPP,Cslib.Complexity.BPP_eq_preimage_compl_BPP: closure under complement.Cslib.Complexity.mem_PromiseBPP_iff: unfoldingPromiseBPPto a polynomial-time verifier.Cslib.Complexity.ofSet_mem_PromiseBPP:PromiseBPPagrees withBPPon decision problems.Cslib.Complexity.P_subset_BPP: a decider is a bounded-error verifier ignoring its random string.
References #
V gives the answer b with bounded error on the instance a, using random strings whose
length is p evaluated at the length of the encoded instance: at least two thirds of the random
strings r of length p (enc a).length give V (a, r) = b.
Instances For
Bounded error towards true is acceptance of at least two thirds of the random strings.
Bounded error towards false is acceptance of at most one third of the random strings.
Bounded error at an instance depends only on the verifier's values on strings of length
p(|a|).
Negating the verifier negates the bounded-error answer at a.
V solves the promise problem Q with bounded error, using random strings whose length is p
evaluated at the length of the encoded instance: for every yes-instance at least two thirds of the
random strings are accepted, and for every no-instance at least two thirds are rejected
Goldreich, Definition 1.2. Nothing is required on
instances outside the promise.
Instances For
Negating the verifier solves the complement promise problem with bounded error.
V decides A with bounded error, using random strings whose length is p evaluated at the
length of the encoded instance: it solves the promise problem ofSet A with bounded error. For
every instance a, at least two thirds of the random strings r give the right answer,
V (a, r) = true for members of A and V (a, r) = false for the others.
Instances For
Negating the verifier decides the complement with bounded error.
The promise problems solved with bounded error by polynomial-time algorithms reading
polynomially long random strings, with respect to the encoding enc of instances
Goldreich, Definition 1.2.
Instances For
The problems decided with bounded error by polynomial-time machines reading polynomially long
random strings, with respect to the encoding enc of instances Gill,
Arora and Barak, Section 7.1.
Instances For
Membership in PromiseBPP unfolded to a polynomial coin bound and a polynomial-time
bounded-error solver.
A decision problem, as a promise problem, is in PromiseBPP exactly when it is in BPP; this
holds by definition.
PromiseBPP is closed under complement.