21.06.2014 Views

Numerical Methods Contents - SAM

Numerical Methods Contents - SAM

Numerical Methods Contents - SAM

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Step II: for k =: rq + s, 0 ≤ r < p, 0 ≤ s < q<br />

∑p−1<br />

c rq+s = e −2πi pq (rq+s)m p−1 ∑ (<br />

z m,s = ω<br />

ms )<br />

n z m,s ω<br />

mr<br />

p<br />

m=0<br />

m=0<br />

and hence q DFTs of length p give all c k .<br />

p<br />

Step I<br />

q<br />

p<br />

Step II<br />

q<br />

Example for p = 13:<br />

g = 2 , permutation: (2 4 8 3 6 12 11 9 5 10 7 1) .<br />

F 13<br />

−→<br />

ω 0 ω 0 ω 0 ω 0 ω 0 ω 0 ω 0 ω 0 ω 0 ω 0 ω 0 ω 0 ω 0<br />

ω 0 ω 2 ω 4 ω 8 ω 3 ω 6 ω 12 ω 11 ω 9 ω 5 ω 10 ω 7 ω 1<br />

ω 0 ω 1 ω 2 ω 4 ω 8 ω 3 ω 6 ω 12 ω 11 ω 9 ω 5 ω 10 ω 7<br />

ω 0 ω 7 ω 1 ω 2 ω 4 ω 8 ω 3 ω 6 ω 12 ω 11 ω 9 ω 5 ω 10<br />

ω 0 ω 10 ω 7 ω 1 ω 2 ω 4 ω 8 ω 3 ω 6 ω 12 ω 11 ω 9 ω 5<br />

ω 0 ω 5 ω 10 ω 7 ω 1 ω 2 ω 4 ω 8 ω 3 ω 6 ω 12 ω 11 ω 9<br />

ω 0 ω 9 ω 5 ω 10 ω 7 ω 1 ω 2 ω 4 ω 8 ω 3 ω 6 ω 12 ω 11<br />

ω 0 ω 11 ω 9 ω 5 ω 10 ω 7 ω 1 ω 2 ω 4 ω 8 ω 3 ω 6 ω 12<br />

ω 0 ω 12 ω 11 ω 9 ω 5 ω 10 ω 7 ω 1 ω 2 ω 4 ω 8 ω 3 ω 6<br />

ω 0 ω 6 ω 12 ω 11 ω 9 ω 5 ω 10 ω 7 ω 1 ω 2 ω 4 ω 8 ω 3<br />

ω 0 ω 3 ω 6 ω 12 ω 11 ω 9 ω 5 ω 10 ω 7 ω 1 ω 2 ω 4 ω 8<br />

ω 0 ω 8 ω 3 ω 6 ω 12 ω 11 ω 9 ω 5 ω 10 ω 7 ω 1 ω 2 ω 4<br />

ω 0 ω 4 ω 8 ω 3 ω 6 ω 12 ω 11 ω 9 ω 5 ω 10 ω 7 ω 1 ω 2<br />

△<br />

Ôº¼½ º¿<br />

Then apply fast (FFT based!) algorithms for multiplication with circulant matrices to right lower (n −<br />

1) × (n − 1) block of permuted Fourier matrix .<br />

△<br />

Ôº¼¿ º¿<br />

Remark 7.3.6 (FFT for prime n).<br />

Asymptotic complexity of c=fft(y) for y ∈ C n =<br />

O(n log n).<br />

When n ≠ 2 L , even the Cooley-Tuckey algorithm of Rem. 7.3.5 will eventually lead to a DFT for a<br />

vector with prime length.<br />

Quoted from the MATLAB manual:<br />

When n is a prime number, the FFTW library first decomposes an n-point problem into three (n − 1)-<br />

point problems using Rader’s algorithm [33]. It then uses the Cooley-Tukey decomposition described<br />

above to compute the (n − 1)-point DFTs.<br />

← Sect. 7.2.1<br />

Asymptotic complexity of discrete periodic convolution/multiplication with circulant matrix, see<br />

Code 7.2.6:<br />

Cost(z = pconvfft(u,x), u,x ∈ C n ) = O(n log n).<br />

Asymptotic complexity of discrete convolution, see Code 7.2.8:<br />

Cost(z = myconv(h,x), h,x ∈ C n ) = O(n log n).<br />

Details of Rader’s algorithm: a theorem from number theory:<br />

∀p ∈ N prime ∃g ∈ {1, ...,p − 1}: {g k mod p: k = 1, ...,p − 1} = {1,...,p − 1} ,<br />

permutation P p,g : {1, . ..,p − 1} ↦→ {1, ...,p − 1} , P p,g (k) = g k mod p ,<br />

reversing permutation P k : {1, ...,k} ↦→ {1, ...,k} , P k (i) = k − i + 1 .<br />

For Fourier matrix F = (f ij ) p i,j=1 : P p−1P p,g (f ij<br />

Ôº¼¾ º¿<br />

) p i,j=2 PT p,g is circulant.<br />

7.4 Trigonometric transformations<br />

Keeping in mind exp(2πix) = cos(2πx)+i sin(2πx) we may also consider the real/imaginary parts of<br />

the Fourier basis vectors (F n ) :,j as bases of R n and define the corresponding basis transformation.<br />

They can all be realized by means of fft with an asymptotic computational effort of O(n log n).<br />

Details are given in the sequel.<br />

Ôº¼ º

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!