Introduction to Algorithms

Slides:



Advertisements
Similar presentations
Fast Fourier Transform for speeding up the multiplication of polynomials an Algorithm Visualization Alexandru Cioaca.
Advertisements

Parallel Fast Fourier Transform Ryan Liu. Introduction The Discrete Fourier Transform could be applied in science and engineering. Examples: ◦ Voice recognition.
LECTURE Copyright  1998, Texas Instruments Incorporated All Rights Reserved Use of Frequency Domain Telecommunication Channel |A| f fcfc Frequency.
Polynomial and FFT. Topics 1. Problem 2. Representation of polynomials 3. The DFT and FFT 4. Efficient FFT implementations 5. Conclusion.
Instructor Neelima Gupta Table of Contents Divide and Conquer.
Dr. Deshi Ye Divide-and-conquer Dr. Deshi Ye
Instructor: Shengyu Zhang 1. Example 1: Merge sort 2.
Fast Fourier Transform Lecture 6 Spoken Language Processing Prof. Andrew Rosenberg.
FFT1 The Fast Fourier Transform. FFT2 Outline and Reading Polynomial Multiplication Problem Primitive Roots of Unity (§10.4.1) The Discrete Fourier Transform.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Parallel Programming in C with MPI and OpenMP Michael J. Quinn.
Administrative Oct. 2 Oct. 4 – QUIZ #2 (pages of DPV)
Richard Fateman CS 282 Lecture 101 The Finite-Field FFT Lecture 10.
CSE 421 Algorithms Richard Anderson Lecture 15 Fast Fourier Transform.
Fast Fourier Transform. Agenda Historical Introduction CFT and DFT Derivation of FFT Implementation.
FFT(Fast Fourier Transform). p2. FFT Coefficient representation: How to evaluate A(x 0 )?
FFT1 The Fast Fourier Transform by Jorge M. Trabal.
Princeton University COS 423 Theory of Algorithms Spring 2002 Kevin Wayne Fast Fourier Transform Jean Baptiste Joseph Fourier ( ) These lecture.
Reconfigurable Computing S. Reda, Brown University Reconfigurable Computing (EN2911X, Fall07) Lecture 16: Application-Driven Hardware Acceleration (1/4)
N. Karampetakis, S. Vologiannidis
CSE 421 Algorithms Richard Anderson Lecture 13 Divide and Conquer.
ON MULTIVARIATE POLYNOMIAL INTERPOLATION
The Fourier series A large class of phenomena can be described as periodic in nature: waves, sounds, light, radio, water waves etc. It is natural to attempt.
Fast Fourier Transform Irina Bobkova. Overview I. Polynomials II. The DFT and FFT III. Efficient implementations IV. Some problems.
1 How to Multiply Slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved. integers, matrices, and polynomials.
1 Chapter 5 Divide and Conquer Slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved.
CS 6068 Parallel Computing Fall 2013 Lecture 10 – Nov 18 The Parallel FFT Prof. Fred Office Hours: MWF.
FFT USING OPEN-MP Done by: HUSSEIN SALIM QASIM & Tiba Zaki Abdulhameed
1 Divide & Conquer Algorithms Part 4. 2 Recursion Review A function that calls itself either directly or indirectly through another function Recursive.
FFT1 The Fast Fourier Transform. FFT2 Outline and Reading Polynomial Multiplication Problem Primitive Roots of Unity (§10.4.1) The Discrete Fourier Transform.
5.6 Convolution and FFT. 2 Fast Fourier Transform: Applications Applications. n Optics, acoustics, quantum physics, telecommunications, control systems,
The Fast Fourier Transform
Karatsuba’s Algorithm for Integer Multiplication
Applied Symbolic Computation1 Applied Symbolic Computation (CS 300) Karatsuba’s Algorithm for Integer Multiplication Jeremy R. Johnson.
The Fast Fourier Transform and Applications to Multiplication
Inverse DFT. Frequency to time domain Sometimes calculations are easier in the frequency domain then later convert the results back to the time domain.
Motivation: Wavelets are building blocks that can quickly decorrelate data 2. each signal written as (possibly infinite) sum 1. what type of data? 3. new.
7- 1 Chapter 7: Fourier Analysis Fourier analysis = Series + Transform ◎ Fourier Series -- A periodic (T) function f(x) can be written as the sum of sines.
1 Fast Polynomial and Integer Multiplication Jeremy R. Johnson.
Professor A G Constantinides 1 Discrete Fourier Transforms Consider finite duration signal Its z-tranform is Evaluate at points on z-plane as We can evaluate.
Fast Fourier Transforms. 2 Discrete Fourier Transform The DFT pair was given as Baseline for computational complexity: –Each DFT coefficient requires.
Applied Symbolic Computation1 Applied Symbolic Computation (CS 567) The Fast Fourier Transform (FFT) and Convolution Jeremy R. Johnson TexPoint fonts used.
May 9, 2001Applied Symbolic Computation1 Applied Symbolic Computation (CS 680/480) Lecture 6: Multiplication, Interpolation, and the Chinese Remainder.
week 8Complexity of Algorithms1 Elementary Number Theory Given positive integers a and b, we use the notation a¦b to indicated that a divides b, i.e.,
Discrete Fourier Transform
Chapter 2 Divide-and-Conquer algorithms
An Iterative FFT We rewrite the loop to calculate nkyk[1] once
Chapter 2 Divide-and-Conquer algorithms
Lecture 16 Fast Fourier Transform
Data Structures and Algorithms (AT70. 02) Comp. Sc. and Inf. Mgmt
Polynomial + Fast Fourier Transform
Divide-and-Conquer Design
Applied Symbolic Computation
September 4, 1997 Applied Symbolic Computation (CS 300) Fast Polynomial and Integer Multiplication Jeremy R. Johnson.
Applied Symbolic Computation
Polynomials and the FFT(UNIT-3)
Applied Symbolic Computation
DFT and FFT By using the complex roots of unity, we can evaluate and interpolate a polynomial in O(n lg n) An example, here are the solutions to 8 =
September 4, 1997 Applied Symbolic Computation (CS 300) Fast Polynomial and Integer Multiplication Jeremy R. Johnson.
The Fast Fourier Transform
Advanced Algorithms Analysis and Design
Z TRANSFORM AND DFT Z Transform
Applied Symbolic Computation
Applied Symbolic Computation
September 4, 1997 Applied Symbolic Computation (CS 567) Fast Polynomial and Integer Multiplication Jeremy R. Johnson.
Chapter 9 Computation of the Discrete Fourier Transform
Chapter 5 Divide and Conquer
Applied Symbolic Computation
The Fast Fourier Transform
Applied Symbolic Computation
Fast Polynomial and Integer Multiplication
Presentation transcript:

