The Fast Fourier Transform (FFT) is the de facto Algorithm for calculating the Discrete Fourier Transform, that reduces the Time Complexity of the computation to , whereas a regular matrix multiplication is . There are many different implementations of the FFT.
Time Complexity
The Time Complexity of the FFT algorithm is , whereas the naive DFT algorithm is .
The TLDR on the intuition for the time complexity is that we can split up the original DFT into subproblems until we have subproblems that each take to compute. Hence the time complexity is .
- in the original expression, we iterate to sum, times
- we iterate to sum, times, and we do that twice
- the second level of recursion
- the last level of recursion
Cooley-Tukey FFT
Radix-2 FFT
Radix-2 FFT is a FFT implementation that requires is a power of
Radix-2 Decimation in Time FFT
For DIT, you split by the index (n) by parity. Hence “decimation in time”.
Start with the initial DFT equation
Split the odd and even indices into two different sums
Factor out a from the odd sum
Rewrite the the subproblem DFTs as the odd indices subproblem and the even indices subproblem. Each of these subproblem DFTs are only half the length as the original problem, so while was originally valid beyond for , it must now be within the half range to accomodate and .
In order to calculate the full DFT, we have to get the values of for , which we can do this by shifting the result we just got.
Simplify subproblem DFTs using periodicity rules: period of sample DFT is
Using , where
Therefore now we have the capability of calculating for all relevant using the combination of these two, where the upper range use the bottom and the lower range use the top. The resulting process is called the Butterfly Operation, allowing us to convert an -point DFT problem into two -point DFT problems.
- in the original expression, we iterate to sum, times
- we iterate to sum, times, and we do that twice
- the second level of recursion
- the last level of recursion
We have already shown the first level of recursion. If we keep on recursing until each subvector is of length 1, then it only cost to calculate that DFT subproblem. It takes recurses to get to the base case.
Radix-2 Decimation in Frequency FFT
For DIF, you split the frequencies (k) by parity. Hence “decimation in frequency”.
Good-Thomas FFT
Also known as the Prime-Factor Algorithm FFT, you break into factors that are strictly coprime, meaning that their GCD = 1. This one isn’t as relevant to computation though, so we just mention it. Radix 2, is the main one for computation because computers love 2.