0% found this document useful (0 votes)
22 views9 pages

Polynomials and FFT

First Fourier transform, dft

Uploaded by

Shrishu Ranjan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views9 pages

Polynomials and FFT

First Fourier transform, dft

Uploaded by

Shrishu Ranjan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

POLYNOMIALS AND FFT

• Adding two polynomials of degree n: straight forward method in θ (n) time


• Multiplying two polynomials of degree n : straight forward method in
θ (n2) time
• Using FFT, two polynomials of degree n can be multiplied in θ(n log2 n).
How?

Degree Bound: An integer strictly greater than the degree of a polynomial is


called the degree bound of that polynomial.

Let us consider two polynomials of degree bound n.


n 1 n 1
A( x)   a j x j B( x)   b j x j
j 0 j 0 Then,

2n2
is a polynomial of degree bound 2n-1 where
C ( x)  A( x) B( x) 
j
e
j 0
j xj
Cj   ak b j k which is known as convolution
k 0

Coefficient Representation of Polynomials:

n 1
A coefficient representation of a polynomial A( x)   a j x j
j 0

of degree-bound n is a vector of coefficients a =(a0, a1,..., an-1)


• Advantage of this representation:
• (i) Evaluating at x0 by Horner’s rule in θ (n) time

• (ii) Adding two polynomials 𝐴(𝑥) and B(𝑥) also in θ (n) time

However, multiplication of two polynomials requires Θ(n2) time.


A point-value representation of a polynomial A(x):
• A point-value representation of a polynomial A(x) of degree-bound n is a
set of n point-value pairs{(x0, y0), (x1, y1),..., (xn-1, yn-1)} such that all of the
xk are distinct and Yk =A(xk)for k = 0,1, 2, …, n-1

Note: A polynomial has many different point value representations

Evaluating Yk =A(xk) for k = 0, 1, 2,…, n-1 using Horner’s rule requiresΘ(n2) time.
• But clever selection or 𝑥𝑘 reduces this time Θ (n log n)
The inverse of evaluation, i.e., determining the coefficient form of a polynomial
from a point value representation is called interpolation.

Advantages of point-value representation


(i) If C(x) = A(x) + B(x) then C(xk) =A( xk) + B(xk) for any point xk
More precisely if A(x) and B(x) be represented as (x0, y0), (x1, y1),..., (xn-1, yn-1)}
and{(x0, y′0), (x1, y′1),..., (xn-1, y′n-1)} then C(x) will be represented by
{(𝑥0 , 𝑦0 + 𝑦′0 ), (𝑥1 , 𝑦1 + 𝑦′1 ). . . (𝑥𝑛−1 , 𝑦𝑛−1 + 𝑦′𝑛−1 )}

Thus addition requires in Θ (n) time


(ii) Similarly, C(x) = A(x).B(x) can be computed in Θ(n) time
as C(x) can be represented by {(𝑥0 , 𝑦0 𝑦′), (𝑥1 , 𝑦1 𝑦′1 ). . . (𝑥𝑛−1 , 𝑦𝑛−1 𝑦′𝑛−1 )}

An Example: 𝐴(𝑥) = 3𝑥 2 + 4𝑥 + 1
𝐵(𝑥) = 𝑥 2 + 2𝑥 + 5
(𝑥𝑖 , 𝐴(𝑥𝑖 )) = (0, 1), (1, 8), (2, 21)
(𝑥𝑖 , 𝐵(𝑥𝑖 )) = (0, 5), (1, 8), (2, 13)
Verify: Task ∴ (𝑥𝑖 , 𝐶(𝑥𝑖 )) = (0, 5), (1, 64)(2, 273)
The Ultimate Plan:

The DFT and FFT:


We claimed that by computing the DFT and its inverse by using the FFT, it is
possible to evaluate and interpolate a degree n polynomial at the complex roots
of unity in O(n log n) time.
Complex roots of unity:

Here
Figure 30.2 shows that the n complex roots of unity are equally spaced around
the circle of unit radius cantered at the origin of the complex plane.
Proof:
The DFT:

We can write the DFT as the matrix product y= Vn a, where Vn is a Vandermonde


matrix containing the appropriate powers of wn:
The FFT:
The fast Fourier transform (FFT) takes advantage of the special properties of
the complex roots of unity to compute DFTn (a) in θ(n log n) time, as opposed to
the θ (n 2) time of the straightforward method.

Assume throughout that n is an exact power of 2.

For k=0, 1, …, n-1, DFTn(a):

Then

 By the halving lemma, the list of values (30.10) consists not of n distinct
values but only of the n/2 complex (n/2)th roots of unity, with each root
occurring exactly twice.

 Therefore, the FFT recursively evaluates the polynomials Aeven and Aodd of
degree-bound n/2 at the n/2 complex (n/2)th roots of unity.

 These subproblems have exactly the same form as the original problem,
but are half the size, dividing an n-element DFTn computation into two n/2-
element DFTn/2 computations.
Recursive Algorithm:
Time Complexity:

You might also like