day 24 4/13/98 ``You get me confused. You get me to say something and then I
get nervous.''
1. Fast Fourier Transforms (FFT)
1.1 motivation
Given a function there are several representations.
- polynomial: f(x) = a0+a1x+...an-1xn-1
- point set: (0,f(0)),(1,f(1)),(2,f(2)),...(n-1),f(n-1))
The point set representation (with redundant sets) is used to transmit information
in about a polynomial over a noisy channel. This message is decoded using a
big matrix.
| *
|
|
= |
|
This is O(n3) to solve, or perhaps O(n2.36) if you are clever.
There is a case (the FFT case) which is quickly solvable.
1.2 vector convolution
The convolution of two vectors (a0,...,an-1)Ä(h0,...,hn-1) = (c0,...,c2n-2) is defined by ck = åi = 0kaibk-i
1.3 algorithm
Compute f(x) at f(0),f(1),...,f(2n-2) and g(x) at g(0),...,g(2n-2) . Then, we calculate f(0)g(0),...,f(2n-2)g(2n-2) to get f(x)g(x) = c0+c1x+...c2n-2x2n-2 . This doesn't look
like it works except that by shifting to the complex plane, everything can be
made cheap.
1.4 definitions
w = primitive nth root of unity in the complex plane. In orther words w = ei2pj/n where
j ¹ n .
Conditions:
- w ¹ 1
- wp ¹ 1 with 1 £ p £ n-1
- wn = 1
- åj = 0n-1wjp = 0 for 1 £ p £ n-1
The discrete fourier transform is defined as:
|
| *
|
| =
|
|
We can express the matrix as DFT transform matrix as Fij = wij
(F-1)ij = 1/nw-ij
Proof:
multiply (F-1)ijFjk using the property wn = 1 and åj = 0n-1wjp = 0 for 1 £ p £ n-1 .
Let
Dn/2 = |
| Then
FnV = |
| * |
|
This suggest the divide and conquer algorithm:
compute Fn/2Veven and Dn/2Fn/2Vodd , then construct FnV and return.
1.6.1 timing
T(n) = 2*T(n/2)+3/2n which means T(n) = O(nlogn )
1.7 FFT in parallel
The FFT algorithm is parallelizable. Arrange the nodes of the parallel processor
on a hypercube. Each node has a particular value associated with it. Have the
node look at its first (bitwise ordering) neighbor. These 2 nodes will have
values a and b . Give one node a+b and the other a-b . Repeat for each bit.
2. Shuffle exchange graph
let V = {(a0,...,an)|ai = {0,1}}
then the 'shuffle' takes (a0,...,an)® (a1,...,ana0)
and the 'exchange' takes (a0,...,an) = (ba1,...,an)
File translated from TEX by TTH, version 1.30.
|