CS 312: Algorithm Analysis - PowerPoint PPT Presentation

1 / 33
About This Presentation
Title:

CS 312: Algorithm Analysis

Description:

Fact: A degree-d polynomial is uniquely characterized by its ... E.g., any two points determine a line. Mapping Between The Representations. A New Algorithm ... – PowerPoint PPT presentation

Number of Views:25
Avg rating:3.0/5.0
Slides: 34
Provided by: ericri4
Category:

less

Transcript and Presenter's Notes

Title: CS 312: Algorithm Analysis


1
CS 312 Algorithm Analysis
  • Lecture 12 Fast Fourier Transform

2
Announcements
  • Project 1
  • Report Due Today
  • Improvement due Wednesday
  • Project 2
  • Guidelines available early

3
Objectives
  • 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

4
Polynomial Multiplication
  • Product of two degree d polynomials is a
    polynomial of degree 2d.
  • Example

5
Polynomial Multiplication
  • More generally
  • Then
  • Where
  • For igtd, use ai and bi 0
  • An instance of a process called Convolution

6
Questions
  • Is it Correct?
  • How long does it take?
  • Can we do better?

7
More Questions
  • Why is polynomial multiplication (aka
    Convolution) interesting?
  • Where is it used?

8
1-D Convolution

Smoothing (noise removal)

9
2-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)



10
Value 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

11
Mapping Between The Representations
12
A New Algorithm
13
Questions
  • Is it Correct?
  • How long does it take?
  • Can we do better?

14
Evaluation as Divide and Conquer
15
Choose Clever Points
If we can choose wisely, we can have a DC
algorithm whose running time is captured by our
favorite recurrence relation
16
N-th Complex Roots of Unity
17
Review The Complex Plane
18
Multiplication of Complex Numbers
19
N-th Complex Roots of Unity
20
For Divide and Conquer
21
The FFT
22
Interpolation
23
Questions
  • 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.

25
Matrix Reformulation
26
(No Transcript)
27
(No Transcript)
28
(No Transcript)
29
(No Transcript)
30
(No Transcript)
31
(No Transcript)
32
(No Transcript)
33
Assignment
  • HW 10 2.11, 2.8
  • Read Chapter 3 on Graph Connectivity Algorithms
Write a Comment
User Comments (0)
About PowerShow.com