CS 662 Theory of Parallel Algorithms
Numerical Method part 4 FFT
[To Lecture Notes Index]
San Diego State University -- This page last updated May 7, 1996
![----------](http://www.sdsu.edu/graphics/divider_red.gif)
Who is Fourier?How did he get so Fast?Who cares?
Bases for 3-dimension points: (x, y, z)
Bases for functions:
- Polynomials
-
-
-
- Fourier bases
-
k = 0, 1, ...
-
-
k = 0, 1, ...
-
- Then the Fourier transform of f(x) is:
-
Example
- f(x) = | x | for
-
- The Fourier transform of f(x) is:
-
-
Complex numbers, X-Y plane and all that
Let
represent the unit vector in the y-axis
Represent points in the plane as x +
y
So (1/2, 1) is 1/2 +
![](numerical410.GIF)
Thus (a +
b)(c
+
d)
= ac+
bd
+
(b+d)
but
,
so
(a +
b)(c
+
d)
= ac-bd +
(bc+ad)
Roots of Unity
Define
as:
-
![](numerical421.GIF)
where
![](numerical422.GIF)
then
-
The n'th roots of unity are:
-
![](numerical424.GIF)
Example
Let n = 4 then
![](numerical425.GIF)
Example
Let n = 8 then
![](numerical427.GIF)
Discrete vs. Continuous (DFT vs FT)
Let
![](numerical429.GIF)
Define
for j,k = 0, 1, ..., n-1
If n = 4 then
![](numerical431.GIF)
Let x be an n-dimensional vector, the discrete Fourier transform (DFT) of x is
the vector:
-
![](numerical432.GIF)
Then
-
![](numerical433.GIF)
Note
defines
We have
Now the Fast Part
Assume n is a power of 2 and compute
![](numerical437.GIF)
Since
we have
-
![](numerical439.GIF)
But this is the 2p'th component of the DFT of the vector:
-
![](numerical440.GIF)
Similarly we get:
-
![](numerical441.GIF)
But this is the 2p+1'th component of the DFT of the vector:
-
![](numerical442.GIF)
This means to compute the DFT of an n vector we can compute the DFT of two n/2
vectors.
Computing DFT
Theorem
- The above processes will compute the DFT of an n-dimensional vector in
O(log(n)) time using total of O(nlog(n)) operations
- The inverse DFT of an n-dimensional vector can be computed in O(log(n))
time using total of O(nlog(n)) operations
Example Use of FFT
Polynomial Multiplication
Let
and
![](numerical446.GIF)
Let
where
![](numerical448.GIF)
So can compute
in parallel using log(n+m) time and performing O(mn) operations using scan and
n*n processors
Using FFT
Let
and
![](numerical451.GIF)
Compute
and
where
-
-
-
-
![](numerical457.GIF)
Compute
![](numerical458.GIF)
Compute
where
-
-
![](numerical461.GIF)
Then
for k = 0, 1, ..., n+m-1
So
can be computed in O( log(n+m) ) time and O( (n+m)log(n+m) ) operations using
O(n) processors