Escolar Documentos
Profissional Documentos
Cultura Documentos
2 L n 2L
L
aifn nis even
0
x cos(
L
x)dx
n
2 2
[cos(n ) 1] 0 ;
L 8
1 n
:the expansion is=> f ( x) (1 2
2
n odd n
2
cos(
L
x))
Example for Fourier series(2)
f(x) Successive
approximations
of f(x)
x
Complex version of the Fourier expansion
Using the formulas above and some properties of exponential function, the
Fourier series can also be written as an expansion in terms of complex
: exponentials as
1 1 L
c e
i ( n / L ) x
f ( x) ( in / L ) x
cn f ( x ) e dx
n , 2L L
n
=> n . =Lets
dw w
define
L L
1 1 L
c e
i ( n / L ) x
f ( x) ( in / L ) x
cn f ( x ) e dx
n , 2L L
n
2 ^ 1
f ( x)
2
f ( x)e iwx dx
The inverse Fourier transform
1 1 L
c e
i ( n / L ) x
f ( x) ( in / L ) x
cn f ( x ) e dx
n , 2L L
n
3 1 ^
f ( x)
2
f ( x)eiwx dw
: Lets examine more closely the formula of the discrete Fourier transform
^ N
f n (e 2i / N ) nk f k , n 0,1,..., N 1
k 0
2i
wN
We know that N (its called n-th root of unity), so the
:formula above can be rewritten as
^ N ^ ^
f n wn f k , n 0,1,..., N 1 f n f n ( wn )
k
k 0
Usage of the Fast Fourier Transform - motivation
n 1 n 1
.Let A( x) ak x k , B ( x) bk x k be two polynomials
k 0 k 0
k 0
- takes time ( n 2 )
calculate A(x) and B(x) values in 2n-1 distinct points x0, , x2n-2; ) a. (2
we get two vectors {(x0, y0),,(x2n-2, y2n-2)}, {(x0,z0),,(x2n-2, z 2n-2)};
(b) multiply these vectors: {(x0, y0 z0),,(x2n-2, y2n-2 z 2n-2)}
(c) calculate the polynomial C(x) that passes through the result vector
(interpolation)
- takes time
(n log n) if use FFT
Uniqueness of C(x)
Theorem1: for any set {(x0, y0),,(xn-\, yn-1)} on n distinct points there is a unique
.polynomial C(x) with degree less than n such that yi = C(xi) for i = 0,1,, n-1
n 1
k 0
: multiplication
c0 c1 y0 y1
... ...
* cn-1 = yn-1
We want to execute a step (a): calculate C(x) in n distinct points x0, , xn-1.
.FFT uses special n points wn0, wn1 , wn2 , , wnn-1
wn is called the n-th (complex) root of unity.
.That means that wnn = 1
Properties of n-th root of unity
wn 1
k
n
wn 1
k :
wn 1
k
0
.6
j 0
.We want to execute a step (a): calculate pc(x) in wn0, wn1 , wn2 , , wnn-1
Observation:
Let c (c0 , c1 ,..., cn 1 ) be an n-tuple of the coefficients of pc(x).
Assume that n is power of 2 (if it isnt, we force it to be by adding 0s).
a (c0 , c2 ,..., cn 2 ) Let b (c1 , c3 ,..., cn 1 ) and
p
wherec ( x ) p (
is the x 2
) xp
a polynomial b ( x 2
) is
that pa , =<
defined by the vector a, and p b is the polynomial that is defined by the
. vector b
p (
<= c nw i
) p a ( wn
2i
) w i
n bp ( w 2i
n )
We want to execute a step (c) calculate the polynomial C(x) that passes through
the result vector (interpolation)
n 1
c0 c1 y0 y1
... ...
* cn-1 = yn-1
=> ik kj
V
k 0
V n 1
n
w (i j ) k
k 0
= Vij * Vij-1
n 1
n 1 1 n * n 1
i. if i = j, then wn(i - j)k = wn0 = 1, and so k 0
n 1
n 1 wn(i j ) k n 1 * 0 0
ii. else, then k 0 (by property 6)
Let n = 8 and C = (255, 85, 127, 200, 78, 255, 194, 75).
.Let F257 be a finite field => w8 = 4 (48 mod 257 = 1)