Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Schwartz-Zippel Algorithm and Bipartite Perfect Matching: Lecture 14 - Prof. Andrew Mcgreg, Exams of Computer Science

Two topics from a university-level computer science course: schwartz-zippel algorithm for testing polynomial equality and communication complexity, and bipartite perfect matching using edmonds' theorem. Proofs, theorems, and problem statements.

Typology: Exams

Pre 2010

Uploaded on 08/19/2009

koofers-user-yg0
koofers-user-yg0 🇺🇸

5

(1)

10 documents

1 / 51

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CMPSCI 711: “Really Advanced Algorithms”
Lecture 14 Finger Printing
Andrew McGregor
Last Compiled: March 30, 2009
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33

Partial preview of the text

Download Schwartz-Zippel Algorithm and Bipartite Perfect Matching: Lecture 14 - Prof. Andrew Mcgreg and more Exams Computer Science in PDF only on Docsity!

CMPSCI 711: “Really Advanced Algorithms”

Lecture 14 – Finger Printing

Andrew McGregor

Last Compiled: March 30, 2009

Schwartz-Zippel

String Equality and Some Communication Complexity

Pattern Matching

Readings

Schwartz-Zippel

Problem

Given three n variable polynomials P 1 , P 2 , P 3 over the field F. Can you test if

P 1 (x 1 ,... , xn) × P 2 (x 1 ,... , xn) = P 3 (x 1 ,... , xn)

faster than multiplying the polynomials? Equivalently, is

Q(x 1 ,... , xn) = P 1 (x 1 ,... , xn) × P 2 (x 1 ,... , xn) − P 3 (x 1 ,... , xn)

zero for all x 1 ,... , xn?

Schwartz-Zippel

Problem

Given three n variable polynomials P 1 , P 2 , P 3 over the field F. Can you test if

P 1 (x 1 ,... , xn) × P 2 (x 1 ,... , xn) = P 3 (x 1 ,... , xn)

faster than multiplying the polynomials? Equivalently, is

Q(x 1 ,... , xn) = P 1 (x 1 ,... , xn) × P 2 (x 1 ,... , xn) − P 3 (x 1 ,... , xn)

zero for all x 1 ,... , xn?

Theorem (Schwartz-Zippel)

Let Q(x 1 ,... , xn) be a non-zero multivariate polynomial F of total degree d. Fix any finite set S ⊂ F and let r 1 ,... , rn be chosen independently and uniformly at random from S. Then,

P [Q(r 1 ,... , rn) = 0] ≤ d/|S|

Schwartz-Zippel Proof

I (^) Induction on n: For n = 1, because Q has at most d roots, P [Q(r 1 ) = 0] ≤ d/|S| I (^) For induction step define Qi for 0 ≤ i ≤ k:

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

∑^ k

i=

xi^ Qi (x 2 ,... , xn)

where k is maximum such that Qk (x 2 ,... , xn) 6 ≡ 0

Schwartz-Zippel Proof

I (^) Induction on n: For n = 1, because Q has at most d roots, P [Q(r 1 ) = 0] ≤ d/|S| I (^) For induction step define Qi for 0 ≤ i ≤ k:

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

∑^ k

i=

xi^ Qi (x 2 ,... , xn)

where k is maximum such that Qk (x 2 ,... , xn) 6 ≡ 0 I (^) Since total degree of Qk is at most d − k, P [Qk (r 2 ,... , rn) = 0] ≤ (d − k)/|S|

Schwartz-Zippel Proof

I (^) Induction on n: For n = 1, because Q has at most d roots, P [Q(r 1 ) = 0] ≤ d/|S| I (^) For induction step define Qi for 0 ≤ i ≤ k:

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

∑^ k

i=

xi^ Qi (x 2 ,... , xn)

where k is maximum such that Qk (x 2 ,... , xn) 6 ≡ 0 I (^) Since total degree of Qk is at most d − k, P [Qk (r 2 ,... , rn) = 0] ≤ (d − k)/|S| I (^) Consider q(x) = Q(x, r 2 ,... , rn), P [q(r 1 ) = 0|Qk (r 2 ,... , rn) 6 = 0] ≤ k/|S| I (^) Putting together gives P [Q(r 1 ,... , rn) = 0] at most P [Qk (r 2 ,... , rn) = 0]+P [q(r 1 ) = 0|Qk (r 2 ,... , rn) 6 = 0] ≤ d/|S|

Bipartite Perfect Matching

Definition

Let G = (U, V , E ) be a bipartite graph on U = {u 1 ,... , un} and V = {v 1 ,... , vn}. M ⊂ E is a matching if each vertex occurs at most once in M. If |M| = n then we say M is a perfect matching.

Bipartite Perfect Matching

Definition

Let G = (U, V , E ) be a bipartite graph on U = {u 1 ,... , un} and V = {v 1 ,... , vn}. M ⊂ E is a matching if each vertex occurs at most once in M. If |M| = n then we say M is a perfect matching.

Theorem (Edmonds’ Theorem)

Given G , let A be n × n matrix where

Ai,j =

xij if (ui , vj ) ∈ E 0 if (ui , vj ) ∈ E

Then det(A) is multivariate polynomial with maximum degree n. det(A) ≡ 0 iff G has a perfect matching. Schwartz-Zippel result gives randomized method for seeing if G has perfect matching. But it’s actually not that interesting...

Outline

Schwartz-Zippel

String Equality and Some Communication Complexity

Pattern Matching

Readings

Verifying Equality of Strings

Problem

Suppose Alice has binary string (a 1 ,... , an) and Bob has binary string (b 1 ,... , bn). How many bits to this need to communicate to conclude (with high probability) that the strings are equal?

Protocol

I (^) Alice and Bob defines a =

i∈[n] ai^2 n−i (^) and b =

i∈[n] bi^2 n−i

Verifying Equality of Strings

Problem

Suppose Alice has binary string (a 1 ,... , an) and Bob has binary string (b 1 ,... , bn). How many bits to this need to communicate to conclude (with high probability) that the strings are equal?

Protocol

I (^) Alice and Bob defines a =

i∈[n] ai^2 n−i (^) and b =

i∈[n] bi^2 n−i I (^) Alice randomly picks a prime p ≤ τ = tn log tn

Verifying Equality of Strings

Problem

Suppose Alice has binary string (a 1 ,... , an) and Bob has binary string (b 1 ,... , bn). How many bits to this need to communicate to conclude (with high probability) that the strings are equal?

Protocol

I (^) Alice and Bob defines a =

i∈[n] ai^2 n−i (^) and b =

i∈[n] bi^2 n−i I (^) Alice randomly picks a prime p ≤ τ = tn log tn I (^) Alice transmits Fp (a) = a mod p and p to Bob I (^) Bob computes Fp (b): Returns “equal” iff Fp (a) = Fp (b)

Verifying Equality of Strings

Problem

Suppose Alice has binary string (a 1 ,... , an) and Bob has binary string (b 1 ,... , bn). How many bits to this need to communicate to conclude (with high probability) that the strings are equal?

Protocol

I (^) Alice and Bob defines a =

i∈[n] ai^2 n−i (^) and b =

i∈[n] bi^2 n−i I (^) Alice randomly picks a prime p ≤ τ = tn log tn I (^) Alice transmits Fp (a) = a mod p and p to Bob I (^) Bob computes Fp (b): Returns “equal” iff Fp (a) = Fp (b)

Theorem

Protocol uses O(log(tn)) bits of communication and is correct with probability 1 − O(1/t).