Schwartz–Zippel lemma

From Wikipedia, the free encyclopedia
(Redirected from Schwartz-Zippel theorem)
Jump to navigation Jump to search

Template:Short description In mathematics, the Schwartz–Zippel lemma (also called the DeMillo–Lipton–Schwartz–Zippel lemma) is a tool commonly used in probabilistic polynomial identity testing. Identity testing is the problem of determining whether a given multivariate polynomial is the 0-polynomial, the polynomial that ignores all its variables and always returns zero. The lemma states that evaluating a nonzero polynomial on inputs chosen randomly from a large-enough set is likely to find an input that produces a nonzero output.

it was discovered independently by Jack Schwartz,Script error: No such module "Footnotes".Script error: No such module "Check for unknown parameters". Richard Zippel,Script error: No such module "Footnotes".Script error: No such module "Check for unknown parameters". and Richard DeMillo and Richard J. Lipton, although DeMillo and Lipton's version was shown a year prior to Schwartz and Zippel's result.Script error: No such module "Footnotes".Script error: No such module "Check for unknown parameters". The finite field version of this bound was proved by Øystein Ore in 1922.[1]

Statement and proof of the lemma

Theorem 1 (Schwartz, Zippel). Let

P∈R[x1,x2,…,xn]

be a non-zero polynomial of total degree d ≥ 0Script error: No such module "Check for unknown parameters". over an integral domain R. Let S be a finite subset of R and let r1, r2, ..., rnScript error: No such module "Check for unknown parameters". be selected at random independently and uniformly from S. Then

Pr⁡[P(r1,r2,…,rn)=0]≤d|S|.

Equivalently, the Lemma states that for any finite subset S of R, if Z(P) is the zero set of P, then

|Z(P)∩Sn|≤d⋅|S|n−1.

Proof. The proof is by mathematical induction on n. For n = 1Script error: No such module "Check for unknown parameters"., P can have at most d roots by the fundamental theorem of algebra. This gives us the base case. Now, assume that the theorem holds for all polynomials in n − 1Script error: No such module "Check for unknown parameters". variables. We can then consider P to be a polynomial in x1 by writing it as

P(x1,…,xn)=∑i=0dx1iPi(x2,…,xn).

Since Template:Mvar is not identically 0, there is some Template:Mvar such that Pi is not identically 0. Take the largest such Template:Mvar. Then deg⁡Pi≤d−i, since the degree of x1iPi is at most d.

Now we randomly pick r2,…,rn from Template:Mvar. By the induction hypothesis, Pr⁡[Pi(r2,…,rn)=0]≤d−i|S|.

If Pi(r2,…,rn)≠0, then P(x1,r2,…,rn) is of degree Template:Mvar (and thus not identically zero) so

Pr⁡[P(r1,r2,…,rn)=0|Pi(r2,…,rn)≠0]≤i|S|.

If we denote the event P(r1,r2,…,rn)=0 by Template:Mvar, the event Pi(r2,…,rn)=0 by Template:Mvar, and the complement of Template:Mvar by Bc, we have

Pr⁡[A]=Pr⁡[A∩B]+Pr⁡[A∩Bc]=Pr⁡[B]Pr⁡[A|B]+Pr⁡[Bc]Pr⁡[A|Bc]≤Pr⁡[B]+Pr⁡[A|Bc]≤d−i|S|+i|S|=d|S|

Applications

The importance of the Schwartz–Zippel Theorem and Testing Polynomial Identities follows from algorithms which are obtained to problems that can be reduced to the problem of polynomial identity testing.

Zero testing

One of the most common applications of the Schwartz-Zippel lemma in theoretical computer science is to testing whether a polynomial (given in terms of an arithmetic circuit or formula) is identically 0. For example, consider asking whether the arithmetic formula below is identically 0

(x1+3x2−x3)(3x1+x4−1)⋯(x7−x100)≡0 ?

To solve deterministically, we can multiply all the terms and check whether the coefficient of every possible product of variables is  0. However, this can take exponential time in the number of variables $n$ since there may be at most $2^n$ product terms. Instead, we can evaluate the polynomial at a random tuple of points over a sufficiently large field (which can be done in linearly-many arithmetic operations in the length of the formula) and if the result is indeed 0, we can use the SZ lemma to conclude the formula is identically 0 with high probability.

Comparison of two polynomials

Given a pair of polynomials p1(x) and p2(x), is

p1(x)≡p2(x)?

This problem can be solved by reducing it to the problem of polynomial identity testing. It is equivalent to checking if

[p1(x)−p2(x)]≡0.

Hence if we can determine that

p(x)≡0,

where

p(x)=p1(x)−p2(x),

then we can determine whether the two polynomials are equivalent.

