Polynomials and the Fast Fourier Transform (FFT) Algorithm Design and Analysis (Week 7) 1 Battle Plan • Polynomials – Algorithms to add, multiply and evaluate polynomials – Coefficient and point-value representation • Fourier Transform – Discrete Fourier Transform (DFT) and inverse DFT to translate between polynomial representations – “A Short Digression on Complex Roots of Unity” – Fast Fourier Transform (FFT) is a divide-and-conquer algorithm based on properties of complex roots of unity 2 Polynomials • A polynomial in the variable ๐ฅ is a representation of a function ๐ด ๐ฅ = ๐๐−1 ๐ฅ ๐−1 + โฏ + ๐2 ๐ฅ 2 + ๐1 ๐ฅ + ๐0 as a formal sum ๐ด ๐ฅ = ๐−1 ๐ ๐=0 ๐๐ ๐ฅ . • We call the values ๐0 , ๐1, … , ๐๐−1 the coefficients of the polynomial • ๐ด ๐ฅ is said to have degree ๐ if its highest nonzero coefficient is ๐๐ . • Any integer strictly greater than the degree of a polynomial is a degree-bound of that polynomial 3 Examples • ๐ด ๐ฅ = ๐ฅ 3 − 2๐ฅ − 1 – ๐ด(๐ฅ) has degree 3 – ๐ด(๐ฅ) has degree-bounds 4, 5, 6, … or all values > degree – ๐ด(๐ฅ) has coefficients (−1, −2, 0, 1) • ๐ต ๐ฅ = ๐ฅ3 + ๐ฅ2 + 1 – ๐ต(๐ฅ) has degree 3 – ๐ต(๐ฅ) has degree bounds 4, 5, 6, … or all values > degree – ๐ต(๐ฅ) has coefficients (1, 0, 1, 1) 4 Coefficient Representation • A coefficient representation of a polynomial ๐ ๐ด ๐ฅ = ๐−1 ๐=0 ๐๐ ๐ฅ of degree-bound ๐ is a vector of coefficients ๐ = ๐0 , ๐1 , … , ๐๐−1 . • More examples – ๐ด ๐ฅ = 6๐ฅ 3 + 7๐ฅ 2 − 10๐ฅ + 9 – ๐ต ๐ฅ = −2๐ฅ 3 + 4๐ฅ − 5 (9, −10, 7, 6) (−5, 4, 0, −2) • The operation of evaluating the polynomial ๐ด(๐ฅ) at point ๐ฅ0 consists of computing the value of ๐ด ๐ฅ0 . • Evaluation takes time Θ(๐) using Horner’s rule ๐ด(๐ฅ0 ) = ๐0 + ๐ฅ0 (๐1 + ๐ฅ0 (๐2 + โฏ + ๐ฅ0 ๐๐−2 + ๐ฅ0 ๐๐−1 โฏ )) 5 Adding Polynomials • Adding two polynomials represented by the coefficient vectors ๐ = (๐0 , ๐1 , … , ๐๐−1 ) and ๐ = (๐0 , ๐1 , … , ๐๐−1 ) takes time Θ(๐). • Sum is the coefficient vector ๐ = (๐0 , ๐1 , … , ๐๐−1 ), where ๐๐ = ๐๐ + ๐๐ for ๐ = 0,1, … , ๐ − 1. • Example ๐ด ๐ฅ = 6๐ฅ 3 + 7๐ฅ 2 − 10๐ฅ + 9 ๐ต ๐ฅ = − 2๐ฅ 3 + 4๐ฅ − 5 3 2 ๐ถ(๐ฅ) = 4๐ฅ + 7๐ฅ − 6๐ฅ + 4 (9, −10, 7, 6) (−5, 4, 0, −2) (4, −6,7,4) 6 Multiplying Polynomials • For polynomial multiplication, if ๐ด(๐ฅ) and ๐ต(๐ฅ) are polynomials of degree-bound n, we say their product ๐ถ(๐ฅ) is a polynomial of degree-bound 2๐ − 1. • Example 6๐ฅ 3 − 2๐ฅ 3 − 30๐ฅ 3 24๐ฅ 4 + 28๐ฅ 3 − 12๐ฅ 6 − 14๐ฅ 5 + 20๐ฅ 4 − 18๐ฅ 3 − 12๐ฅ 6 − 14๐ฅ 5 + 44๐ฅ 4 − 20๐ฅ 3 + 7๐ฅ 2 − 10๐ฅ + 9 + 4๐ฅ − 5 2 − 35๐ฅ + 50๐ฅ − 45 − 40๐ฅ 2 + 36๐ฅ − 75๐ฅ 2 + 86๐ฅ − 45 7 Multiplying Polynomials • Multiplication of two degree-bound n polynomials ๐ด(๐ฅ) and ๐ต(๐ฅ) takes time Θ ๐2 , since each coefficient in vector ๐ must be multiplied by each coefficient in vector ๐. • Another way to express the product C(x) is ๐ 2๐−1 ๐ ๐=0 ๐๐ ๐ฅ , where ๐๐ = ๐=0 ๐๐ ๐๐−๐ . • The resulting coefficient vector ๐ = (๐0 , ๐1 , … ๐2๐−1 ) is also called the convolution of the input vectors ๐ and ๐, denoted as ๐ = ๐โจ๐. 8 Point-Value Representation • A point-value representation of a polynomial ๐ด(๐ฅ) of degree-bound ๐ is a set of ๐ point-value pairs ๐ฅ0 , ๐ฆ0 , ๐ฅ1 , ๐ฆ1 , … , ๐ฅ๐−1 , ๐ฆ๐−1 such that all of the ๐ฅ๐ are distinct and ๐ฆ๐ = ๐ด(๐ฅ๐ ) for ๐ = 0, 1, … , ๐ − 1. • Example ๐ด ๐ฅ = ๐ฅ 3 − 2๐ฅ + 1 – ๐ฅ๐ – ๐ด(๐ฅ๐ ) 0, 1, 2, 3 1, 0, 5, 22 * 0, 1 , 1, 0 , 2, 5 , 3, 22 + • Using Horner’s method, ๐-point evaluation takes time Θ(๐2 ). 9 Point-Value Representation • The inverse of evaluation is called interpolation – determines coefficient form of polynomial from pointvalue representation – For any set * ๐ฅ0 , ๐ฆ0 , ๐ฅ1 , ๐ฆ1 , … , ๐ฅ๐−1 , ๐ฆ๐−1 + of ๐ pointvalue pairs such that all the ๐ฅ๐ values are distinct, there is a unique polynomial ๐ด(๐ฅ) of degree-bound ๐ such that ๐ฆ๐ = ๐ด(๐ฅ๐ ) for ๐ = 0, 1, … , ๐ − 1. • Lagrange’s formula ๐−1 ๐ด ๐ฅ = ๐ฆ๐ ๐=0 ๐≠๐(๐ฅ − ๐ฅ๐ ) ๐≠k(๐ฅ๐ − ๐ฅ๐ ) • Using Lagrange’s formula, interpolation takes time Θ(๐2 ). 10 Example • Using Lagrange’s formula, we interpolate the pointvalue representation 0, 1 , 1, 0 , 2, 5 , 3, 22 . ๐ฅ−1 (๐ฅ−2)(๐ฅ−3) – 1 (0−1)(0−2)(0−3) = ๐ฅ 3 −6๐ฅ 2 +11๐ฅ−6 −6 = −๐ฅ 3 +6๐ฅ 2 −11๐ฅ+6 6 (๐ฅ−0)(๐ฅ−2)(๐ฅ−3) – 0 (1−0)(1−2)(1−3) = 0 (๐ฅ−0)(๐ฅ−1)(๐ฅ−3) – 5 (2−0)(2−1)(2−3) = 5 (๐ฅ−0)(๐ฅ−1)(๐ฅ−2) ๐ฅ 3 −4๐ฅ 2 +3๐ฅ −2 – 22 (3−0)(3−1)(3−2) = 22 – 1 6 = ๐ฅ 3 −3๐ฅ 2 +2๐ฅ 6 −15๐ฅ 3 +60๐ฅ 2 −45๐ฅ 6 = 22๐ฅ 3 −66๐ฅ 2 +44๐ฅ 6 6๐ฅ 3 + 0๐ฅ 2 − 12๐ฅ + 6 – ๐ฅ 3 − 2๐ฅ + 1 11 Adding Polynomials • In point-value form, addition ๐ถ ๐ฅ = ๐ด ๐ฅ + ๐ต(๐ฅ) is given by ๐ถ ๐ฅ๐ = ๐ด ๐ฅ๐ + ๐ต(๐ฅ๐ ) for any point ๐ฅ๐ . – ๐ด: ๐ฅ0 , ๐ฆ0 , ๐ฅ1 , ๐ฆ1 , … , ๐ฅ๐−1 , ๐ฆ๐−1 ′ – ๐ต: ๐ฅ0 , ๐ฆ0′ , ๐ฅ1 , ๐ฆ1′ , … , ๐ฅ๐−1 , ๐ฆ๐−1 ′ – ๐ถ: * ๐ฅ0 , ๐ฆ0 + ๐ฆ0′ , ๐ฅ1 , ๐ฆ1 + ๐ฆ1′ , … , ๐ฅ๐−1 , ๐ฆ๐−1 + ๐ฆ๐−1 + • ๐ด and ๐ต are evaluated for the same ๐ points. • The time to add two polynomials of degree-bound ๐ in point-value form is Θ(๐). 12 Example • We add ๐ถ ๐ฅ = ๐ด ๐ฅ + ๐ต(๐ฅ) in point-value form – – – – – – ๐ด ๐ฅ = ๐ฅ 3 − 2๐ฅ + 1 ๐ต ๐ฅ = ๐ฅ3 + ๐ฅ2 + 1 ๐ฅ๐ = (0, 1, 2, 3) ๐ด: 0, 1 , 1, 0 , 2, 5 , 3, 22 ๐ต: * 0, 1 , 1, 3 , 2, 13 , 3, 37 + ๐ถ: * 0, 2 , 1, 3 , 2, 18 , 3, 59 + 13 Multiplying Polynomials • In point-value form, multiplication ๐ถ ๐ฅ = ๐ด ๐ฅ ๐ต(๐ฅ) is given by ๐ถ ๐ฅ๐ = ๐ด ๐ฅ๐ ๐ต(๐ฅ๐ ) for any point ๐ฅ๐ . • Problem: if ๐ด and ๐ต are of degree-bound ๐, then ๐ถ is of degree-bound 2๐. • Need to start with “extended” point-value forms for ๐ด and ๐ต consisting of 2๐ point-value pairs each. – ๐ด: ๐ฅ0 , ๐ฆ0 , ๐ฅ1 , ๐ฆ1 , … , ๐ฅ2๐−1 , ๐ฆ2๐−1 ′ – ๐ต: ๐ฅ0 , ๐ฆ0′ , ๐ฅ1 , ๐ฆ1′ , … , ๐ฅ2๐−1 , ๐ฆ2๐−1 ′ – ๐ถ: * ๐ฅ0 , ๐ฆ0 ๐ฆ0′ , ๐ฅ1 , ๐ฆ1 ๐ฆ1′ , … , ๐ฅ2๐−1 , ๐ฆ2๐−1 ๐ฆ2๐−1 + • The time to multiply two polynomials of degreebound ๐ in point-value form is Θ(๐). 14 Example • We multiply ๐ถ ๐ฅ = ๐ด ๐ฅ ๐ต(๐ฅ) in point-value form – – – – – – ๐ด ๐ฅ = ๐ฅ 3 − 2๐ฅ + 1 ๐ต ๐ฅ = ๐ฅ3 + ๐ฅ2 + 1 ๐ฅ๐ = (−3, −2, −1, 0, 1, 2, 3) We need 7 coefficients! ๐ด: −3, −17 , −2, −3 , −1,1 , 0, 1 , 1, 0 , 2, 5 , 3, 22 ๐ต: * −3, −20 , −2, −3 , −1, 2 , 0, 1 , 1, 3 , 2, 13 , 3, 37 + ๐ถ: * −3,340 , −2,9 , −1,2 , 0, 1 , 1, 0 , 2, 65 , 3, 814 + 15 The Road So Far ๐0 , ๐1 , … , ๐๐−1 ๐0 , ๐1 , … , ๐๐−1 Ordinary multiplication Time Θ(๐2 ) Evaluation Time Θ(๐2 ) ๐ด ๐ฅ0 , ๐ต ๐ฅ0 ๐ด ๐ฅ1 , ๐ต ๐ฅ1 โฎ ๐ด ๐ฅ2๐−1 , ๐ต(๐ฅ2๐−1 ) ๐0 , ๐1 , … , ๐๐−1 Coefficient representations Interpolation Time Θ(๐2 ) Pointwise multiplication Time Θ(๐) ๐ถ ๐ฅ0 ๐ถ ๐ฅ1 โฎ ๐ถ(๐ฅ2๐−1 ) Point-value representations • Can we do better? – Using Fast Fourier Transform (FFT) and its inverse, we can do evaluation and interpolation in time Θ(๐ log ๐). • The product of two polynomials of degree-bound ๐ can be computed in time Θ(๐ log ๐), with both the input and output in coefficient form. 16 Fourier Transform • Fourier Transforms originate from signal processing Weight Amplitude – Transform signal from time domain to frequency domain Time Frequency – Input signal is a function mapping time to amplitude – Output is a weighted sum of phase-shifted sinusoids of varying frequencies 17 Fast Multiplication of Polynomials • Using complex roots of unity – Evaluation by taking the Discrete Fourier Transform (DFT) of a coefficient vector – Interpolation by taking the “inverse DFT” of point-value pairs, yielding a coefficient vector – Fast Fourier Transform (FFT) can perform DFT and inverse DFT in time Θ(๐ log ๐) • Algorithm 1. 2. 3. 4. Add ๐ higher-order zero coefficients to ๐ด(๐ฅ) and ๐ต(๐ฅ) Evaluate ๐ด(๐ฅ) and ๐ต(๐ฅ) using FFT for 2๐ points Pointwise multiplication of point-value forms Interpolate ๐ถ(๐ฅ) using FFT to compute inverse DFT 18 Complex Roots of Unity • A complex ๐th root of unity (1) is a complex number ๐ such that ๐๐ = 1. • There are exactly ๐ complex ๐th root of unity 2๐๐๐ ๐ for ๐ = 0, 1, … , ๐ − 1 ๐ where ๐ ๐๐ข = cos ๐ข + ๐ sin(๐ข). Here ๐ข represents an angle in radians. 2๐๐๐ ๐ = cos 2๐๐ • Using ๐ check that it is a root ๐ 2๐๐๐ ๐ ๐ ๐ + ๐ sin(2๐๐ ๐), we can = ๐ 2๐๐๐ = cos(2๐๐) +๐ sin(2๐๐) = 1 1 0 19 Examples • The complex 4th roots of unity are 1, −1, ๐, −๐ where −1 = ๐. • The complex 8th roots of unity are all of the above, plus four more 1 2 + ๐ 2 1 , 2 • For example 1 2 ๐ − + ,− 2 ๐ 2 2 1 2 + ๐ 2 , and − 1 2 − ๐ 2 1 2๐ ๐ 2 = + + =๐ 2 2 2 20 Principal ๐th Root of Unity • The value 2๐๐ ๐ ๐๐ = ๐ is called the principal ๐th root of unity. • All of the other complex ๐th roots of unity are powers of ๐๐ . • The ๐ complex ๐th roots of unity, ๐๐0 , ๐๐1 , … , ๐๐๐−1 , form a group under multiplication that has the same structure as (โค๐ , +) modulo ๐. • ๐๐๐ = ๐๐0 = 1 implies ๐ ๐+๐ ๐+๐ mod ๐ – ๐๐ ๐๐๐ = ๐๐ = ๐๐ – ๐๐−1 = ๐๐๐−1 21 Visualizing 8 Complex 8th Roots of Unity imaginary ๐83 =− 1 2 + ๐82 = ๐ ๐ ๐ ๐18 = 2 ๐84 = −1 1 2 2 + ๐ 2 ๐80 = ๐88 = 1 −1 ๐85 = − 1 − 1 ๐ 2 ๐87 = −๐ real 1 2 − ๐ 2 ๐86 = −๐ 22 Cancellation Lemma • For any integers ๐ ≥ 0, ๐ ≥ 0, and ๐ > 0, ๐๐ ๐๐๐ = ๐๐๐ . • Proof ๐๐ ๐๐๐ = ๐ 2๐๐ ๐๐ ๐๐ = ๐ 2๐๐ ๐ ๐ = ๐๐๐ ๐ • For any even integer ๐ > 0, ๐๐ 2 = ๐2 = −1. 6 • Example ๐24 = ๐4 6 – ๐24 = ๐ 2๐๐ 24 6 6 = ๐ 2๐๐ 24 = ๐ 2๐๐ 4 = ๐4 23 Halving Lemma • If ๐ > 0 is even, then the squares of the ๐ complex ๐th roots of unity are the ๐ 2 complex ๐ 2th roots of unity. • Proof – By the cancellation lemma, we have ๐๐๐ nonnegative integer ๐. 2 = ๐๐๐ 2 for any • If we square all of the complex ๐th roots of unity, then each ๐ 2th root of unity is obtained exactly twice ๐+๐ – ๐๐ 2 2 = ๐๐2๐+๐ = ๐๐2๐ ๐๐๐ = ๐๐2๐ = ๐๐๐ ๐+๐ – Thus, ๐๐๐ and ๐๐ 2 2 have the same square 24 Summation Lemma • For any integer ๐ ≥ 1 and nonzero integer ๐ not divisible by ๐, ๐−1 ๐=0 ๐๐๐ ๐ = 0. • Proof – Geometric series – ๐−1 ๐=0 ๐๐๐ ๐ = ๐ ๐๐ ๐ฅ ๐ −1 ๐ฅ−1 ๐−1 ๐ ๐=0 ๐ฅ = ๐ ๐ ๐ −1 ๐๐ −1 ๐ −1 ๐๐ = ๐ −1 ๐๐ = 1 ๐ −1 ๐ −1 ๐๐ =0 – Requiring that ๐ not be divisible by ๐ ensures that the denominator is not 0, since ๐๐๐ = 1 only when k is divisible by ๐ 25 Discrete Fourier Transform (DFT) • Evaluate a polynomial ๐ด(๐ฅ) of degree-bound ๐ at the ๐ complex ๐th roots of unity, ๐๐0 , ๐๐1 , ๐๐2 , … , ๐๐๐−1 . – assume that ๐ is a power of 2 – assume ๐ด is given in coefficient form ๐ = (๐0 , ๐1 , … , ๐๐−1 ) • We define the results ๐ฆ๐ , for ๐ = 0, 1, … , ๐ − 1, by ๐ฆ๐ = ๐ด ๐๐๐ = ๐๐ ๐−1 ๐=0 ๐๐ ๐๐ . • The vector ๐ฆ = (๐ฆ0 , ๐ฆ1 , … , ๐ฆ๐−1 ) is the Discrete Fourier Transform (DFT) of the coefficient vector ๐ = ๐0 , ๐1 , … , ๐๐−1 , denoted as ๐ฆ = DFT๐ (๐). 26 Fast Fourier Transform (FFT) • Fast Fourier Transform (FFT) takes advantage of the special properties of the complex roots of unity to compute DFT๐ (a) in time Θ(๐ log ๐). • Divide-and-conquer strategy – define two new polynomials of degree-bound ๐ 2, using even-index and odd-index coefficients of ๐ด(๐ฅ) separately – ๐ด 0 ๐ฅ = ๐0 + ๐2 ๐ฅ + ๐4 ๐ฅ 2 + โฏ + ๐๐−2 ๐ฅ – ๐ด 1 ๐ฅ = ๐1 + ๐3 ๐ฅ + ๐5 ๐ฅ 2 + โฏ + ๐๐−1 ๐ฅ ๐ 2−1 ๐ 2−1 – ๐ด ๐ฅ = ๐ด 0 ๐ฅ 2 + ๐ฅ๐ด 1 (๐ฅ 2 ) 27 Fast Fourier Transform (FFT) • The problem of evaluating ๐ด(๐ฅ) at ๐๐0 , ๐๐1 , … , ๐๐๐−1 reduces to 1. evaluating the degree-bound ๐ 2 polynomials ๐ด 0 (๐ฅ) and ๐ด 1 (๐ฅ) at the points ๐๐0 2 , ๐๐1 2 , … , ๐๐๐−1 2 2. combining the results by ๐ด ๐ฅ = ๐ด 0 ๐ฅ 2 + ๐ฅ๐ด 1 (๐ฅ 2 ) • Why bother? – The list ๐๐0 2 , ๐๐1 2 , … , ๐๐๐−1 2 does not contain ๐ distinct values, but ๐ 2 complex ๐ 2th roots of unity – Polynomials ๐ด 0 and ๐ด 1 are recursively evaluated at the ๐ complex ๐ th roots of unity 2 2 – Subproblems have exactly the same form as the original problem, but are half the size 28 Example • ๐ด ๐ฅ = ๐0 + ๐1 ๐ฅ + ๐2 ๐ฅ 2 + ๐3 ๐ฅ 3 of degree-bound 4 – – – – ๐ด ๐ด ๐ด ๐ด ๐40 ๐41 ๐42 ๐43 =๐ด =๐ด =๐ด =๐ด 1 = ๐0 + ๐1 + ๐2 + ๐3 ๐ = ๐๐ + ๐1 ๐ − ๐2 − ๐3 ๐ −1 = ๐0 − ๐1 + ๐2 − ๐3 −๐ = ๐0 − ๐1 ๐ + ๐2 + ๐3 ๐ • Using ๐ด ๐ฅ = ๐ด 0 ๐ฅ 2 + ๐ฅ๐ด 1 ๐ฅ 2 – – – – – ๐ด ๐ด ๐ด ๐ด ๐ด ๐ฅ = ๐0 + ๐2 ๐ฅ 2 + ๐ฅ ๐1 + ๐3 ๐ฅ 2 ๐40 = ๐ด 1 = ๐0 + ๐2 + 1(๐1 + ๐3 ) ๐41 = ๐ด ๐ = ๐0 − ๐2 + ๐(๐1 − ๐3 ) ๐42 = ๐ด −1 = ๐0 + ๐2 − 1 ๐1 + ๐3 ๐43 = ๐ด −๐ = ๐0 − ๐2 − ๐(๐1 − ๐3 ) 29 Recursive FFT Algorithm RECURSIVE-FFT ๐ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 ๐ ← ๐๐๐๐๐กโ,๐if ๐ = 1 then return ๐ 2๐๐ ๐๐ ← ๐ ๐ ๐←1 ๐ 0 ← (๐0 , ๐2 , … , ๐๐−2 ) ๐ 1 ← (๐1 , ๐3 , … , ๐๐−1 ) ๐ฆ 0 ← RECURSIVE-FFT ๐ 0 ๐ฆ 1 ← RECURSIVE-FFT ๐ 1 for ๐ ← 0 to ๐ 2 − 1 0 1 do ๐ฆ๐ ← ๐ฆ๐ + ๐๐ฆ๐ 0 1 ๐ฆ๐+(๐ 2) ← ๐ฆ๐ − ๐๐ฆ๐ ๐ ← ๐๐๐ return ๐ฆ ๐ is a power of 2 basis of recursion ๐๐ is principal ๐th root of unity 0 ๐ฆ๐ = ๐ด 0 ๐๐๐ 2 = ๐ด 0 (๐๐2๐ ) 1 ๐ฆ๐ = ๐ด 1 ๐๐๐ 2 = ๐ด 1 (๐๐2๐ ) ๐+ ๐ 2 since −๐๐๐ = ๐๐ compute ๐๐๐ iteratively 30 Why Does It Work? • For ๐ฆ0 , ๐ฆ1 , … ๐ฆ๐ 2−1 0 ๐ฆ๐ 0 ๐ฆ๐ 1 + ๐๐๐ ๐ฆ๐ ๐๐2๐ + ๐๐๐ = =๐ด =๐ด (line 11) ๐๐๐ ๐ด 1 ๐๐2๐ • For ๐ฆ๐ 2 , ๐ฆ๐ 2+1 , … , ๐ฆ๐−1 ๐ฆ๐+๐ 2 = = (line 12) ๐ฆ๐0 ๐ฆ๐0 0 =๐ด =๐ด − ๐๐๐ ๐ฆ๐1 ๐+ ๐ 2 + ๐๐ ๐ฆ๐1 since ๐ ๐+ 2 ๐๐2๐ + ๐๐ ๐ด 1 ๐๐2๐ ๐ ๐+ 0 2 ๐๐2๐+๐ + ๐๐ ๐ด 1 ๐๐2๐+๐ ๐+ ๐ 2 −๐๐๐ = ๐๐ since ๐๐2๐+๐ = ๐๐2๐ ๐+ ๐ 2 = ๐ด ๐๐ 31 Input Vector Tree of RECURSIVEFFT(๐) (๐0 , ๐1 , ๐2 , ๐3 , ๐4 , ๐5 , ๐6 , ๐7 ) (๐0 , ๐2 , ๐4 , ๐6 ) (๐0 , ๐4 ) (๐0 ) (๐4 ) (๐1 , ๐3 , ๐5 , ๐7 ) (๐2 , ๐6 ) (๐2 ) (๐6 ) (๐1 , ๐5 ) (๐1 ) (๐5 ) (๐3 , ๐7 ) (๐3 ) (๐7 ) 32 Interpolation • Interpolation by computing the inverse DFT, denoted by a = DFT๐−1 (๐ฆ). • By modifying the FFT algorithm, we can compute DFT๐−1 in time Θ(๐ log ๐). – switch the roles of ๐ and ๐ฆ – replace ๐๐ by ๐๐−1 – divide each element of the result by ๐ 33