Polynomial Multiplication and Fast Fourier Transform

Similar documents
Lecture 3: Divide and Conquer: Fast Fourier Transform

Let A(x) and B(x) be two polynomials of degree n 1:

The Discrete Fourier Transform

Algorithms and Data Structures 2014 Exercises and Solutions Week 13

FFTs in Graphics and Vision. The Fast Fourier Transform

3. Z Transform. Recall that the Fourier transform (FT) of a DT signal xn [ ] is ( ) [ ] = In order for the FT to exist in the finite magnitude sense,

MAXIMALLY FLAT FIR FILTERS

Properties and Tests of Zeros of Polynomial Functions

Complex Numbers Solutions

ECE-S352 Introduction to Digital Signal Processing Lecture 3A Direct Solution of Difference Equations

1 Generating functions for balls in boxes

TMA4205 Numerical Linear Algebra. The Poisson problem in R 2 : diagonalization methods

Intensive Algorithms Lecture 11. DFT and DP. Lecturer: Daniel A. Spielman February 20, f(n) O(g(n) log c g(n)).

Fall 2011, EE123 Digital Signal Processing

Divide & Conquer. Divide-and-conquer algorithms. Conventional product of polynomials. Conventional product of polynomials.

CSE Introduction to Parallel Processing. Chapter 3. Parallel Algorithm Complexity

The z-transform. 7.1 Introduction. 7.2 The z-transform Derivation of the z-transform: x[n] = z n LTI system, h[n] z = re j

Lecture 3. Digital Signal Processing. Chapter 3. z-transforms. Mikael Swartling Nedelko Grbic Bengt Mandersson. rev. 2016

Chapter 4. Fourier Series

Frequency Domain Filtering

4.3 Growth Rates of Solutions to Recurrences

Recursive Algorithms. Recurrences. Recursive Algorithms Analysis

ACCELERATING CONVERGENCE OF SERIES

Analysis of Algorithms. Introduction. Contents

Recursive Algorithm for Generating Partitions of an Integer. 1 Preliminary

Finite-length Discrete Transforms. Chapter 5, Sections

NICK DUFRESNE. 1 1 p(x). To determine some formulas for the generating function of the Schröder numbers, r(x) = a(x) =

The Method of Least Squares. To understand least squares fitting of data.

CSI 2101 Discrete Structures Winter Homework Assignment #4 (100 points, weight 5%) Due: Thursday, April 5, at 1:00pm (in lecture)

The picture in figure 1.1 helps us to see that the area represents the distance traveled. Figure 1: Area represents distance travelled

LESSON 2: SIMPLIFYING RADICALS

Algorithms Design & Analysis. Divide & Conquer

Ellipsoid Method for Linear Programming made simple

Recurrence Relations

A widely used display of protein shapes is based on the coordinates of the alpha carbons - - C α

w (1) ˆx w (1) x (1) /ρ and w (2) ˆx w (2) x (2) /ρ.

Section 1.1. Calculus: Areas And Tangents. Difference Equations to Differential Equations

(3) If you replace row i of A by its sum with a multiple of another row, then the determinant is unchanged! Expand across the i th row:

APPENDIX F Complex Numbers

Warped, Chirp Z-Transform: Radar Signal Processing

Generating Functions for Laguerre Type Polynomials. Group Theoretic method

PAPER : IIT-JAM 2010

Zeros of Polynomials

3.2 Properties of Division 3.3 Zeros of Polynomials 3.4 Complex and Rational Zeros of Polynomials

Optimum LMSE Discrete Transform

Numerical Conformal Mapping via a Fredholm Integral Equation using Fourier Method ABSTRACT INTRODUCTION

SECTION 1.5 : SUMMATION NOTATION + WORK WITH SEQUENCES

Signals & Systems Chapter3

Chapter 8. DFT : The Discrete Fourier Transform

Algebra II Notes Unit Seven: Powers, Roots, and Radicals

