Randomized Algorithm for Identity Testing & Complexity Classes, Study notes of Computational Methods

The computational complexity of identity testing using a randomized algorithm. The algorithm, which is based on schwartz-zippel lemma, is proven to correctly identify equivalent polynomials with a high probability. The document also introduces the concepts of random polynomial time and randomized complexity classes, providing examples and lemmas to illustrate these concepts.

Typology: Study notes

2010/2011

Uploaded on 10/28/2011

thecoral
thecoral 🇺🇸

4.5

(30)

395 documents

1 / 5

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CS221: Computational Complexity Prof. Salil Vadhan
Lecture 17: Randomized Complexity
and Identity Testing
10/30 Scribe: Grant Schoenebeck
Contents
1 Identity Testing 1
2 Randomized Complexity Classes 3
1 Identity Testing
Given algebraic expressions p(x1, x2, . . . , xn), q(x1, x2, . . . , xn) decide is p
q?
We can interpret equivalence in two different ways: as formal polynomials or
as functions from ZnZ. For polynomials over Z, these two interpretations
are the same.
We gave the following randomized algorithm to solve the problem:
1. Let m= max{|p|,|q|}, M = 2m, S ={1, . . . , M }.
2. Randomly choose α1, α2, . . . , αnS.
3. Accept if p(x1, x2, . . . , xn) = q(x1, x2, . . . , xn).
Proposition 1
if pqthen algorithm always accepts.
if p6≡ qthen algorithm accepts with probability m
M= 2Ω(m)(over its coin
tosses).
1) is obvious.
2) follows from the 2 lemmas below.
1
pf3
pf4
pf5

Partial preview of the text

Download Randomized Algorithm for Identity Testing & Complexity Classes and more Study notes Computational Methods in PDF only on Docsity!

CS221: Computational Complexity Prof. Salil Vadhan

Lecture 17: Randomized Complexity

and Identity Testing

10/30 Scribe: Grant Schoenebeck

Contents

1 Identity Testing 1

2 Randomized Complexity Classes 3

1 Identity Testing

Given algebraic expressions p(x 1 , x 2 ,... , xn), q(x 1 , x 2 ,... , xn) decide is p ≡ q?

We can interpret equivalence in two different ways: as formal polynomials or as functions from Zn^ → Z. For polynomials over Z, these two interpretations are the same.

We gave the following randomized algorithm to solve the problem:

  1. Let m = max{|p|, |q|}, M = 2m, S = { 1 ,... , M }.
  2. Randomly choose α 1 , α 2 ,... , αn ⇐ S.
  3. Accept if p(x 1 , x 2 ,... , xn) = q(x 1 , x 2 ,... , xn).

Proposition 1

if p ≡ q then algorithm always accepts.

if p 6 ≡ q then algorithm accepts with probability ≤ (^) Mm = 2−Ω(m)^ (over its coin tosses).

  1. is obvious.

  2. follows from the 2 lemmas below.

Definition 2 The total degree of a polynomial is the maximum of the sums of coefficients in each term (when written in canonical form

i 1 ,...,in∈N ci^1 ,...,in^ x

i 1 1 x

i 2 2 · · ·^ x

in n )

Example 3 The total degree of f (x, y) = x^2 y^3 + x^4 is 5.

Lemma 4 The total degree of expression p(x 1 , x 2 ,... , xn) is at most |p|.

Proof:

(by induction on |p|)

deg(p 1 · p 2 ) = deg(p 1 ) + deg(p 2 ) ≤ (by inductive hypothesis)|p 1 | + |p 2 | ≤ |p 1 · p 2 |. A similar argument shows that deg(p 1 + p 2 ) ≤ |p 1 + p 2 |.

Lemma 5 (Schwartz–Zippel) If r is a nonzero polynomial,

Pr (α 1 ,α 2 ,...,αn)←S

[r(α 1 , α 2 ,... , αn) = 0] ≤

deg r |S|

where deg r is the total degree of r.

Proof: (By induction on n, the number of variables)

Base case: n = 1. Prα←S [r(α) = 0] ≤ deg |S|^ r. This follows from a fundamental theorem of algebra that states the the number of solutions to a non-zero polynomial is at most the degree of the polynomial.

Inductive step. Observe that

r(x 1 ,... , xn) =

∑^ k

i=

ri(x 1 , x 2 ,... , xn− 1 )xin, (1)

where rk 6 = 0. Then

Pr[r(¯α) = 0]

≤ Pr[rk(α 1 , α 2 ,... , αn− 1 ) = 0] + Pr[r(α 1 , α 2 ,... , αn) = 0|rk(α 1 , α 2 ,... , αn− 1 ) 6 = 0]

deg rk |S|

k |S|

The first term follows from the inductive hypothesis, while the second term is a result of the same algebraic property we used in the base case. Note now that deg rk + k ≤ deg r, by Equation (1).

  1. If x ∈ L ⇒ Prcoin flips [M (x) accepts ] ≥ 12.
  2. If x 6 ∈ L ⇒ Prcoin flips [M (x) accepts ] = 0

Thus, the algorithm can make errors only on yes instances. We stress that the above holds for all inputs; the randomness is only over the algorithm’s coin tosses. We have shown:

Theorem 13 IdentityTest is in co-RP.

Lemma 14 (RP Amplification) If L ∈ RP ⇒ ∀ polynomial p ∃ an RP algorithm for L with error probability ≤ 2 −p(n)

Proof: Given error 12 algorithm M for L, run M (x) p(n) times and accept if M ever accepts, otherwise reject.

The probability that M accepts if x 6 ∈ L is still 0. But if x ∈ L the probability that it rejects is at most ( 12 )p(n).

What about 2-sided error?

Definition 15 (Bounded-error probabilistic polynomial time) L ∈ BPP if ∃ a polynomial time probabilistic TM M such that

  1. If x ∈ L ⇒ Prcoin flips [M (x) accepts ] ≥ 23.
  2. If x 6 ∈ L ⇒ Prcoin flips [M (x) accepts ] ≤ 13.

Lemma 16 (BPP Amplification) If L ∈ BPP ⇒ ∀ polynomial p∃ a probabilistic polynomial-time algorithm for L with error probability ≤ 2 −p(n)

Proof: Given a BPP algorithm M and input x, run M on x k times and decide by majority vote.

Fact: The error decreases as 2−Ω(k). This is proved using a fact from proba- bility known as the Chernoff Bound (Lemma 11.9 in Pap.). So by picking an appropriate k (polynomial in the length of x) we get the desired bound.

Does BPP = P? We don’t yet know but there is a lot of evidence that if they are not equal they are very close.

We do know that RP ⊆ NP because the certificate could just be the flips that give you an accepting computation. For the same reason co-RP ⊆ co-NP. We will prove that BPP ⊂ Σ 2 P next time.

Σ 2 P Π 2 P

co − N P BP P N P

co − RP RP

P