Presentation is loading. Please wait.

Presentation is loading. Please wait.

Polynomial + Fast Fourier Transform

Similar presentations


Presentation on theme: "Polynomial + Fast Fourier Transform"— Presentation transcript:

1 Polynomial + Fast Fourier Transform
Michael Tsai 2017/06/13

2 Polynomials Coefficients:
Degree: highest order term with nonzero coefficient (k if highest nonzero term is ) Degree-bound: any integer strictly greater than the degree

3 Coefficient Representation
Vector Using it: Evaluation: Addition: Horner’s rule: O(n) O(n) +

4 Prob.: Polynomial Multiplication
Example:

5 Prob.: Polynomial Multiplication
Degree(C)=degree(A)+degree(B) Degree bound: ! Problem: can we reduce this time complexity?

6 Point-Value Representation
Degree-bound: n Computing a point-value representation: Calculate each using Horner’s rule takes Thus calculate all n values take If we choose the points wisely, we can reduce this to !

7 Interpolation Interpolation is the inverse operation of evaluation
Interpolation is well-defined when the interpolating polynomial have a degree-bound == given number of point-value pairs Theorem: For any set of n point-value pairs such that all the values are distinct, there is a unique polynomial A(x) of degree-bound n such that for (see p. 902 in Cormen for the proof)

8 Point-Value Representation
Evaluation Degree-bound: n Interpolation Using it: Addition: since , A: B: C:

9 Point-Value Representation: Multiplication
Multiplication: since , Problem! We need 2n point-value pairs so that C(x) is well- defined! A: n pairs B: n pairs C: n pairs

10 Point-Value Representation: Multiplication
Multiplication: since , Solution: Extend A and B to 2n point-value pairs (add n zero coefficient high-order terms) C(x) is now well-defined with 2n point-value pairs A: 2n pairs B: 2n pairs C: 2n pairs

11 Can we improve evaluation and interpolation time to
?

12 Complex Roots of Unity A complex n-th root of unity is a complex number such that Exponential of a complex number: There are exactly n complex n-th roots of unity:

13 Example Principle n-th root of unity: n complex n-th roots of unity:

14 Discrete Fourier Transform
Evaluate A(x) of degree-bound n at The vector is the discrete Fourier Transform (DFT) of coefficient vector still

15 Physical Meaning of DFT
Inverse DFT Weight of that frequency Signal at different frequencies

16 Fast Fourier Transform
Taking advantage of the special properties of the complex roots of unity, we can compute DFT in ! Assumption: n is a power of 2. Split A(x) into two parts:

17 Fast Fourier Transform
(ㄅ) How do we evaluate A(x) at ? Evaluate and at Combine the result using (ㄅ)

18 What is Divide-and-Conquer?
When dealing with a problem: Divide the problem into smaller, but same type of, problems If the problem is small enough to solve (Conquer), then solve it Else recursively call itself to solve smaller sub-problems Combine the solutions of smaller sub-problems into the solution of the original, larger, problem Base case Recursive case

19 Fast Fourier Transform
(ㄅ) How do we evaluate A(x) at ? Evaluate and at Combine the result using (ㄅ) Divide and Conquer 2 n/2-sized problems Combine the sub-problem solutions

20 Pseudo-code Divide: 2x n/2 Conquer Evaluate at Combine

21 Can we improve evaluation and interpolation time to ?
How about interpolation?? (p. 912 on Cormen)


Download ppt "Polynomial + Fast Fourier Transform"

Similar presentations


Ads by Google