(Interpolation theorem) For every set S={(x0,y0),…,(xn−1,yn−1)}⊆F2 of n distinct points such that ∀i=j,xi=xj:
There is a unique polynomial f∈F[x] of degree n−1 (at most) such that f(xk)=yk for all k∈{0,…,n−1}
f is said to interpolate the set S, and it is called the Lagrange interpolation polynomial of the set S
f(x)=k=0∑n−1ykj=k∏xk−xjx−xj
(The points (xk,yk) are called the interpolation points or data points, and xk are the interpolation nodes)
The Lagrange interpolation polynomial can be computed in O(n2) time
Naive Algorithm for Polynomial Mul. u/ Lagrange Interpolation O(n2)
Algorithm:
Input: Two polynomials f and g of degree at most n−1
Let ℓ be the smallest power of 2 such that ℓ≥2n−1
Choose ℓ distinct points x0,…,xℓ−1 in F
∀k∈{0,…,ℓ−1},yk=f(xk)g(xk)
Find the Lagrange interpolation polynomial h of the set {(x0,y0),…,(xℓ−1,yℓ−1)}
In this approach, the multiplication operation (yk=f(xk)g(xk)) is easily performed in linear time, but the interpolation step is done in O(n2) time, which of course is not efficient compared to the previous approaches. However, we will see that by selecting the points x0,…,xℓ−1 carefully, we can achieve a more efficient divide-and-conquer algorithm that is efficient for both evaluation and interpolation steps. The smart choice of points will be in the complex plane, so the algorithm will be for polynomials in C[x]
Polynomial Multiplication u/ FFT
Input:
Two polynomials f,g∈C[x] with degree less than n=2k for some integer k