Try   HackMD

EPF Week 6 Update 7

Vector Commitments for Multipoint: Intro

Basic Refresher

Monomial Basis

A polynomial can be represented in different bases, one of which is the monomial basis. In the monomial basis, a polynomial

P(t) of degree
t
is expressed as:

P(t)=a0+a1t+a2t2+...+antn

To evaluate the

P(t) at a specific point
t=t0
, we simply substitute t_0 into the polynomial and perform the assigned mathematical operations.

P(t0)=a0+a1t0+a2t02+...+ant0n

For example, if we have the polynomial

P(t)=3+2tt2+4t3 and we want to evaluate it at
t=2
, then:

P(t)=3+2(2)(2)2+4(2)3=3+44+4×8=35

So,

P(2)=35.

Polynomial Interpolation

Polynomial interpolation is the task of finding a polynomial that fits a set of points

(xi,yi) for
i=0,1,2,3,...,n
. The central idea is to find a Polynomial
P(x)
of degree at most
n
that passes through these
(n+1)
points.

Lagrange Interpolation

Given

n+1 distinct points
x0,x1,x2,...,xn
and their corresponding
y
-values
y0,y1,y2,...,yn
, the Lagrange interpolation is defined as:

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

where

Li(x) is the
i
-th Lagrange basis polynomial, which is defined by:

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

The Lagrange interpolation polynomial is unique and hence, passes through all the given points.

Barycentric Lagrange Interpolation

The barycentric form of the Lagrange Interpolation is a numerically stable and computationally efficient representation of the Lagrange polynomial. The barycentric form of the Lagrange polynomial is:

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

where

wi=1/Li(xi) and
Li(xi)
is the derivative of the
i
-th Lagrange Basis polynomial evaluated at
x
.

As an example, let us consider a simple example where we want to interpolate a function

f(x)=x2 at three points
x=1,0,1
using Barycentric interpolation.

First, we would need to choose our data points. For

f(x)=x2, these would be:

Step 1: Computing the Barycentric weights

The barycentric weights

wi are computed using the Lagrange basis polynomials
Li(x)
. However, for the case of equally spaced
x
-values (or in simple cases), they can often be computed more efficiently.

For example, using

n=2 (three points, so
n+1=3
).

  1. w0=10(1)=1
  2. w1=100
    that will be undefined
  3. w2=101=1

Note that for

w1, it's undefined because the term
xixj
would be zero, from the Lagrangian basis formula. However, in the case of distinct
x
-values, this situation should not arise. Since all the
x
-values are distinct here, there should not be a 0 denominator.

On plugging these values on the Barycentric Lagrange Interpolation formula we get the following:

  • P(x)=1(x(1)).1+0+(1)(x1).11(x(1))+0+(1)(x1)

  • Simplifying,

    P(x)=1(x+1)1(x1)1(x+1)1(x1)

  • After more simplification, we get this

    P(x)=x2

If we evaluate

P(x) at say,
x=0.5
, we should get
(0.5)2=0.25
, which matches
f(x)=x2

This is a simple example, but it demonstrates the basic steps of Barycentric Lagrange Interpolation. The real power of barycentric form becomes evident in more complex, higher degree functions with interpolations.

The concept of representing vectors in a monomial basis can be explored from both algebraic and computational perspectives. Here are the 2 major forms in which both are usually represented

Coefficient Forms in a Monomial Basis

In algebra, the coefficient form of a polynomial is its representation as a linear combination of monomials. A monomial basis is a set of monomials

1,x,x2,x3,...,xn, which serves as the "building blocks" for polynomials of degree
n
or less.

In this form, a polynomial

P(x) of degree
n
is represented as

P(x)=a0.1+a1.x+a2.x2+a3.x3+....+an.xn

Here, the coefficients

a0,a1,a2,...,an are the coordinates of
P(x)
in the vector space spanned by the monomial basis. This representation allows us to work with the polynomial using the coefficients, which are stored as a vector
a=[a0,a1,...,an]
.

Evaluation Forms in a Monomial Basis

In the evaluation form, we view a polynomial through the lens of it's values at

n+1 distinct points
x0,x1,...,xn
. Each of these values can be computed using the polynomial's expression in the monomial basis.

P(xi)=a0.1+a1.xi+a2.xi2+...+an.xin

By evaluating

P(x) at these
n+1
distinct points, we obtain a vector

b=[P(x0),P(x1),...,P(xn)].

Conversion between Coefficient and Evaluation forms

Coefficient to Evaluation

The process of converting from the coefficient form to the evaluation form involves substituting each

xi into
P(x)
and computing the result. This can be computationally intensive, with a naive implementation in
O(n2)
time. However, specialized algorithms like the Fast Fourier Transform (FFT) can do this more effieciently, in
O(n
log
n)
time, when the evaluation points are roots of unity.

Evaluation to Coefficient

Conversely, going from evaluation form to coefficient form requires solving a interpolation problem. Given

n+1 points, that are,
(x0,P(x0)),(x1,P(x1)),....,(xn,P(xn))
, we wish to find the unique polynomial of degree
n
or less that passes through these points. One classic approach is Lagrange interpolation as I stated before.

Apart from this, specialized algorithms like Inverse Fast Fourier Transform (IFFT) can perform this conversion efficiently when the evaluation points are roots of unity.