|
1 |
| -# Hints |
| 1 | +## General |
2 | 2 |
|
3 |
| -## 1. DFT |
4 |
| -- This can be done straight from the definition of the DFT: `Xₖ = Σ xₙ * ℯ^(-2iπk * n/N)` |
5 |
| -- While the complexity is fixed at `O(n²)`, there are still methods to do this which are more efficient. |
6 |
| -- Loops are generally slower than matrix multiplication. |
| 3 | +- DFT |
| 4 | + - This can be done straight from the definition of the DFT: `Xₖ = Σ xₙ * ℯ^(-2iπk * n/N)` |
| 5 | + - While the complexity is fixed at `O(n²)`, there are still methods to do this which are more efficient. |
| 6 | + - Loops are generally slower than matrix multiplication. |
7 | 7 |
|
8 |
| -## 2. FFT |
9 |
| -- As stated in the introduction, this is typically done with a divide-and-conquer strategy, so recursion is likely your friend, but while loops are not ruled out (and can even be more efficient). |
10 |
| -- An outline of an algorithm is as follows: |
11 |
| - - When the length of the input vector is less than or equal to 1, return the input vector. Otherwise... |
12 |
| - - The signal is split into two parts, the elements with even indices `Xₑ` and the elements with odd indices `Xₒ`. |
13 |
| - - The FFT is run on both parts. |
14 |
| - - The vector `f(n) = ℯ^(-2iπ * n/N)` is made (with `n` running from 0 to N/2-1). |
15 |
| - - The two parts `Xₑ` and `Xₒ` are recombined into a full vector `[Xₑ + f(n) * Xₒ; Xₑ - f(n) * Xₒ]`, where the addition and multiplications are elementwise. |
| 8 | +- FFT |
| 9 | + - As stated in the introduction, this is typically done with a divide-and-conquer strategy, so recursion is likely your friend, but while loops are not ruled out (and can even be more efficient). |
| 10 | + - An outline of an algorithm is as follows: |
| 11 | + - When the length of the input vector is less than or equal to 1, return the input vector. Otherwise... |
| 12 | + - The signal is split into two parts, the elements with even indices `Xₑ` and the elements with odd indices `Xₒ`. |
| 13 | + - The FFT is run on both parts. |
| 14 | + - The vector `f(n) = ℯ^(-2iπ * n/N)` is made (with `n` running from 0 to N/2-1). |
| 15 | + - The two parts `Xₑ` and `Xₒ` are recombined into a full vector `[Xₑ + f(n) * Xₒ; Xₑ - f(n) * Xₒ]`, where the addition and multiplications are elementwise. |
0 commit comments