Introduction to Algorithms Polynomials and the FFT My T. Thai @ UF

Polynomials A polynomial in the variable x: Polynomial addition Polynomial multiplication where My T. Thai mythai@cise.ufl.edu

Representing polynomials A coefficient representation of a polynomial d of degree bound n is a vector of coefficients Horner’s rule to compute A(x0) Time: O(n) Given a = , b = Sum: c = a + b, takes O(n) time Product: c = (convolution of a and b), takes O(n2) time My T. Thai mythai@cise.ufl.edu

Representing polynomials A point-value representation of a polynomial A(x) of degree-bound n is a set of n point-value pairs d All of the xk are distinct Proof: Da = y |D| = => a = D-1y Vandermonde matrix My T. Thai mythai@cise.ufl.edu

Operations in point-value representation B : Addition: C: Multiplication: Extend A, B to 2n points: Product: My T. Thai mythai@cise.ufl.edu

Fast multiplication of polynomials in coefficient form Evaluation: coefficient representation  point-value representation Interpolation: point-value representation coefficient form of a polynomial My T. Thai mythai@cise.ufl.edu

Compute evaluation and interpolation Evaluation: using Horner method takes O(n2) => not good Interpolation: computing inversion of Vandermonde matrix takes O(n3) time => not good How to complete evaluation and interpolation in O(n log n) time? Choose evaluation points: complex roots of unity Use Discrete Fourier Transform for evaluation Use inverse Discrete Fourier Transform for interpolation My T. Thai mythai@cise.ufl.edu

Complex roots of unity A complex nth root of unity is a complex number such that There are exactly n complex nth roots of unity Principal nth root of unity All other complex nth roots of unity are powers of My T. Thai mythai@cise.ufl.edu

Properties of unity’s Complex roots Proof: My T. Thai mythai@cise.ufl.edu

Halving lemma Proof: Cancellation lemma: My T. Thai mythai@cise.ufl.edu

Summation lemma Proof: Note: k is not divisible by n only when k is divisible by n My T. Thai mythai@cise.ufl.edu

Discrete Fourier Transform Given: The values of A at evaluation points Vector is discrete Fourier transform (DFT) of the coefficient vector d . Denote My T. Thai mythai@cise.ufl.edu

Fast Fourier Transform Divide A into two polynomials based on the even-indexed and odd-indexed coefficients: Combine: Evaluation points of A[0] and A[1] are actually the n/2th roots of unity My T. Thai mythai@cise.ufl.edu

Fast Fourier Transform Time: My T. Thai mythai@cise.ufl.edu

Inversion of Vandermonde matrix Proof: My T. Thai mythai@cise.ufl.edu

Interpolation at the complex roots of unity Compute by modifying FFT algorithm Switch the roles of a and y Replace Divide each element by n My T. Thai mythai@cise.ufl.edu

FFT and Polynomial mutiplication My T. Thai mythai@cise.ufl.edu

Efficient FFT implementations Line 10 – 12: change the loop to compute only once storing it in t ( Butterfly operation) Butterfly operation My T. Thai mythai@cise.ufl.edu

Structure of RECURSIVE-FFT Each RECURSIVE-FFT invocation makes two recursive calls Arrange the elements of a into the order in which they appear in the leaves ( take log n for each element) Compute bottom up My T. Thai mythai@cise.ufl.edu

An iterative FFT implementation Time: My T. Thai mythai@cise.ufl.edu

A parallel FFT circuit My T. Thai mythai@cise.ufl.edu