Polynomial identity testing asks whether a polynomial represented implicitly, such as by an arithmetic circuit or a remainder computation, is the zero polynomial.
Here zero means that every coefficient vanishes after collecting equal monomials in the polynomial ring. Testing equality of two polynomials amounts to testing for zero. An arithmetic circuit can permit cheap polynomial evaluation even when expanding all monomials is expensive. The random evaluation test for a polynomial identity exploits this: one nonzero value disproves the polynomial identity, while a known total degree limits how often a nonzero polynomial can evade detection.[ref]
For example, for an integer , has distinct monomials, one for each subset of the variables. Its factored expression needs only additions and multiplications for one polynomial evaluation. Evaluating the compact expression avoids creating its expanded list of coefficients. The saving is especially attractive in many variables; it does not make a zero result into a proof of identity.
Work in the finite field , using modular arithmetic modulo five. Consider the two original polynomial examples
The distributive property gives , so all coefficients of cancel: is identically zero. In contrast, in this finite field, with nonzero leading coefficient. Its roots of a polynomial are exactly one and two: a product in a field is zero only if a factor is zero.
The complete polynomial evaluations, displayed as representatives modulo five, are
In particular, is a nonzero witness, which disproves identity without examining other points. At one or two, a zero value fails to reveal that is nonzero. A random variable with a uniform distribution on a finite set hits those two polynomial roots with probability .
Figure 1.
Exact evaluations distinguish a zero polynomial from a nonzero polynomial with two roots
. Every element of the finite field is shown. The upper row always accepts the identity . In the lower row, the two orange zero values falsely accept ; the three blue nonzero values correctly reject it. These are all possible outcomes, not sampled frequencies. Details.
A crucial limit appears with . Its coefficients make it a nonzero polynomial of polynomial degree five in , yet direct polynomial evaluation gives zero at all five field elements: the values before reduction are , all divisible by five. Thus induces the same polynomial function as the zero polynomial. Any number of trials restricted to will falsely accept this identity. This is compatible with the Schwartz-Zippel lemma: the ratio of polynomial degree to sampling-set size is , which gives no useful guarantee.
When a polynomial's representation permits polynomial evaluation over a larger field extension, a larger sampling set can restore the useful degree ratio. Access only to the induced polynomial function on the original finite field cannot distinguish from zero.[ref]
Let be a nonzero multivariate polynomial over a field , with total degree at most . Choose a nonempty finite set . For independent random variables , each with a uniform distribution on a finite set on , the Schwartz-Zippel lemma gives
Nonzeroness is essential; the zero polynomial always evaluates to zero. The total degree sums exponents within each monomial, rather than taking their maximum: has total degree five. The field need not be finite, but must be finite. The estimate reduces error only when .[ref]
The proof begins with the root bound for a polynomial. For several variables, write , with . The total degree of is at most . By induction, vanishes with probability at most . Otherwise the remaining univariate polynomial has at most polynomial roots. Adding the two contributions gives .[ref]
The algorithm samples a point, performs exact polynomial evaluation, rejects the identity if the value is nonzero, and otherwise accepts. The lemma bounds false acceptance for every fixed nonzero input. For the polynomial identity testing over a finite field example, has and , so its exact error attains the bound. Numerical near-zero values from floating-point arithmetic do not satisfy this exact algebraic contract. A polynomial-time algorithm claim additionally needs efficient sampling and evaluation, including the bit cost of representing and operating on field elements. Counting field operations alone does not establish that cost.
Repeat the random evaluation test for a polynomial identity with fresh independent random variables, keeping the same fixed polynomial. Reject as soon as any polynomial evaluation is nonzero; accept only if all values vanish. An identity is always accepted, preserving one-sided error. If a nonzero polynomial has single-trial false acceptance probability , independence gives . The Schwartz-Zippel lemma bounds this by when .
For over the finite field , two uniform independent choices have equally likely ordered outcomes, each with probability . Both polynomial evaluations are zero only at . Hence false acceptance falls from in one trial to in two trials, and correct rejection rises from to .
Figure 1.
Four of the twenty-five independent pairs falsely accept the nonidentity
. The orange cells have both coordinates among the polynomial roots one and two of in the finite field . Every blue cell supplies at least one nonzero witness. The full grid enumerates exact outcomes under independence and a uniform distribution on a finite set; it is not a simulation. Details.
If the second choice reuses the first, the pair is and only five diagonal outcomes are possible. Two still falsely accept, so the error remains . Choosing fresh independent points is precisely what makes the full -cell grid and the product of probabilities valid. For a target error , this example needs
The ceiling function makes the trial count an integer. Four trials give , while six give ; five still give , so six is the first count below one percent. This is an exact error guarantee for each run on , rather than an observed success rate.

Articles by others on the same topic (1)

Polynomial Identity Testing (PIT) is a problem in computer science and computational algebra that involves determining whether a given polynomial is identically zero. In other words, given a polynomial \( P(x_1, x_2, \ldots, x_n) \) expressed in some algebraic form, the task is to decide if \( P(x_1, x_2, \ldots, x_n) = 0 \) for all possible values of its variables.