Session 5. (1) Principal component analysis and Karhunen-Loève transformation

RADICAL EXPRESSION. If a and x are real numbers and n is a positive integer, then x is an. n th root theorems: Example 1 Simplify

Some remarks for codes and lattices over imaginary quadratic

Algorithms and Data Structures Lecture IV

Math 104: Homework 2 solutions

Discrete-Time Systems, LTI Systems, and Discrete-Time Convolution

EE422G Homework #13 (12 points)

Classroom. We investigate and further explore the problem of dividing x = n + m (m, n are coprime) sheep in

2D DSP Basics: 2D Systems

CS 5150/6150: Assignment 1 Due: Sep 23, 2010

Practical Spectral Anaysis (continue) (from Boaz Porat s book) Frequency Measurement

CS:3330 (Prof. Pemmaraju ): Assignment #1 Solutions. (b) For n = 3, we will have 3 men and 3 women with preferences as follows: m 1 : w 3 > w 1 > w 2

The Choquet Integral with Respect to Fuzzy-Valued Set Functions

Bijective Proofs of Gould s and Rothe s Identities

C. Complex Numbers. x 6x + 2 = 0. This equation was known to have three real roots, given by simple combinations of the expressions

CHAPTER I: Vector Spaces

11. FINITE FIELDS. Example 1: The following tables define addition and multiplication for a field of order 4.

Q-BINOMIALS AND THE GREATEST COMMON DIVISOR. Keith R. Slavin 8474 SW Chevy Place, Beaverton, Oregon 97008, USA.

Math 155 (Lecture 3)

Lecture 2: Monte Carlo Simulation

f(x) dx as we do. 2x dx x also diverges. Solution: We compute 2x dx lim

Introduction to Digital Signal Processing

, then cv V. Differential Equations Elements of Lineaer Algebra Name: Consider the differential equation. and y2 cos( kx)

6 Integers Modulo n. integer k can be written as k = qn + r, with q,r, 0 r b. So any integer.

Ray-triangle intersection

A GENERALIZATION OF THE SYMMETRY BETWEEN COMPLETE AND ELEMENTARY SYMMETRIC FUNCTIONS. Mircea Merca

CHAPTER 5. Theory and Solution Using Matrix Techniques

Number of fatalities X Sunday 4 Monday 6 Tuesday 2 Wednesday 0 Thursday 3 Friday 5 Saturday 8 Total 28. Day

Discrete Orthogonal Moment Features Using Chebyshev Polynomials

Time-Domain Representations of LTI Systems

Right circulant matrices with ratio of the elements of Fibonacci and geometric sequence

Matrix Algebra 2.2 THE INVERSE OF A MATRIX Pearson Education, Inc.

Filter banks. Separately, the lowpass and highpass filters are not invertible. removes the highest frequency 1/ 2and

TEACHER CERTIFICATION STUDY GUIDE

Polynomial identity testing and global minimum cut

The Discrete Fourier Transform

COMM 602: Digital Signal Processing

Lecture 2 Clustering Part II

Lesson 10: Limits and Continuity

MAT 271 Project: Partial Fractions for certain rational functions

September 2012 C1 Note. C1 Notes (Edexcel) Copyright - For AS, A2 notes and IGCSE / GCSE worksheets 1

Section 1 of Unit 03 (Pure Mathematics 3) Algebra

Classification of problem & problem solving strategies. classification of time complexities (linear, logarithmic etc)

CALCULATION OF FIBONACCI VECTORS

Exponents. Learning Objectives. Pre-Activity

Inverse Matrix. A meaning that matrix B is an inverse of matrix A.

(3) If you replace row i of A by its sum with a multiple of another row, then the determinant is unchanged! Expand across the i th row:

On the Lebesgue constant for the Xu interpolation formula

Sequences, Mathematical Induction, and Recursion. CSE 2353 Discrete Computational Structures Spring 2018

