Polynomial Identity Testing Problems Schwartz-Zippel Lemma Bipartite Matching References
Polynomial Identity Testing Lemma Bipartite Matching References - - PowerPoint PPT Presentation
Polynomial Identity Testing Lemma Bipartite Matching References - - PowerPoint PPT Presentation
Polynomial Identity Testing Problems Schwartz-Zippel Polynomial Identity Testing Lemma Bipartite Matching References Anil Maheshwari anil@scs.carleton.ca School of Computer Science Carleton University Canada String Equality Testing
Polynomial Identity Testing Problems Schwartz-Zippel Lemma Bipartite Matching References
String Equality Testing
Alice-Bob String Testing Problem
Assume Alice has a binary string A = a1a2 . . . an and Bob has a binary string B = b1b2 . . . bn. What is minimum amount of communication required to test whether A = B?
Polynomial Identity Testing Problems Schwartz-Zippel Lemma Bipartite Matching References
Randomized Algorithm
Define A(x) =
n
- i=1
aixi and B(x) =
n
- i=1
bixi, where x ∈ F. F is a Field defined with modular arithmetic for a large prime number p. Algorithm:
1
Pick a random element α ∈ F
2
Alice computes A(α) and sends (α, A(α)) to Bob
3
Bob computes B(α)
4
Bob communicates to Alice True if B(α) = A(α), else False
Polynomial Identity Testing Problems Schwartz-Zippel Lemma Bipartite Matching References
Analysis of Randomized Algorithm
Case I: A = B: Algorithms reports TRUE as A(α) = B(α) no matter what is the value α ∈ F Case II: Assume A = B. Can algorithm make an error? Yes, if α is the root of the polynomial (A − B)x = 0. Pr(a random element of F is root of (A − B)x) ≤ n/|F| Question: How to increase the success probability? Communication Complexity: O(log |F|) bits.
Polynomial Identity Testing Problems Schwartz-Zippel Lemma Bipartite Matching References
Multivariate Polynomials
Determine if the multivariate polynomial Q(x1, x2, . . . , xn) ≡ 0? Example I: Q(x1, x2, x3, x4) = (x3
1 − x2 2)(−x2 1 − x4 3)(x3 4 − 2x1x2) ≡ 0
Example II: Det x1 − x2
2
x3 − x1 x2
4
x4 − x1 −x4
2
x2 − x4 2x3 − 7x1 x2
2 − x2 3
x3
1
x2 − x1 x4 − x3 x3
2
x3
2
x4 − 2x2 x1 − x2
3
x3
1 − x3 2
≡ 0
Polynomial Identity Testing Problems Schwartz-Zippel Lemma Bipartite Matching References
Schwartz–Zippel Lemma
Schwartz–Zippel Lemma
Let Q(x1, x2, . . . , xn) ≡ 0 be a multivariate polynomial of total degree d, where each xi takes value from a finite field F. Fix any finite set S ⊆ F and let r1, . . . , rn be chosen uniformly at random from S. Then Pr(Q(r1, . . . , rn) = 0) ≤
d |S|
Polynomial Identity Testing Problems Schwartz-Zippel Lemma Bipartite Matching References
Testing Determinants
Is Det x1 − x2
2
x3 − x1 x2
4
x4 − x1 −x4
2
x2 − x4 2x3 − 7x1 x2
2 − x2 3
x3
1
x2 − x1 x4 − x3 x3
2
x3
2
x4 − 2x2 x1 − x2
3
x3
1 − x3 2
≡ 0? Choose a large enough prime number p, and choose random values for x1, x2, x3, x4 from {0, . . . , p − 1}. Evaluate the determinant. Probability of one sided error ≤ d
p,
where d is the degree of the polynomial.
Polynomial Identity Testing Problems Schwartz-Zippel Lemma Bipartite Matching References
Bipartite Matching
Let G = (U ∪ V, E) be a bipartite graph, where |U| = |V | = n. M ⊆ E is a perfect matching if
1
|M| = n
2
Edges in M are independent, i.e. vertex disjoint.
Polynomial Identity Testing Problems Schwartz-Zippel Lemma Bipartite Matching References
Adjacency Matrix
Define n × n matrix A where, Aij =
- xij, if uivj ∈ E
0, otherwise x11 x12 x21 x22 x31 x32 x33 x11 x12 x13 x22 x32
Polynomial Identity Testing Problems Schwartz-Zippel Lemma Bipartite Matching References
Edmonds Theorem
Edmonds
A bipartite graph G has a perfect matching if and only if det(A) = 0.
Polynomial Identity Testing Problems Schwartz-Zippel Lemma Bipartite Matching References
Decision Problem
Input: Given a bipartite graph G = (U ∪ V, E), where |U| = |V | Output: TRUE if G has perfect matching, otherwise FALSE Randomized Algorithm:
1
Choose a large enough prime number p.
2
For each edge uivj, set xij to be a random value in {0, . . . , p − 1} uniformly at random.
3
Compute det(A)
4
Return TRUE iff det(A) = 0.
Polynomial Identity Testing Problems Schwartz-Zippel Lemma Bipartite Matching References
Analysis
1
Choose a large enough prime number.
2
For each edge uivj, set xij to be a random value in {0, . . . , p − 1} uniformly at random.
3
Compute det(A)
4
Return TRUE iff det(A) = 0. Case 1: If G has no perfect matching = ⇒ det(A) = 0 Case 2: If G has perfect matching = ⇒ det(A) = 0 (Edmonds) Degree of determinant polynomial is ≤ n = |U| Pr(det(A)=0 given that G has a perfect matching) ≤ n/p (Schwartz-Zippel) Choose p ≈ 1000n, Probability of success ≥ 1 − 1/1000
Polynomial Identity Testing Problems Schwartz-Zippel Lemma Bipartite Matching References
How to find a perfect matching
Isolation Lemma (MVV87)
Assume we have set system S on a ground set of n
- elements. Assign weights to each element uniformly and
at random from {1, 2, . . . , 2n}. The probability that there is a unique minimum weight set in S is ≥ 1
2
Polynomial Identity Testing Problems Schwartz-Zippel Lemma Bipartite Matching References
Finding a Perfect Matching
- Let G = (U ∪ V, E) and |E| = m.
- Assume G has a perfect matching.
- For each edge e ∈ E, assign a weight in {1, . . . , 2m}
uniformly at random.
- Let M= Set system consisting of all perfect matchings
- Isolation Lemma: ∃M ∈ M of unique minimum weight
with probability ≥ 1/2.
New Problem
Find (unique) minimum weight perfect matching M in G
Polynomial Identity Testing Problems Schwartz-Zippel Lemma Bipartite Matching References
Unique MWPM
Let unique MWPM has a total weight W ≤ 2m2. For each edge e = (uivj) ∈ E with weight w(e), set xij = 2w(e) in det(A). Consider the non-zero terms in the expansion of det(A). Observation: Only one term is 2W and all other terms are ≥ 2W+1 = 2 ∗ 2W .
Polynomial Identity Testing Problems Schwartz-Zippel Lemma Bipartite Matching References
Unique MWPM (contd.)
Note: det(A) 2k =
- dd, if k = W
even, if k < W fractional, if k > W Algorithm:
1
Find k: Guess k and check parity of det(A)
2k
2
For each edge e = (uv), it is in unique MWPM if and
- nly if MWPM in G \ {u, v} has weight W − w(e).
Note: Computation of det(A), Guess & Check k, and Testing ∀e ∈ E is part of unique MWPM are parallelizable.
Polynomial Identity Testing Problems Schwartz-Zippel Lemma Bipartite Matching References
Matching in General Graphs
Let G = (V, E) be a general graph. Define Aij = +xij, if vivj ∈ E and i<j −xij, if vivj ∈ E and i>j 0, otherwise
Tutte
G has a perfect matching if and only if det(A) = 0.
Polynomial Identity Testing Problems Schwartz-Zippel Lemma Bipartite Matching References
References
1
Mitzenmacher and Upfal, Probability and Computing, Cambridge.
2
Motwani and Raghavan, Randomized Algorithm, Cambridge.
3
Mulmuley, Vazirani and Vazirani, Matching is as easy as matrix inversion, Combinatorica 7(1):105-113, 1987.
4