Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Computational complexity of an n-dimensional Fast Fourier Transform? [duplicate]

Tags:

I'm trying to write a bit of code that will predict the time taken to perform a discrete Fourier transform on a given n-dimensional array, but I'm struggling to get my head around the computational complexity of n-dimensional FFTs.

As I understand it:

  • The 1D FFT of a vector of length N should take k*(N*log(N)) where k is some timing constant

  • For an M*N matrix, the 2D FFT should take:

    N*(k*M*log(M)) + M*(k*N*log(N)) = k*M*N*(log(M)+log(N))

    since it requires taking 1D FFTs in each row and column

How does this generalize to the ND case? Does it follow that it should be k*prod(dimensions)*sum(log(dimensions))?

like image 783
ali_m Avatar asked Sep 03 '12 13:09

ali_m


People also ask

What is the computational complexity of Fast Fourier Transforms FFT )?

The Fast Fourier Transform (FFT) is a way to reduce the complexity of the Fourier transform computation from O(n2) O ( n 2 ) to O(nlogn) O ( n log ⁡ , which is a dramatic improvement. The primary version of the FFT is one due to Cooley and Tukey. The basic idea of it is easy to see.

What is the computational complexity using FFT algorithm?

Radix-2 FFT algorithm reduces the order of computational complexity of Eq. 1 by decimating even and odd indices of input samples. There are two kinds of decimation:[14] decimation in the time domain and decimation in frequency (DIF) domain. Figure 1 shows the flow graph for radix-2 DIF FFT for N = 16.

What is the computational complexity of direct computation of DFT?

Direct computation of DFT has a lot of computational complexity. In order to reduce the computational complexity of DFT, Fast Fourier Transform (FFT) is used whose output is exactly the same as DFT but with less computational complexity and time. Similar is the case with IDFT.

What are the computational advantages of FFT over DFT?

The Fast Fourier Transform (FFT) is an implementation of the DFT which produces almost the same results as the DFT, but it is incredibly more efficient and much faster which often reduces the computation time significantly. It is just a computational algorithm used for fast and efficient computation of the DFT.


1 Answers

If we take your derivation of 2D a bit further, it becomes clear:

N*(k*M*log(M)) + M*(k*N*log(N)) = k*M*N*(log(M)+log(N))

becomes:

                                = k*M*N*(log(M*N))

For N dimensions (A,B,C, etc...), the complexity is:

O( A*B*C*... * log(A*B*C*...) )

Mathematically speaking, an N-Dimensional FFT is the same as a 1-D FFT with the size of the product of the dimensions, except that the twiddle factors are different. So it naturally follows that the computational complexity is the same.

like image 94
Mysticial Avatar answered Sep 17 '22 15:09

Mysticial