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 the0-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, Richard Zippel, and Richard DeMillo and Richard J. Lipton, although DeMillo and Lipton's version was shown a year prior to Schwartz and Zippel's result. The finite field version of this bound was proved by Øystein Ore in 1922.[1]
Theorem 1 (Schwartz, Zippel). Let
P\inR[x1,x2,\ldots,xn]
be a non-zero polynomial of total degree over an integral domain R. Let S be a finite subset of R and let be selected at random independently and uniformly from S. Then
\Pr[P(r1,r2,\ldots,r
|
.
Equivalently, the Lemma states that for any finite subset S of R, if Z(P) is the zero set of P, then
|Z(P)\capSn|\leqd ⋅ |S|n-1.
Proof. The proof is by mathematical induction on n. For, as was mentioned before, P can have at most d roots. This gives us the base case.Now, assume that the theorem holds for all polynomials in variables. We can then consider P to be a polynomial in x1 by writing it as
P(x1,...,xn)=\sum
d | |
i=0 |
i | |
x | |
1 |
Pi(x2,...,xn).
Since is not identically 0, there is some such that
Pi
\degPi\leqd-i
iP | |
x | |
i |
Now we randomly pick
r2,...,rn
\Pr[Pi(r2,\ldots,r
|
.
If
Pi(r2,\ldots,rn) ≠ 0
P(x1,r2,\ldots,rn)
\Pr[P(r1,r2,\ldots,rn)=0|Pi(r2,\ldots,rn) ≠ 0]\leq
i | |
|S| |
.
If we denote the event
P(r1,r2,\ldots,rn)=0
Pi(r2,\ldots,rn)=0
Bc
\begin{align} \Pr[A]&=\Pr[A\capB]+\Pr[A\capBc] \\ &=\Pr[B]\Pr[A|B]+\Pr[Bc]\Pr[A|Bc] \\ &\leq\Pr[B]+\Pr[A|Bc] \\ &\leq
d-i | + | |
|S| |
i | = | |
|S| |
d | |
|S| |
\end{align}
The importance of the Schwartz–Zippel Theorem and Testing Polynomial Identities followsfrom algorithms which are obtained to problems that can be reduced to the problemof polynomial identity testing.
For example, is
(x1+3x2-x3)(3x1+x4-1) … (x7-x2)\equiv0 ?
To solve this, we can multiply it out and check that all the coefficients are 0. However, this takes exponential time. In general, a polynomial can be algebraically represented by an arithmetic formula or circuit.
Given a pair of polynomials
p1(x)
p2(x)
p1(x)\equivp2(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)]\equiv0.
Hence if we can determine that
p(x)\equiv0,
p(x)=p1(x) - p2(x),
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 -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 hasapplications in 2D-compression, where the problem of finding the equality of two2D-texts A and B is reduced to the problemof comparing equality of two polynomials
pA(x,y)
pB(x,y)
Given
n\inN
n
A simple randomized algorithm developed by Manindra Agrawal and Somenath Biswas can determine probabilisticallywhether
n
They propose that all prime numbers n (and only prime numbers) satisfy the followingpolynomial identity:
(1+z)n=1+zn(mod n).
This is a consequence of the Frobenius endomorphism.
Let
l{P}n(z)=(1+z)n-1-zn.
Then
l{P}n(z)=0 (mod n)
n
n
l{P}n
Prime numbers are used in a number of applications such as hash table sizing, pseudorandom numbergenerators and in key generation for cryptography. Therefore, finding very large prime numbers(on the order of (at least)
10350 ≈ 21024
Let
G=(V,E)
Theorem 2 : A Tutte matrix determinant is not a -polynomial if and only if there exists a perfect matching.
A subset of is called a matching if each vertex in is incident with at most one edge in . A matching is perfect if each vertex in has exactly one edge that is incident to it in . Create a Tutte matrix in the following way:
A=\begin{bmatrix}a11&a12& … &a1n\ a21&a22& … &a2n\ \vdots&\vdots&\ddots&\vdots\ an1&an2&\ldots&ann\end{bmatrix}
where
aij=\begin{cases}xij if (i,j)\inEandi<j\\ -xji if (i,j)\inEandi>j\\ 0 otherwise.\end{cases}
The Tutte matrix determinant (in the variables xij,) 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 contains a perfect matching. There exists a deterministic black-box algorithm for graphs with polynomially bounded permanents (Grigoriev & Karpinski 1987).
In the special case of a balanced bipartite graph on
A=\begin{pmatrix}0&X\ -Xt&0\end{pmatrix}
Let
p(x1,x2,\ldots,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.