3
$\begingroup$

The complexity class BPP requires that the running time be guaranteed polynomial, though with only a 2/3 chance of the correct output.

ZPP, on the other hand, guarantees correct output, but now only requires that expected running time be polynomial.

Is there some complexity class with both: it only requires the running time be expected polynomial, and also only requires a 2/3 chance of success?

If so, how large is this class? Is it strictly larger than BPP, and would it be feasible? What are some problems in this class that aren't in BPP or ZPP?

$\endgroup$
4
  • 1
    $\begingroup$ It’s the same as BPP, by the same argument that shows that the two definitions of ZPP (as e.g. in en.wikipedia.org/wiki/ZPP_(complexity)) coincide. $\endgroup$ Commented Jun 10 at 10:20
  • 1
    $\begingroup$ Oh! That is very neat. OK, so extrapolating: we can run any "expected polynomial" algorithm for 2x its expected running time, and if it hasn't returned by then we just return some random answer. Using Markov's inequality, we know that the probability of it running for more than twice the expected value is ≤ 1/2, so the probability of getting the right answer is ≥ 1/2 * 2/3 + 1/2 * 1/2 = 7/12. BPP doesn't really require a 2/3 chance - could be any constant probability > 1/2 - so we're still in BPP. $\endgroup$ Commented Jun 11 at 23:32
  • $\begingroup$ Just thinking @EmilJeřábek, is there some similar method to turn an algorithm whose median running time is polynomial into something in BPP as well? $\endgroup$ Commented Jun 25 at 21:49
  • $\begingroup$ Actually, a later thought: I guess it would be. Just run it for the median time, and if it isn't done, then just flip a coin and return the result. Clearly this will still give you a > 50% probability. $\endgroup$ Commented Jun 26 at 0:09

1 Answer 1

1
$\begingroup$

This is the same as BPP.

Let $A$ be an algorithm whose expected running time is polynomial, say $p(n)$, and that has a probability $\ge 2/3$ of giving the corrected answer.

Let $B$ an algorithm that runs $A$ for $4p(n)$ steps, and terminates it if it runs longer than that. If it is terminated early, flip a coin and return a random answer; otherwise, returns whatever $A$ did. Notice that the probability that $B$ returns the correct answer is

$$\ge (3/4)\times (2/3) + (1/4) \times (1/2) = 5/8.$$

Let $C$ be an algorithm that runs $B$ 3 times on the same input, and takes a majority vote of its outputs. Then the probability that $C$ returns the correct answer is

$$\ge (5/8)^3 + {3 \choose 1} \cdot(5/8)^2 \cdot (3/8),$$

which is $>2/3$ if you do the arithmetic.

We conclude that $C$'s running time is guaranteed to be at most $12p(n)$, which is polynomial, and $C$ has at least a $2/3$ chance of outputting the correct answer. This proves that the problem is in BPP.

Thanks to @Mike Battaglia and Emil Jeřábek for this argument.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.