Loading
Settings
1
1
1

Low degree check using barycentric formula

Barycentric formula

A(X)=n1i=0(Xxi)

A(X)=n1j=0ij(Xxi)

f(z)=A(z)n1i=0fiA(xi)1zxi

Check that a polynomial is of low degree

Let ω be an n-th root of unity satisfying A(X)=Xn1=0.

Let f(X) be a polynomial defined by its evaluations fi=f(ωi) (n values). We want to check that f(X) is of degree at most n/21.

Let g(X) be the polynomial function resulting from interpolating f0,f2,f4, and h(X) the same by interpolating f1,f3,f5,. If g(X)==h(X), then the degree of f(X) must be less than n/21.

We sample a random point r and use the barycentric formular to evaluat g(X) and h(X) at r. If g(r)=h(r) then with large probability g(X)=h(X) (Schwartz-Zippel Lemma). In order to compute this we use the barycentric formula for g(r) and h(r):

B(X)=Xn21

B(X)=n2Xn21

g(r)=B(r)n1i=0i evenfiB(ωi)1rωi=2nn1i=0i evenfiωi(n21)rn21rωi

C(X)=Xn2+1

C(X)=n2Xn21=B(X)

h(r)=C(r)n1i=0i oddfiC(ωi)1rωi=2nn1i=0i oddfiωi(n21)rn2+1rωi

So to check that f(X) is of low degree verify that

g(r)h(r)=2nn1i=0fiωi(n21)(1)irn21rωi=0

Proof of correctness

By contradiction. Assume that there does not exist a polynomial of degree n1 or less that interpolates all fi.

g(X) and h(X) are both of degree at most n1; if g(X)=h(X) then they would both interpolate all the points, which thus cannot be true. Thus g(X)h(X).

This means that p(X)=g(X)h(X) is a polynomial of degree at most n1 and not identical to 0; accordingly it has at most n1 zeros in Fp. The probability that p(r)=0 for a random r is thus n1p and thus negligible.

Generalisation to any degree

More generally, how can we check that n points are on a polynomial of degree d, where d is not necessarily \(\frac{n}{2} - 1\)?

We can still do this by applying the barycentric formular to (1) and d+1 points and (2) all n points.

B(X)=di=0(Xωi)

B(X)=dj=0ij(Xωi)

g(r)=B(r)di=0fiB(ωi)1rωi

C(X)=Xn1

C(X)=nXn1

h(r)=C(r)n1i=0fiC(ωi)1rωi=1nn1i=0fiωi(n1)rn1rωi

g(r)h(r)=di=0firωi(B(r)B(ωi)rn1nωi(n1))n1i=dfirωirn1nωi(n1)

The main downside of this formular is that computing the B(ωi) takes quadratic time and this is not a linear algorithm anymore. However when d and n are known beforehand this can be precomputed.