Comparison of polynomials has applications for branching programs (also called binary decision diagrams). A read-once branching program can be represented by a multilinear polynomial which computes (over any field) on {0,1}-inputs the same Boolean function as the branching program, and two branching programs compute the same function if and only if the corresponding polynomials are equal. Thus, identity of Boolean functions computed by read-once branching programs can be reduced to polynomial identity testing.

Comparison of two polynomials (and therefore testing polynomial identities) also has applications in 2D-compression, where the problem of finding the equality of two 2D-texts A and B is reduced to the problem of comparing equality of two polynomials pA(x,y) and pB(x,y).

Primality testing

Given n∈ℕ, is n a prime number?

A simple randomized algorithm developed by Manindra Agrawal and Somenath Biswas can determine probabilistically whether n is prime and uses polynomial identity testing to do so.

They propose that all prime numbers n (and only prime numbers) satisfy the following polynomial identity:

(1+z)n=1+zn(modn).

This is a consequence of the Frobenius endomorphism.

Let

𝒫n(z)=(1+z)n−1−zn.

Then 𝒫n(z)=0(modn) iff n is prime. The proof can be found in [4]. However, since this polynomial has degree n, where n may or may not be a prime, the Schwartz–Zippel method would not work. Agrawal and Biswas use a more sophisticated technique, which divides 𝒫n by a random monic polynomial of small degree.

Prime numbers are used in a number of applications such as hash table sizing, pseudorandom number generators and in key generation for cryptography. Therefore, finding very large prime numbers (on the order of (at least) 10350≈21024) becomes very important and efficient primality testing algorithms are required.

Perfect matching

Let G=(V,E) be a graph of nScript error: No such module "Check for unknown parameters". vertices where nScript error: No such module "Check for unknown parameters". is even. Does GScript error: No such module "Check for unknown parameters". contain a perfect matching?

Theorem 2 Script error: No such module "Footnotes".: A Tutte matrix determinant is not a 0Script error: No such module "Check for unknown parameters".-polynomial if and only if there exists a perfect matching.

A subset DScript error: No such module "Check for unknown parameters". of EScript error: No such module "Check for unknown parameters". is called a matching if each vertex in VScript error: No such module "Check for unknown parameters". is incident with at most one edge in DScript error: No such module "Check for unknown parameters".. A matching is perfect if each vertex in VScript error: No such module "Check for unknown parameters". has exactly one edge that is incident to it in DScript error: No such module "Check for unknown parameters".. Create a Tutte matrix AScript error: No such module "Check for unknown parameters". in the following way:

A=[a11a12⋯a1na21a22⋯a2n⋮⋮⋱⋮an1an2…ann]

where

aij={xijif(i,j)∈E and i<j−xjiif(i,j)∈E and i>j0otherwise.

The Tutte matrix determinant (in the variables xij, Template:Tmath ) is then defined as the determinant of this skew-symmetric matrix which coincides with the square of the pfaffian of the matrix A and is non-zero (as polynomial) if and only if a perfect matching exists. One can then use polynomial identity testing to find whether GScript error: No such module "Check for unknown parameters". contains a perfect matching. There exists a deterministic black-box algorithm for graphs with polynomially bounded permanents (Grigoriev & Karpinski 1987).Script error: No such module "Footnotes".Script error: No such module "Check for unknown parameters".

In the special case of a balanced bipartite graph on n=m+m vertices this matrix takes the form of a block matrix

A=(0X−Xt0)

if the first m rows (resp. columns) are indexed with the first subset of the bipartition and the last m rows with the complementary subset. In this case the pfaffian coincides with the usual determinant of the m × m matrix X (up to sign). Here X is the Edmonds matrix.

Determinant of a matrix with polynomial entries

Let

p(x1,x2,…,xn)

be the determinant of the polynomial matrix.

Currently, there is no known sub-exponential time algorithm that can solve this problem deterministically. However, there are randomized polynomial algorithms whose analysis requires a bound on the probability that a non-zero polynomial will have roots at randomly selected test points.

Notes

<templatestyles src="Reflist/styles.css" />

  1. ↑ Ö. Ore, Über höhere Kongruenzen. Norsk Mat. Forenings Skrifter Ser. I (1922), no. 7, 15 pages.

Script error: No such module "Check for unknown parameters".

References

<templatestyles src="Refbegin/styles.css" />

  • Script error: No such module "Citation/CS1".
  • Script error: No such module "Citation/CS1".
  • Script error: No such module "citation/CS1".
  • Moshkovitz, Dana (2010). An Alternative Proof of The Schwartz-Zippel Lemma. ECCC TR10-096
  • Script error: No such module "Citation/CS1".
  • Script error: No such module "citation/CS1".
  • Script error: No such module "Citation/CS1".
  • Script error: No such module "Citation/CS1".
  • Script error: No such module "citation/CS1".
  • Script error: No such module "citation/CS1".
  • Script error: No such module "citation/CS1".

External links