The classes RP and coRP, and their promise versions #
RP is defined like BPP (Cslib.Complexity.BPP), through deterministic polynomial-time
machines that read a random string, but with one-sided error
Arora and Barak, Section 7.3: A ∈ RP enc when there are a polynomial p and
a function V : α × List Bool → Bool, computable in polynomial time on inputs
frame (enc a) ++ r, such that for every member a of A at least half of the random strings
r of length p (enc a).length are accepted, and for every non-member none is. coRP contains
the complements of problems in RP.
As for BPP, the one-sided error condition is stated once, for promise problems
(Cslib.Complexity.PromiseProblem.SolvesWithOneSidedError) Goldreich, Section 6.2,
and A ∈ RP enc is, by definition, ofSet A ∈ PromiseRP enc
(Cslib.Complexity.ofSet_mem_PromiseRP). Since an accepted random string is a certificate,
PromiseRP ⊆ PromiseNP and RP ⊆ NP. ZPP, with ZPP = RP ∩ coRP, is defined in
Cslib.Complexity.ZPP.
The error 1 / 2 can be made exponentially small Arora and Barak, Chapter 7: for
a polynomial q, run the solver on q(n) independent blocks of random bits, where n is the
length of the encoded instance, and accept when some run accepts (Cslib.Complexity.repeatAny).
A yes-instance is then rejected on at most a 2 ^ (-q(n)) fraction of the random strings
(Cslib.Complexity.PromiseProblem.SolvesWithOneSidedErrorExponent), and a no-instance is still
never accepted. Two runs reject a yes-instance with probability at most 1 / 4, so
PromiseRP ⊆ PromiseBPP, and RP ⊆ BPP.
Main definitions #
Cslib.Complexity.PromiseProblem.SolvesWithOneSidedError: the one-sided error condition, and its specializationCslib.Complexity.DecidesWithOneSidedErrorto decision problems.Cslib.Complexity.PromiseRP,Cslib.Complexity.PromiseCoRP,Cslib.Complexity.RP,Cslib.Complexity.coRP.Cslib.Complexity.PromiseProblem.SolvesWithOneSidedErrorExponent: one-sided error at most2 ^ (-q(n)), and its specializationCslib.Complexity.DecidesWithOneSidedErrorExponent.
Main results #
Cslib.Complexity.mem_PromiseRP_iff: unfoldingPromiseRPto a polynomial-time verifier.Cslib.Complexity.ofSet_mem_PromiseRP,Cslib.Complexity.ofSet_mem_PromiseCoRP.Cslib.Complexity.PromiseProblem.SolvesWithOneSidedError.exists_certificate,Cslib.Complexity.DecidesWithOneSidedError.isVerifier,Cslib.Complexity.RP_subset_NP,Cslib.Complexity.PromiseRP_subset_PromiseNP,Cslib.Complexity.coRP_subset_coNP.Cslib.Complexity.PromiseProblem.SolvesWithOneSidedError.repeatAny: repetition reduces the error to2 ^ (-q(n)).Cslib.Complexity.mem_PromiseRP_iff_forall_solvesWithOneSidedErrorExponent,Cslib.Complexity.mem_RP_iff_forall_decidesWithOneSidedErrorExponent: error reduction forPromiseRPandRP.Cslib.Complexity.PromiseRP_subset_PromiseBPP,Cslib.Complexity.PromiseCoRP_subset_PromiseBPP,Cslib.Complexity.RP_subset_BPP,Cslib.Complexity.coRP_subset_BPP.
References #
V solves the promise problem Q with one-sided error, using random strings whose length is
p evaluated at the length of the encoded instance: for every yes-instance at least half of the
random strings are accepted, and for every no-instance none is
Goldreich, Section 6.2. Nothing is required on
instances outside the promise.
Instances For
A one-sided-error solver for a promise problem is a polynomial-time verifier on the promise: a random string accepted on a yes-instance is a certificate, and no certificate of the right length is accepted on a no-instance.
V decides A with one-sided error, using random strings whose length is p evaluated at the
length of the encoded instance: it solves the promise problem ofSet A with one-sided error. For
every member a of A at least half of the random strings are accepted, and for every non-member
none is.
Instances For
The promise problems solved with one-sided error (no false positives on no-instances) by polynomial-time algorithms reading polynomially long random strings Goldreich, Section 6.2.
Instances For
The promise problems solved with one-sided error (no false negatives on yes-instances) by
polynomial-time algorithms reading polynomially long random strings: those whose complements are
in PromiseRP Goldreich, Section 6.2.
Instances For
The problems decided with one-sided error by polynomial-time machines reading polynomially
long random strings, with respect to the encoding enc of instances
Arora and Barak, Section 7.3.
Instances For
The problems whose complements are in RP Arora and Barak, Section 7.3.
Instances For
Membership in PromiseRP unfolded to a polynomial coin bound and a polynomial-time
one-sided-error solver.
A decision problem, as a promise problem, is in PromiseCoRP exactly when it is in coRP.
A random string accepted by a one-sided-error decider is a certificate: one-sided error gives a verifier.
Error reduction #
V solves the promise problem Q with one-sided error at most 2 ^ (-q(n)), using random
strings whose length is p evaluated at the length n of the encoded instance: for every
yes-instance the rejected random strings make up at most a 2 ^ (-q(n)) fraction, and for every
no-instance none is accepted. Nothing is required on instances outside the promise.
Instances For
Error reduction for one-sided error: the repetition argument of
Arora and Barak, Chapter 7, which the book states for languages, applied to promise
problems. The disjunction of q(n) runs of a one-sided-error solver, on independent blocks of
random bits, rejects a yes-instance on at most a 2 ^ (-q(n)) fraction of the random strings, and
never accepts a no-instance.
One-sided error at most 2 ^ (-q(n)) ≤ 1 / 2 is one-sided error.
One-sided error at most 2 ^ (-q(n)) is error at most 2 ^ (-q(n)).
V decides A with one-sided error at most 2 ^ (-q(n)), using random strings whose length is
p evaluated at the length n of the encoded instance: it solves ofSet A with that error. For
every member a of A the rejected random strings make up at most a 2 ^ (-q(n)) fraction, and
for every non-member none is accepted.
Instances For
Error reduction for PromiseRP, the promise-problem form of the RP error reduction of
Arora and Barak, Chapter 7: a promise problem is in PromiseRP exactly when, for
every polynomial q, it is solved in polynomial time with one-sided error at most 2 ^ (-q(n)).
Error reduction for RP Arora and Barak, Chapter 7: a problem is in RP
exactly when, for every polynomial q, it is decided in polynomial time with one-sided error at
most 2 ^ (-q(n)).
PromiseRP ⊆ PromiseBPP, the promise-problem form of RP ⊆ BPP
Arora and Barak, Chapter 7: two runs of a one-sided-error solver reject a
yes-instance with probability at most 1 / 4.
PromiseCoRP ⊆ PromiseBPP: PromiseBPP is closed under complement.
RP ⊆ BPP Arora and Barak, Chapter 7: two runs of a one-sided-error
decider reject a member with probability at most 1 / 4.