SOLUTIONS TO PRISM PROBLEMS Junior Level 2014

Transcription:

Polyomial Multiplicatio ad Fast Fourier Trasform Com S 477/577 Notes Ya-Bi Jia Sep 19, 2017 I this lecture we will describe the famous algorithm of fast Fourier trasform FFT, which has revolutioized digital sigal processig ad i may ways chaged our life It was listed by the Sciece magazie as oe of the te greatest algorithms i the 20th cetury Here we will lear FFT i the cotext of polyomial multiplicatio, ad later o ito the semester reveal its coectio to Fourier trasform Suppose we are give two polyomials: Their product is defied by where px = a 0 +a 1 x+ +a 1 x 1, qx = b 0 +b 1 x+ +b 1 x 1 px qx = c 0 +c 1 x+ c 2 2 x 2 2 c i = max{0,i 1} k mi{i, 1} a k b i k I computig the product polyomial, every a i is multiplied with every b j, for 0 i,j 1 So there are at most 2 multiplicatios, give that some of the coefficiets may be zero Obtaiig every c i ivolves oe fewer additios tha multiplicatios Sothere are at most 2 2+1additios ivolved I short, the umber of arithmetic operatios is O 2 This is hardly efficiet But ca we obtai the product more efficietly? The aswer is yes, by the use of a well-kow method called fast Fourier trasform, or simply, FFT 1 Discrete Fourier Trasform Let us start with itroducig the discrete Fourier trasform DFT problem Deote by ω a th complex root of 1, that is, ω = e i2π, where i 2 = 1 DFT is the mappig betwee two vectors: a 0 â 0 a 1 a = â = â 1 a 1 â 1 1

such that 1 â j = a k ω jk, k=0 It ca also be writte as a matrix equatio: 1 1 1 1 1 ω ω 2 ω 1 1 ω 1 ω 2 1 ω 12 j = 0,, 1 a 0 a 1 a 1 The matrix above is a Vadermode matrix ad deoted by V Essetially, DFT evaluates the polyomial px = a 0 +a 1 x+ +a 1 x 1 = â 0 â 1 â 1 at poits ω 0,ω1,,ω 1 ; i other words, â k = pω k for 0 k 1 From ow o we assume that is a power of 2 If ot, we ca always add i higher order terms with zero coefficiets a = a +1 = = a 2 log 2 1 = 0 The powers of ω are illustrated i the complex plae i the followig figure yi ω /4+1 i ω /4 1 ω /2 1 ω 1 ω /2+1 1 ω 1 x ω 3/4 1 i ω 3/4+1 The fast Fourier trasform algorithm cleverly makes use of the followig properties about ω : ω = 1, ω +k = ω k, ω 2 = 1, ω 2 +k = ω k 2

It uses a divide-ad-coquer strategy More specifically, it divides px ito two polyomials p 0 x ad p 1 x, both of degree 2 1; amely, Hece p 0 x = a 0 +a 2 x+ +a 2 x 2 1, p 1 x = a 1 +a 3 x+ +a 1 x 2 1 I this way the problem of evaluatig px at ω 0,,ω 1 1 evaluatig p 0 x ad p 1 x at ω 0 2, ω 1 2,, ω 1 2, 2 combiig the resultig accordig to 1 px = p 0 x 2 +xp 1 x 2 1 breaks dow ito two steps: Note that the list ω 02, ω 12,, ω 1 2 cosists of oly 2 complex roots of uity, ie, ω,ω 0,,ω 2 2 So the subproblems of evaluatig p 0 x ad p 1 x have exactly the same form as the origial problem of evaluatig px, oly at half the size This decompositio forms the basis for the recursive FFT algorithm preseted below Recursive-DFTa, 1 if = 1 2 the retur a 3 w e i2π 4 w 1 5 a [0] a 0,a 2,,a 2 6 a [1] a 1,a 3,,a 1 7 â [0] Recursive-DFTa [0], 2 8 â [1] Recursive-DFTa [1], 2 9 for k = 0 to 2 1 do 10 â k â [0] k +ωâ[1] k 11 â k+ â[0] 2 k ωâ[1] k 12 ω ωω 13 retur â 0,â 1,,â 1 To verify the correctess, we here uderstad lie 11 i the procedure Recursive-DFT: â k+ 2 = â[0] k ωâ[1] k At the kth iteratio of the for loop of lies 9 12, ω = ω k We have â k+ 2 = â [0] k ωk â [1] k = â [0] = p 0 = p 0 = p k +ωk+ 2 â [1] k ω 2k ω 2k+ ω k+ 2 +ω k+ 2 p 1 ω 2k +ω k+ 2 p 1, from 1 ω 2k+ 3

