Lecture 15 Computational Complexity Theory

Abhishek Shetty Raghav Malhotra Undergraduate Department Undergraduate Department Indian Institute of Science Indian Institute of Sciece Instructor Chandan Saha Computer Science and Automation Indian Institute of Science September 24 2015

1 Class BPP

Definition 1.1. ∈ BPP if there is a polytime probabilistic M such that 2 x ∈ L ⇐⇒ P [M(x) = L(x)] ≥ (1) 3

Definition 1.2. L ∈ BPP1 if there is a polytime probabilistic Turing Machine M such that 1 x ∈ L ⇐⇒ P r[M(x) = L(x)] ≥ + n−c (2) 2 where n = |x|.

Definition 1.3. L ∈ BPP2 if there is a polytime probabilistic Turing Machine M such that

d x ∈ L ⇐⇒ P r[M(x) = L(x)] ≥ 1 − 2−n (3) where n = |x|.

Theorem 1.1. BPP1 = BPP2

Proof. It is clear that BPP2 ⊂ BPP1. To prove the other direction, consider L ∈ BPP1. This implies that ∃M, a polytime probabilistic Turing Machine, such that 1 P r[M(x) = L(x)] ≥ + n−c (4) 2 where n = |x|. Consider the machine N, which on input x runs M on x p(n) times where p is a polynomial to be fixed later. Let yi be the answer on the ith iteration. N then outputs the answer which was given by M majority of the times. Consider the following random variables Xi. ( 1 yi = L(x) Xi = (5) 0 yi 6= L(x)

Pp(n) Let X = 1 Xi. It is clear that X ≥ p(n)/2 ⇐⇒ N(x) = L(x). It can be seen that [Xi] = 1 −c 2c+d −2 P r[L(x) = M(x)] = q ≥ 2 + n . Setting p(n) = 8n and δ = n /2, from Chernoff Bounds we have

2 − δ qp(n) −nd P r[N(x) 6= L(x)] ≤ e 4 ≤ 2 (6)

Thus, L ∈ BPP2. Therefore, BPP1 = BPP2.

1 Remark. It is clear from the definition that P ⊂ BPP ⊂ EXP. Though, it has been conjectured that P = BPP, even the inclusion relations between BPP and NP are unknown. In fact, it is not even known whether BPP ( NEXP. Theorem 1.2. BPP = co − BPP

2 Proof. Let L ∈ BPP. Then, ∃M such that P r[M(x) = L(x)] ≥ 3 . Consider N that runs M on x and 2 flips the answer. It is clear that P r[N(x) = L(x)] ≥ 3 . Thus, L ∈ BPP and co − BPP ⊂ BPP. Through a symmetric argument it can be seen that BPP ⊂ co − BPP. Thus, we have BPP = co − BPP. Theorem 1.3 (Adleman). BPP ⊂ P/poly Proof. Let L ∈ BPP. Thus, ∃M such that P r[M(x, r) 6= L] ≤ 2−n−1 where r is a random string of size 2m m m. For each x, there are at most 2n+1 strings r such that M(x, r) 6= L(x). Thus, only 2 /2 strings are n bad for at least one x. We have r0 such that ∀x ∈ {0, 1} : M(x, r0) = L(x). We give this string as to the machine N which then simulates M and thus N(x) = L(x). Thus, BPP ⊂ P/poly.

p Corollary 1.3.1. NP ⊂ BPP =⇒ PH = Σ2 p Proof. NP ⊂ BPP =⇒ NP ⊂ P/poly. By Karp-Lipton Theorem, we have NP ⊂ P/poly =⇒ PH = Σ2. p Thus, we have NP ⊂ BPP =⇒ PH = Σ2.

2 Classes RP, co − RP and ZPP

Definition 2.1. RTIME(T(n)) is defined as the family of languages L which have a PTM M running in time T (n) such that

x ∈ L =⇒ P r[M(x)] = 1] ≥ 2/3 x∈ / L =⇒ P r[M(x) = 1] = 0

S c Definition 2.2. RP = c>0 RTIME(n ) Definition 2.3. co − RP = {L ⊂ {0, 1}∗ | L ∈ RP} The classes RP and co − RP are known as one-sided error classes in contrast to BPP. Remark. [RP S co − RP] ⊂ BPP Theorem 2.1. RP ⊂ NP Proof. Let L ∈ RP. If x ∈ L then there exists a string r of polynomial size such that M(x, r) = 1. This string can be taken as the certificate. Also, if x∈ / L, there is no string r such that M(x, r) = 1. Thus, L ∈ NP. We next look at reducing the error probability of an RP machine. Say x ∈ L =⇒ P r[M(x)] = 1] ≥ n−c, where n = |x|. We define a machine M 0 such that it simulates the PTM M for the RP language L k times, where k is a polynomial to be decided. M 0 answers 1 if any of the iterations answers 1 and 0 otherwise. We can see that choosing k = +d

nc+d −d x ∈ L =⇒ P r[M 0(x) = 0] ≤ 1 − n−c ≤ 2n (7)

Thus, we can see that we can reduce the error probabilities to be arbitarily small. Lemma 2.2 (Markov Inequality). Let X be a positive random variable with finite expectation. Then, ∀a > 0 we have [X] P r[X ≥ a] ≤ E (8) a Definition 2.4. ZTIME(T (n)) is the family of languages, such that, for any L in the family ∃ a TM which always answers correctly when it halts, but the running time of the machine is a random variable X such that E[X] = T (n) S c Definition 2.5. ZPP= c>0 ZTIME(n )

2 Theorem 2.3. ZPP = RP T co − RP Proof. We prove one side of the statement. Claim 1 ZPP ⊂ RP Say L ∈ ZPP, we know ∃ a TM with expected running time O(nc) and the TM always answers correctly. We forcibly halt the TM M in 100(nc) computations and if the TM has not halted yet, answer M(x) = 0. By Markov’s inequality, the probability that M does not halt in 100(nc) steps is less than nc/100nc = 1/100. Thus, we have x ∈ L =⇒ P r[M(x) = 1] ≥ 99/100 and x∈ / L =⇒ P r[M(x) = 1] = 0. Thus, L ∈ RP. Claim 2 ZPP ⊂ co − RP This time if the machine halts in 100(nc) time we make our machine output 1. By analogous arguments, it can be seen that ZPP ⊂ co − RP. From Claim 1 and Claim 2, we have ZPP ⊂ RP T co − RP.

3