





Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!






Notes for CMSC 652 Randomized Polynomial Time William Gasarch
Def 1.1 A set A is in R (Randomized Polynomial Time) if there exists a polynomial p, and a polynomial predicate B so that for all n, and for all x with |x| = n, we have
x ∈ A ⇒ Pr|r|=p(n)(B(x, r)) ≥ (^34) x /∈ A ⇒ Pr|r|=p(n)(¬B(x, r)) = 1
(Think of r as being a random string.)
Note 1.2 Some papers use RP instead of R. This has the advantage that you can extend to other classes like R log.
Exercise 1
We have defined R with 1-sided error. This is because most known ran- domized algorithms have 1-sided error. The following problems are in R.
There are many problems in P (or even lower classes) that have a faster algorithm (with a small probability of error) if you allow randomization.
Classes with 2-sided error have also been defined. We will look at those later in this chapter.
Note 1.3 If a problem is in R, then we think of it as feasible to solve in the real world. This is because there are good (though not provably good) random number generators. There are also theoretical reasons to think that P = R (see [5]).
We will need the notion of a randomized reduction.
Def 1.5 Let A and B be two sets. We say that A ≤p r B if there exists a function f computable in poly time (the reduction), and polynomials p, q such that x ∈ A ⇒ Pr|r|=p(n)(f (x, r) ∈ B) ≥ (^) q(^1 n) x /∈ A ⇒ Pr|r|=p(n)(f (x, r) ∈/ B) = 1
(Think of r as being a random string.)
This does not look that useful since the probability of being right when x ∈ A is small. But its usefulness emerges from the following theorem.
Theorem 1.6 If A ≤p r B and B ∈ P then A ∈ R.
Proof: Assume A ≤p r B via the function f and polynomials p, q.
If x /∈ A then, for all i, f (x, ri) ∈/ B hence the algorithm will (correctly) say NO. If x ∈ A then, for each i, Pr(f (x, ri) ∈/ B) ≤ (1 − (^) q(^1 n) ). Hence
[Pr((∀i)[f (x, ri) ∈/ B])] ≤ (1 − (^) q(^1 n) )^2 q(n) ≤ (e−^1 /q(n))^2 q(n) ≤ (e−^1 )^2 ≤ (^) e^12 ≤ 14.
Hence Pr((∃i)[f (x, ri) ∈ B]) ≥ 1 − 14 = 34. This establishes the desired result.
Exercise 3 Show that if A ≤p r B and B ∈ R then A ∈ R.
Our definition of Randomized Polynomial Time assumed one-sided error. That is, if x ∈ A then the algorithm outputs YES or NO (YES much more often) but if x /∈ A then the algorithm will output NO. What if we allow two-sided error?
Def 2.1 A set A is in BPP (Bounded Probabilistic Polynomial Time) if there exists a polynomial p, and a polynomial predicate B so that for all n, and for all x with |x| = n, we have
x ∈ A ⇒ Pr|r|=p(n)(B(x, r)) ≥ (^34) x /∈ A ⇒ Pr|r|=p(n)(B(x, r)) ≤ 1 − (^34)
(Think of r as being a random string.)
Exercise 4
Note 2.2 Very few problems are known to be in BPP but not known to be in P. See [1] for some; however, that paper was written before the result Primes in P so it may be outdated.
What if we pick L values of t? Then we get
Prt 1 ,...,tL (y /∈
⋃^ L
i=
S ⊕ ti) ≤ e−|S|L/^2
m = e−m.
What is the probability that there exists a y which is not covered? For- mally
Prt 1 ,...,tL ((∃y)[y /∈
⋃^ m
i=
S ⊕ ti]) ≤ 2 me−m.
For large enough m (in fact, m need not be that large) this quantity is < 1. Hence there exists t 1 ,... , tL. such that
{ 0 , 1 }m^ =
⋃^ n
i=
S ⊕ ti.
Theorem 2.5 BPP ⊆ Σp 2 ∩ Πp 2
Proof: Let A ∈ BPP. Let m = m(n) be the polynomial such that, for all x of length n,
x ∈ A ⇒ Pr|r|=m(B(x, r)) ≥ (1 − (^21) n ) x /∈ A ⇒ Pr|r|=m(B(x, r)) ≤ (^21) n
(Think of r as being a random string.) Let
Sx = {r | B(x, r)}.
We rewrite the equations above about x ∈ A and x /∈ A.
x ∈ A ⇒ |Sx| ≥ (1 − (^21) n )2m x /∈ A ⇒ |Sx| ≤ (^21) n 2 m^ = 2m−n
Let Lx = 2mm/|Sx| (recognize this from Lemma 2.4). Note that
x ∈ A ⇒ Lx ≤ 2 m.
(Note- we could use (1 + δ)m instead of 2m but there is no need.) By Lemma 2.
x ∈ A ⇒ (∃t 1 ,... , t 2 m ∈ { 0 , 1 }m)(∀y ∈ { 0 , 1 }m)[y ∈
(^2) ⋃m
i=
Sx ⊕ ti].
Hence
x ∈ A ⇒ (∃t 1 ,... , t 2 m ∈ { 0 , 1 }m)(∀y ∈ { 0 , 1 }m)[
(^2) ∨m
i=
y ⊕ ti ∈ Sx].
Note that the set {(x, y) |
(^2) ⋃m
i=
y ⊕ ti ∈ Sx
is in P so we have ‘half of’ what we want: x ∈ A implies a Σp 2 statement. We show the converse now. We use the version
x ∈ A ⇒ (∃t 1 ,... , t 2 m ∈ { 0 , 1 }m)(∀y ∈ { 0 , 1 }m)[
(^2) ∨m
i=
y ⊕ ti ∈ Sx].
for this. Assume
(∃t 1 ,... , t 2 m ∈ { 0 , 1 }m)(∀y ∈ { 0 , 1 }m)[y ∈
(^2) ⋃m
i=
Sx ⊕ ti].
We need to show that x ∈ A. Map every y ∈ { 0 , 1 }m^ to the least i such that y ∈ Sx ⊕ti. There exists an i such that at least 2m/ 2 m = 2m−^1 /m strings map to i. These are 2m−^1 /m distinct elements of Sx. Hence
|Sx| ≥ 2 m−^1 /m.
Note that if x /∈ A then |Sx| ≤ 2 m−n. Since m is a polynomial in n, m << 2 n. Hence 2 m−n^ < 2 m−^1 /m ≤ |Sx|.