Let T be the ruig time of Recursive-DFT Steps 1 6 take time Θ Steps 7 ad 8 each takes time T 2 Steps 9 13 take time Θ So we ed up with the recurrece T = 2T +Θ, 2 which has the solutio T = Θlog 2 2 Iverse DFT Suppose we eed to compute the iverse Fourier trasform give by a = V 1 â Namely, we would like to determie the coefficiets of the polyomial px = a 0 + +a 1 x 1 give its values at ω,,ω 0 1 Ca we do it with the same efficiecy, that is, i time Θlog? The aswer is yes To see why, ote that the Vadermode matrix V has iverse 1 1 1 1 V 1 = 1 1 ω 1 ω 2 ω 1 1 ω 1 ω 2 1 ω 12 To verify the above, make use of the equatio 1 j=0 ωk j = 0 for o-egative iteger k ot divisible by Based o the above observatio, we ca still apply Recursive-DFT by replacig a with â, â with a, ω with ω 1 that is, ω 1, ad scalig the result by 1 3 Fast Multiplicatio of Two Polyomials Let us ow go back to the two polyomials at the begiig: Their product px = a 0 +a 1 x+ +a 1 x 1, qx = b 0 +b 1 x+ +b 1 x 1 p qx = px qx = c 0 +c 1 x+ c 2 2 x 2 2 ca be computed by combiig FFT with iterpolatio The computatio takes time Θ log ad cosists of the followig three steps: 1 Evaluatepxadqxat2poitsω 0 2,,ω2 1 2 usigdftthissteptakestimeθlog 4

2 Obtai the values of pxqx at these 2 poits through poitwise multiplicatio This step takes time Θ p qω 0 2 = pω 0 2 qω 0 2, p qω 1 2 = pω1 2 qω1 2, p qω 2 1 2 = pω 2 1 2 qω 2 1 2 3 Iterpolate the polyomial p q at the product values usig iverse DFT to obtai coefficiets c 0,c 1,,c 2 2 This last step requires time Θlog We ca also use FFT to compute the covolutio of two vectors a = a 0,,a 1 ad b = b 0,,b 1, which is defied as a vector c = c 0,,c 1 where j c j = a k b j k, k=0 j = 0,, 1 The ruig time is agai Θlog 4 History of FFT Moder FFT is widely credited to the paper [2] by Cooley ad Tukey But the algorithm had bee discovered idepedetly by a few idividuals i the past Oly the appearace of digital computers ad the wide applicatio of sigal processig made people realize the importace of fast computatio of large Fourier series A icomplete list of pioeers icludes Gauss 1805 the earliest kow origi of the FFT algorithm Ruge ad Köig 1924 the doublig algorithm Daielso ad Laczos 1942 divide-ad-coquer o DFTs Rudick 1960s the first computer program implemetatio with O log time Refereces [1] T H Corme et al Itroductio to Algorithms McGraw-Hill, Ic, 2d editio, 2001 [2] J W Cooley ad J W Tukey A algorithm for the machie calculatio of complex Fourier series Mathematics of Computatio, 1990:297-301, 1965 5