Fast Fourier Transform
Please let me off the waitlist for this class.
Polynomial Multiplication
Suppose we have two input polynomials,
such that n=2d−1.
Relationship Between Polynomial and Integer Multiplication
Given ints α,β, and we want γ=αβ. Given the coefficients, we want to compute the coefficients of the product polynomial.
Possible Algorithms:
First, we have the straight-forward algorithm. We have
Total time to compute this is O(N2) since we need to loop over j=0to N−1. Computing each of 4cnrequires ≥4Nflops, meaning we're gonna have Θ(N2)flops.
Second, we have a Karatsuba related approach. Recall that we have
We can split this up into lows and highs as we did for integer multiplication, that is
It's the same as last time — you'd get four recursive polynomial multiplications to do with half the degree, but applying the Karatsuba trick, we'd only have three polynomial multiplications, meaning we'd have, just like Karatsuba, Θ(nlog23).
Finally, we have an even faster approach using polynomial interpolation.
Polynomial intermolation states that a degree <Npolynomial can be uniquely determined by its evaluation on Ndistinct points (refer to CS 70, Lagrange interpolation)
Instead of directly computing the coefficients of C, we can determine C(x0)...C(xn−1). We can therefore compute the evaluation of A(x)and B(x)on Ndistinct points each, then multiply them, and then just interpolate them to find C(x).
Fast Fourier Transform
Clarification: The Discrete Fourier Transform is a matrix, and the Fast Fourier Transform is an algorithm.
In order to increase the efficiency of our algorithm, we can choose our points as ±x0,±x1,±x2, et cetera, because then the computation for the even powers would be the same, saving us a lot of resources.
The main issue, is, this only works at the top level of recursion; that is, the second level is all squares, meaning there can be no negatives. However, we can use complex numbers to get around this. The main question is, which complex numbers do we use? We can start from bottom up. We start off with one, which we can split into 1and −1. −1is split into iand −i, and we already know what 1 splits into. We continue until we reach a set of npoints to use for our interpolation.
We call these roots of one the nth complex roots or unity. In other words, the solutions to zn=1. For even n, the numbers are plus-minus paired, and their squares are the n/2th roots of unity.
Here is a diagram,

Of course, in order to pull this off, we split A(x)into its odd and even powers, such that this trick can be used for both.
We factor out xfrom Ao(x)(the odd powers) so the powers inside become even. We can therefore write our function as
Matrix Representation
For a polynomial with degree n−1, we can represent the set of polynomials A(x0) ... A(xn−1)as a matrix-vector equation. The matrix is called a Vandermonde matrix, which we will call M(x).
Using this same model we can represent the FFT as Mn(ω).
Inversion is possible — Mn(ω)−1=n1Mn(ω−1)
Of course, since we're looking for even powers, we'd have to split the matrix up between the even and odd powers, and rearrange the coefficient vector accordingly.
Last updated