
















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

















9/24/ A. Smith; based on slides by E. Demaine, C. Leiserson, S. Raskhodnikova, K. Wayne
9/24/ A. Smith; based on slides by E. Demaine, C. Leiserson, S. Raskhodnikova, K. Wayne
Gauss (1805, 1866). Analyzed periodic motion of asteroid Ceres. Runge-König (1924). Laid theoretical groundwork. Danielson-Lanczos (1942). Efficient algorithm. Cooley-Tukey (1965). Monitoring nuclear tests in Soviet Union and tracking submarines. Rediscovered and popularized FFT. Importance not fully realized until advent of digital computers.
Polynomial. [coefficient representation] Add: O(n) arithmetic operations. Evaluate: O(n) using Horner's method. Multiply (convolve): O(n^2 ) using brute force.
Polynomial. [point-value representation] Add: O(n) arithmetic operations. Multiply: O(n), but need 2n-1 points. Evaluate: O(n 2 ) using Lagrange's formula.
Tradeoff. Fast evaluation or fast multiplication. We want both! Goal. Make all ops fast by efficiently converting between two representations. Coefficient Representation O(n^2 ) Multiply O(n) Evaluate Point-value O(n) O(n^2 ) coefficient representation point-value representation
Coefficient to point-value. Given a polynomial a 0 + a 1 x + ... + an-1 xn-1, evaluate it at n distinct points x 0 , ... , xn-1. Divide. Break polynomial up into even and odd powers. A(x) = a 0 + a 1 x + a 2 x^2 + a 3 x^3 + a 4 x^4 + a 5 x^5 + a 6 x^6 + a 7 x^7. Aeven(x) = a 0 + a 2 x + a 4 x 2
Coefficient to point-value. Given a polynomial a 0 + a 1 x + ... + an-1 xn-1, evaluate it at n distinct points x 0 , ... , xn-1. Divide. Break polynomial up into even and odd powers. A(x) = a 0 + a 1 x + a 2 x^2 + a 3 x^3 + a 4 x^4 + a 5 x^5 + a 6 x^6 + a 7 x^7. Aeven(x) = a 0 + a 2 x + a 4 x 2
- i
Def. An nth^ root of unity is a complex number x such that xn^ = 1. Fact. The n th roots of unity are: ω 0 , ω 1 , …, ω n- where ω = e 2 π i / n . Pf. (ωk)n^ = (e 2 π^ i k / n) n^ = (e π^ i^ ) 2k^ = (-1) 2k^ = 1. Fact. The ½n th roots of unity are: ν 0 , ν 1 , …, ν n/2- where ν = e 4 π i / n . Fact. ω^2 = ν and (ω^2 )k^ = νk. ω^0 = ν^0 = 1 ω^1 ω^2 = ν^1 = i ω^3 ω^4 = ν^2 = - ω^5 ω^6 = ν^3 = -i ω^7 n = 8
Goal. Evaluate a degree n-1 polynomial A(x) = a 0 + ... + an-1 xn-1^ at its nth roots of unity: ω^0 , ω^1 , …, ωn-1. Divide. Break polynomial up into even and odd powers. Aeven(x) = a 0 + a 2 x + a 4 x^2 + … + an/2-2 x(n-1)/2. Aodd (x) = a 1 + a 3 x + a 5 x 2
Theorem. FFT algorithm evaluates a degree n-1 polynomial at each of the nth^ roots of unity in O(n log n) steps. Running time. T(2n) = 2T(n) + O(n) ⇒ T(n) = O(n log n). O(n log n) coefficient representation point-value representation assumes n is a power of 2
a 0 , a 1 , a 2 , a 3 , a 4 , a 5 , a 6 , a 7 a 0 , a 2 , a 4 , a 6 a 1 , a 3 , a 5 , a 7 a 0 , a 4 a 2 , a 6 a 1 , a 5 a 3 , a 7 a 0 a 4 a 2 a 6 a 1 a 5 a 3 a 7 "bit-reversed" order (^000 100 010 110 001 101 011 ) perfect shuffle
Claim. Inverse of Fourier matrix is given by following formula. Consequence. To compute inverse FFT, apply same algorithm but use ω
Claim. Fn and Gn are inverses. Pf. Summation lemma. Let ω be a principal nth^ root of unity. Then Pf. If k is a multiple of n then ωk^ = 1 ⇒ sums to n. Each n th root of unity ω k is a root of x n