Title: CS 312: Algorithm Analysis
1CS 312 Algorithm Analysis
- Lecture 12 Fast Fourier Transform
2Announcements
- Project 1
- Report Due Today
- Improvement due Wednesday
- Project 2
- Guidelines available early
3Objectives
- Lecture 12 Fast Fourier Transform
- To recall how to multiply two polynomials
- To recognize polynomial multiplication as an
instance of convolution - To review n-th complex roots of unity
- To discover how those roots make a divide and
conquer algorithm possible - To get an intuition for how divide and conquer
makes the FFT fast.
- Lecture 11 Median Matrix Multiplication
- Design a (expected) linear-time algorithm to
select the k-th smallest element in a list - Find the Median
- Apply divide and conquer to matrix multiplication
- Analyze using the Master Theorem
4Polynomial Multiplication
- Product of two degree d polynomials is a
polynomial of degree 2d. - Example
5Polynomial Multiplication
- More generally
- Then
- Where
- For igtd, use ai and bi 0
- An instance of a process called Convolution
6Questions
- Is it Correct?
- How long does it take?
- Can we do better?
7More Questions
- Why is polynomial multiplication (aka
Convolution) interesting? - Where is it used?
81-D Convolution
Smoothing (noise removal)
92-D Convolution
- A 2-D signal (an Image) is convolved with a
second Image (the filter, or convolution
Kernel). - f(x,y) g(x,y)
h(x,y)f(x,y)g(x,y)
10Value Representation
- Fact A degree-d polynomial is uniquely
characterized by its values at any d 1 distinct
points. - E.g., any two points determine a line
11Mapping Between The Representations
12A New Algorithm
13Questions
- Is it Correct?
- How long does it take?
- Can we do better?
14Evaluation as Divide and Conquer
15Choose Clever Points
If we can choose wisely, we can have a DC
algorithm whose running time is captured by our
favorite recurrence relation
16N-th Complex Roots of Unity
17Review The Complex Plane
18Multiplication of Complex Numbers
19N-th Complex Roots of Unity
20For Divide and Conquer
21The FFT
22Interpolation
23Questions
- Is it Correct?
- How long does it take?
- Can we do better?
24- We got this far on 2/5/2007
- That is OK because
- You have intuition into why the FFT works
- You understand that it is a Divide and Conquer
algorithm - You know how to analyze this algorithm
- Other perspectives on the FFT are provided in the
following slides.
25Matrix Reformulation
26(No Transcript)
27(No Transcript)
28(No Transcript)
29(No Transcript)
30(No Transcript)
31(No Transcript)
32(No Transcript)
33Assignment
- HW 10 2.11, 2.8
- Read Chapter 3 on Graph Connectivity Algorithms