You are on page 1of 22

The Fast Fourier Transform

Divide-and-conquer:
Fast algorithm for Integer and matrix
multiplication
Takes time for polynomial multiplications
Fast Fourier Transform:
Takes less time for polynomial multiplication
Useful in the field of signal processing
1
Polynomial multiplication
Input: Coefficients of two polynomials, A(x) and
B(x), of degree d
Output: Their product C = A . B
Selection: Pick some points
Where n 2d+1
Evaluation: Compute
and

2


Polynomial multiplication
Multiplication: Compute
for
Interpolation:
Recover C(x) as



3
4
Evaluation by divide-and-conquer
To evaluate a polynomial A(x) of degree
n to pick n points if we choose positive-
negative pairs like


then A(xi) and A(-xi) overlap a lot
Evaluation by divide-and-conquer
To evaluate this we need to split A(x) into its odd
and even powers


Where polynomials are of degree n/2-1
5
Evaluation by divide-and-conquer





we would get a divide-and-conquer pro-
cedure with running time

6
Evaluation by divide-and-conquer
Plus-minus trick only works at the top level of the
recursion
To recurse at the next level, we need the
n/2 evaluation points
to be themselves plus-minus pairs But how can a
square be negative?
We use complex numbers ,to find them we use
reverse engineering


7
Evaluation by divide-and-conquer




The complex nth roots of unity, that is, the n
complex solutions to the equation

8
********
Interpolation
Polynomials can be represented in terms of
their coefficients or their values at a
selected set of points.
9
Interpolation
A matrix reformulation:




Here are representations for a polynomial A(x) of degree
n-1. They are both vectors of n numbers, and one is a
linear transformation of the other.
Call the matrix in the middle M. Evaluation is
multiplication by M, while interpolation is multiplication by
M
-1
.
10
Interpolation Resolved
In linear algebra terms, the FFT multiplies an
arbitrary n-dimensional vector, which we have
been calling the coefficient representation by the
nxn matrix.




where is a complex nth root of unity, and n is
a power of 2.
11
Inversion Formula

is also an nth root of unity
Lemma: The columns of matrix M are
orthogonal to each other.
Proof. Take the inner product of any
columns j and k of matrix M
12
Lemma
This is a geometric series with first term 1,
last term , and ratio .Therefore
it evaluates to which
is 0.except when j = k, in which case all
terms are 1 and the sum is n.
13
Fast Fourier Transform
The FFT takes as input a vector
and a complex number and a complex
number whose powers
are the complex nth roots of unity.
It multiplies vector a by the n x n matrix
Mn(),which has (j, k)th entry (starting
row- and column-count at zero) jk.

14
Fast Fourier Transform
The potential for using divide-and-conquer
in this matrix-vector multiplication becomes
apparent when M's columns are segregated
into evens and odds:

15
Fast Fourier Transform
function FFT(a,)
Input: An array for n a power of 2
A primitive nth root of unity,
Output: Mn()a
if = 1: return a
=FFT

=FFT
for j = 0 to n/2-1:


Return
16
Fast Fourier Transform
Next, we have simplified entries in the
bottom half of the matrix using
and
The final product is the vector:

17
The Fast Fourier transform unraveled
The divide-and-conquer step of the FFT
can be drawn as a very simple circuit.
A problem of size n is reduced to two sub
problems of size n/2.

18
The Fast Fourier transform unraveled
When two wires come into a junction from
the left, the numbers they are carrying get
added up.
So the two outputs depicted are executing
the following commands by the FFT
algorithm.



19
The Fast Fourier transform unraveled
Unraveling the FFT circuit completely for
n=8 elements:
For n inputs there are levels, each with n
nodes, for a total of n log n operations.
The inputs are arranged in a peculiar order: 0, 4,
2, 6, 1, 5, 3, 7.
There is a unique path between each input
and each output

20
The Fast Fourier transform unraveled
There are two edges out of each node:
Going up (0-edge)
Going down (1-edge)
FFT circuit is natural for:
Parallel computation
Direct implementation in hardware.
21
The Fast Fourier Transform Circuit
22