Numerical Methods
Fast Fourier Transform
Цели урока
- Understand the Cooley-Tukey algorithm: how recursive splitting of DFT into even/odd reduces complexity from O(N^2) to O(N log N)
- Learn to apply FFT convolution for polynomial multiplication and PDE solving with constant coefficients
- Understand NTT, FFTW, and spectral differentiation as key applications of FFT
Предварительные знания
- Multigrid Methods
Multiplying two degree-10^6 polynomials naively takes 10^12 operations - more than a second even on modern CPUs. FFT does it in 20 million operations.
- Shazam and Spotify: audio fingerprinting in milliseconds via FFT spectrograms
- RSA and post-quantum crypto Kyber: multiplying large numbers and polynomials via NTT
- NOAA global atmospheric models: pseudospectral methods via FFT
- PyTorch torch.nn.Conv2d: large convolutions computed via cuFFT on GPU
History of the Algorithm
Cooley and Tukey in 1965 rediscovered the algorithm - it turned out Gauss knew about it in 1805 but never published. Their Mathematics of Computation paper transformed signal processing. Harvard's Rader (1968) generalized to arbitrary N. Today FFTW (Frigo, Johnson, MIT, 1997) is the de-facto standard, used in NumPy, MATLAB, GNU Radio.
Cooley-Tukey Algorithm: Divide-and-Conquer Fourier
1965. Cooley and Tukey published an algorithm that IEEE called one of the 10 most important algorithms of the 20th century. DFT complexity dropped from O(N^2) to O(N log N). For N = 1,000,000: 10^12 operations versus 20 million. A factor of 50,000.