The Discrete Fourier Transform

Similar documents
Algorithms and Data Structures 2014 Exercises and Solutions Week 13

Lecture 3: Divide and Conquer: Fast Fourier Transform

APPENDIX F Complex Numbers

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

Appendix F: Complex Numbers

Polynomial Multiplication and Fast Fourier Transform

CHAPTER I: Vector Spaces

Zeros of Polynomials

(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:

TEACHER CERTIFICATION STUDY GUIDE

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

Complex Analysis Spring 2001 Homework I Solution

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

Properties and Tests of Zeros of Polynomial Functions

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

2 Geometric interpretation of complex numbers

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

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

CHAPTER 5. Theory and Solution Using Matrix Techniques

1 Last time: similar and diagonalizable matrices

(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:

Chapter 4. Fourier Series

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

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,

Math 475, Problem Set #12: Answers

MAT 271 Project: Partial Fractions for certain rational functions

Infinite Sequences and Series

Quantum Computing Lecture 7. Quantum Factoring

CSE 1400 Applied Discrete Mathematics Number Theory and Proofs

Recursive Algorithms. Recurrences. Recursive Algorithms Analysis

REVISION SHEET FP1 (MEI) ALGEBRA. Identities In mathematics, an identity is a statement which is true for all values of the variables it contains.

1 Generating functions for balls in boxes

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

Complex Numbers Solutions

Lemma Let f(x) K[x] be a separable polynomial of degree n. Then the Galois group is a subgroup of S n, the permutations of the roots.

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

SNAP Centre Workshop. Basic Algebraic Manipulation

Bertrand s Postulate

Lecture 8: October 20, Applications of SVD: least squares approximation

6.3 Testing Series With Positive Terms

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

Apply change-of-basis formula to rewrite x as a linear combination of eigenvectors v j.

1. By using truth tables prove that, for all statements P and Q, the statement

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

Determinants of order 2 and 3 were defined in Chapter 2 by the formulae (5.1)

CALCULATION OF FIBONACCI VECTORS

15.083J/6.859J Integer Optimization. Lecture 3: Methods to enhance formulations

FFTs in Graphics and Vision. The Fast Fourier Transform

REVISION SHEET FP1 (MEI) ALGEBRA. Identities In mathematics, an identity is a statement which is true for all values of the variables it contains.

We are mainly going to be concerned with power series in x, such as. (x)} converges - that is, lims N n

a for a 1 1 matrix. a b a b 2 2 matrix: We define det ad bc 3 3 matrix: We define a a a a a a a a a a a a a a a a a a

4 The Sperner property.

NUMERICAL METHODS FOR SOLVING EQUATIONS

Math 61CM - Solutions to homework 3

Eigenvalues and Eigenvectors

a for a 1 1 matrix. a b a b 2 2 matrix: We define det ad bc 3 3 matrix: We define a a a a a a a a a a a a a a a a a a

Math 155 (Lecture 3)

THE ASYMPTOTIC COMPLEXITY OF MATRIX REDUCTION OVER FINITE FIELDS

Mon Feb matrix inverses. Announcements: Warm-up Exercise:

Seunghee Ye Ma 8: Week 5 Oct 28

n m CHAPTER 3 RATIONAL EXPONENTS AND RADICAL FUNCTIONS 3-1 Evaluate n th Roots and Use Rational Exponents Real nth Roots of a n th Root of a

62. Power series Definition 16. (Power series) Given a sequence {c n }, the series. c n x n = c 0 + c 1 x + c 2 x 2 + c 3 x 3 +

MAXIMALLY FLAT FIR FILTERS

3 Gauss map and continued fractions

Recurrence Relations

In algebra one spends much time finding common denominators and thus simplifying rational expressions. For example:

In number theory we will generally be working with integers, though occasionally fractions and irrationals will come into play.

[ 11 ] z of degree 2 as both degree 2 each. The degree of a polynomial in n variables is the maximum of the degrees of its terms.

Application of Jordan Canonical Form

Addition: Property Name Property Description Examples. a+b = b+a. a+(b+c) = (a+b)+c

(A sequence also can be thought of as the list of function values attained for a function f :ℵ X, where f (n) = x n for n 1.) x 1 x N +k x N +4 x 3

Chapter 7: The z-transform. Chih-Wei Liu

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

6.003 Homework #3 Solutions

Definitions and Theorems. where x are the decision variables. c, b, and a are constant coefficients.

Ma 530 Introduction to Power Series

Theorem: Let A n n. In this case that A does reduce to I, we search for A 1 as the solution matrix X to the matrix equation A X = I i.e.

M A T H F A L L CORRECTION. Algebra I 1 4 / 1 0 / U N I V E R S I T Y O F T O R O N T O

Test One (Answer Key)

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

Analysis of Algorithms. Introduction. Contents

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

Linear Regression Demystified

4.3 Growth Rates of Solutions to Recurrences

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

lim za n n = z lim a n n.

CALCULATING FIBONACCI VECTORS

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

Beurling Integers: Part 2

Sequences A sequence of numbers is a function whose domain is the positive integers. We can see that the sequence

For a 3 3 diagonal matrix we find. Thus e 1 is a eigenvector corresponding to eigenvalue λ = a 11. Thus matrix A has eigenvalues 2 and 3.

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

x c the remainder is Pc ().

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

Fall 2011, EE123 Digital Signal Processing

Randomized Algorithms I, Spring 2018, Department of Computer Science, University of Helsinki Homework 1: Solutions (Discussed January 25, 2018)

SEQUENCE AND SERIES NCERT

Solutions to Final Exam Review Problems

Polynomial Functions and Their Graphs

Appendix: The Laplace Transform

Transcription:

The Discrete Fourier Trasform Complex Fourier Series Represetatio Recall that a Fourier series has the form a 0 + a k cos(kt) + k=1 b k si(kt) This represetatio seems a bit awkward, sice it ivolves two differet ifiite series We remedy this by represetig a Fourier series with complex umbers To begi, recall the idetity Moreover, settig θ = kt, we have k=1 e iθ = cos θ + i si θ e ikt = cos kt + i si kt, for ay iteger k Thus e ikt has the ability to iclude both cosies ad sies, ad thus seems like a good cadidate for represetig a Fourier series as a sigle series Now cosider the series c k e ikt k=0 If we allow for c k = a k ib k to be a complex umber, the the k th term of the series evaluates to (a k ib k )(cos kt + i si kt) = (a k cos kt + b k si kt) + i(a k si kt b k cos kt) Notice how the real part a k cos kt + b k si kt provides the coefficiets of the origial Fourier series However, there is also the imagiary part (a k si kt b k cos kt) which is problematic, sice we still wat the output of the series to be real-valued, sice i practice the sigals are real valued Moreover, sice the sie ad cosie fuctios are collectively liearly idepedet, the imagiary part will oly vaish if all of the coefficiets are zero, but this would also cause the real part to vaish! For this reaso we must also add the cojugate terms of the form c k e ikt, for k = 1, 2, This gives the series c k e ikt, k= 1

which is a sigle series, but ow ifiite i both directios If c = a + bi is a complex umber, the c = a bi is called the cojugate of c Propositio 1 If c k = c k, the, for all t R, the Fourier series c k e ikt k= is real valued Proof of Propositio 1 We have c k e ik = (a k ib k )(cos kt + i si kt) = (a k cos kt + b k si kt) + i(a k si kt b k cos kt), while c k e ik = c k e ik = (a k + ib k )(cos kt i si kt) = (a k cos kt + b k si kt) i(a k si kt b k cos kt) Fially, addig the two equatios yields c k e ik + c k e ik = 2(a k cos kt + b k si kt) Notice i the proof of Propositio 1 that c k e ik = c k e ikt = c k e ik I geeral, if c ad d are complex umbers, the cd = cd From here oward we call the Fourier series of Propositio 1 the complex-valued Fourier series, or complex Fourier series for short Moreover, a th degree complex trigoometric polyomial is oe of the form p(t) = c k e ikt k= Roots of Uity Suppose our goal is to obtai a Fourier approximatio of a sigal E(t) I practice, we do ot have access to a rule or equatio that describes E(t), ad ca oly come to kow it by samplig it at differet values of t From the previous lecture we may assume, by choosig a appropriate time scale, that E(t) is periodic over the iterval [0, 2π] Moreover, suppose that samples are take, ad startig at t = 0, a sample is take oce every 2π/ secods The the samplig times are at t = 2πj, 2

for j = 0,, 1 These samplig times have a iterestig mathematical property Namely that, for each j = 0,, 1, e 2πij is a complex th root of uity, meaig that e ( 2πij ) = e 2πij = cos(2πj) + i si(2πj) = 1 Example 1 Determie the a) complex 4th roots of uity, ad b) complex 6th roots of uity The ext propositio shows that e 2πij, j = 0,, 1, are the oly uique powers of e 2πi Propositio 2 For itegers j ad k satisfyig j k mod, the e 2πij = e 2πik Proof of Propositio 2 Assume j k mod The k = q + j, for some iteger q The e 2πik = e 2πi(j+q) = e 2πij 2πiq e = e 2πij e 2πiq = e 2πij 1 = e 2πij Propositio 2 allows us to defie the Abelia group whose elemets are the th roots of uity, with multiplicatio as additio Moreover, e 2πij 2πik e = e 2πi(j+k) Moreover, the additio is associative sice multiplyig two roots of uity is idetical to iteger additio (eg addig j with k) which is associative Also, 1 is the idetity elemet, ad the (additive) iverse of e 2πij i i mod is e 2πi( j) Aother way of writig the iverse of e 2πij is e 2πij This is valid, sice For simplicity, we deote the j th power of the th root of uity e 2πij by ω j Moreover, ω j deotes the iverse of ω j I geeral, for ay iteger k, ω k is defied as beig equal to ω j j k mod 3

Example 2 For the 6th roots of uity, determie the iverse of each group elemet, ad verify that (a + bi)(a + bi) 1 = 1 through direct multiplicatio Polyomial Iterpolatio Our goal i this sectio is to develop a framework for solvig the followig problem Suppose we sample our sigal E(t) at differet time values t 0,, t 1, ad obtai the measuremets y 0 = E(t 0 ),, y 1 = E(t 1 ) Problem: fid the trigoometric polyomial that best fits these measuremets It turs out that if we sample at times 2πj, where j = 0,, 1, ad limit the polyomial approximatio to havig degree 1, the there is a uique ( 1) th degree trigoometric polyomial that fits the measuremets Before gettig ito the details of solvig the above problem, cosider the related problem: give poits (x 0, y 0 ),, (x 1, y 1 ) havig distict x values, determie the coefficiets c 0, c 1 of a ( 1)-degree polyomial p(x) = c 0 + c 1 x + + c 1 x 1, for which p(x i ) = y i for all i = 0,, 1 Fidig a degree 1 polyomial that agrees with each of the data poit is called polyomial iterpolatio We ow show that there is a uique 1-degree polyomial that fits the data Ideed, if the above p(x) is the desired polyomial, the p(x i ) = y i for all i = 0,, 1, implies the followig system of liear equatios c 0 + c 1 x 0 + c 2 x 2 0 + + c 1 x 1 0 = y 0 4

which has the coefficiet matrix c 0 + c 1 x 1 + c 2 x 2 1 + + c 1 x 1 1 = y 0, 1 x 0 x 2 0 x 1 0 1 x 1 x 2 1 x 1 1 The above matrix is called the -dimesioal Vadermode matrix, i hoor of Alexadre-Thophile Vadermode The fact that this matrix is always ivertible, ad hece yields a uique solutio, is a special case of the followig theorem Theorem 1 Let p 1 (x),, p 1 (x) be a sequece of polyomials for which p i (x) has degree i, i = 1,, 1 The if x 0,, x 1 are distict complex umbers, the the matrix 1 p 1 (x 0 ) p 2 (x 0 ) p 1 (x 0 ) 1 p 1 (x 1 ) p 2 (x 1 ) p 1 (x 1 ) is ivertible To prove Theorem 1, we eed the followig two lemmas Lemma 1 Assumig x y, The polyomial x j y j is divisible by x y, for all itegers j 1 Proof of Lemma 1 Oe ca verify through multiplicatio that x j y j = (x y)(x j 1 + x j 2 y + x j 3 y 2 + + x 2 y j 3 + xy j 2 + y j 1 ) Thereofre, x y is a factor of x j y j ; ie, x j y j is divisible by x y Lemma 2 Let p 1 (x) be a liear polyomial, ad p j (x) be a degree j polyomial, where j 1 The, for ay costat x 0, (p j (x) p j (x 0 ))/(p 1 (x) p 1 (x 0 )) is a degree j 1 polyomial Proof of Lemma 2 Suppose where c 0,, c j are complex umbers The p j (x) = c 0 + c 1 x + + c j x j, p j (x) p j (x 0 ) = (c 0 + c 1 x + + c j x j ) (c 0 + c 1 x 0 + + c j x j 0) = c j (x j x j 0) + + c 1 (x x 0 ) Thus, sice each term of p j (x) p j (x 0 ) has a factor of the form (x i x i 0), i = 1,, j, it follows by Lemma 1 that p j (x) p j (x 0 ) is divisible by (x x 0 ) Moreover, sice p 1 (x) p 1 (x 0 ) = a(x x 0 ), for some ozero complex umber a, it follows that p j (x) p j (x 0 ) is divisible by p 1 (x) p 1 (x 0 ), ad, from the proof of Lemma 1, the quotiet is a degree j 1 polyomial 5

Proof of Theorem 1 The proof uses iductio o Assume the rows ad colums are umbered startig with idex 0 Basis Step: = 2 The 1 = 1, ad the matrix is ( ) 1 p1 (x 0 ) 1 p 1 (x 1 ) The the elemetary row operatio r 1 r 1 r 0 yields the ew matrix ( ) 1 p1 (x 0 ) 0 p 1 (x 1 ) p 1 (x 0 ) Sice p 1 (x) = ax + b, where a 0, etry a 01 of the above matrix is ax 1 ax 0 = a(x 1 x 0 ) 0, sice x 1 x 0 Therefore the subsequet row operatios r 1 1 a 01 r 1 ad r 0 r 0 p 1 (x 0 )r 1 produces the idetity matrix Iductive Step: Assume the theorem is true for all values of up to some value 0, where 0 2 We ow show it is also true for the value 0 + 1 Let = 0 The it must be show that the matrix 1 p 1 (x 0 ) p 2 (x 0 ) p 1 (x 0 ) p (x 0 ) 1 p 1 (x 1 ) p 2 (x 1 ) p 1 (x 1 ) p (x 1 ) 1 p 1 (x ) p 2 (x ) p 1 (x ) p (x ) is ivertible, where x 0,, x 1, x are distict complex umbers Usig Gauss-Jorda elimiatio, for each row r i, i = 1,,, perform the operatio r i r i r 0 This has the effect of placig zeros i rows 1 through of colum 0 The matrix is ow 1 p 1 (x 0 ) p 2 (x 0 ) p 1 (x 0 ) p (x 0 ) 0 p 1 (x 1 ) p 1 (x 0 ) p 2 (x 1 ) p 2 (x 0 ) p 1 (x 1 ) p 1 (x 0 ) p (x 1 ) p (x 0 ) 0 p 1 (x ) p 1 (x 0 ) p 2 (x ) p 2 (x 0 ) p 1 (x ) p 1 (x 0 ) p (x ) p (x 0 ) For the momet, igore row 0 ad colum 0, sice colum 0 already has a leadig 1 i row 0 It remais to show that the submatrix with rows 1 through ad colums 1 through ca be row reduced to the idetity matrix To show this, first divide row i, i = 1,,, by p 1 (x i ) p 1 (x 0 ) to obtai the ew submatrix 1 1 p 2 (x 1 ) p 2 (x 0 ) p 1 (x 1 ) p 1 (x 0 ) p 1 (x 1 ) p 1 (x 0 ) p 2 (x ) p 2 (x 0 ) p 1 (x ) p 1 (x 0 ) 1 p 2(x 1 ) p 2 (x 0 ) p 1 (x 1 ) p 1 (x 0 ) p 1 (x 1 ) p 1 (x 0 ) p 1 (x 1 ) p 1 (x 0 ) p 1 (x 1 ) p 1 (x 0 ) p 1 (x ) p 1 (x 0 ) p 1 (x ) p 1 (x 0 ) p (x 1 ) p (x 0 ) p 1 (x 1 ) p 1 (x 0 ) p (x 1 ) p (x 0 ) p 1 (x 1 ) p 1 (x 0 ) p (x ) p (x 0 ) p 1 (x ) p 1 (x 0 ) For i = 2,,, let q i 1 (x) = p i(x) p i (x 0 ) p 1 (x) p 1 (x 0 ) 6

The by Lemma 2, q i 1 (x) is a degree i 1 polyomial, ad the above submatrix may be writte as 1 q 1 (x 1 ) q 2 (x 1 ) q 1 (x 1 ) 1 q 1 (x 1 ) q 2 (x 1 ) q 1 (x 1 ) 1 q 1 (x ) q 2 (x ) q 1 (x ) By the iductive assumptio, this matrix is ivertible, ad ca thus be row reduced to the idetify matrix Thereofre, addig back row 0 ad colum 0 of the origial matrix, it follows that the etire matrx ca be row reduced to the idetity matrix, ad is hece ivertible Collorary 1 The -dimesioal Vadermode matrix is ivertible for all 1 Proof of Collorary 1 This follows immediately from Theorem 1, by settig p i (x) = x i, i = 1,, Example 3 Fid the equatio of the quadratic polyomial whose graph passes through the poits (0, 6), ( 1, 9), ad (2, 6) The Discrete Fourier Trasform Polyomial iterpolatio ca also be used to fid the 1 th degree complex trigoometric polyomial that best fits a set of data poits (t 0, y 0 ),, (t 1, y 1 ), where y j = E(t j ) is a sample of the sigal E(t) at time t j, j = 0,, 1 Assumig a time scale for which E(t) is periodic over [0, 2π], let t j = 2πj/ First otice that p(t j ) = 1 k= +1 c k e 2πijk/ = 1 k= +1 c k ω jk 7

But sice ω kj = ω ( k)j, we see that the terms of p(t j ) with a egative k idex may be combied with the terms havig positive k idex Thus, assumig t j = 2πj/, we may write p(t j ) as 1 p(t j ) = c k ω jk k=0 1 = c k (ω) j k I other words p(t j ) is the evaluatio of the complex polyomial k=0 1 p(x) = c k x k at the th root of uity ω j This brigs us to the defiitio of the discrete Fourier trasform Discrete Fourier Trasform Give complex coefficiets c 0,, c 1, let p(x) be the polyomial k=0 1 p(x) = c k x k The the th order discrete Fourier trasform is the fuctio k=0 DFT (c 0,, c 1 ) = (y 0,, y 1 ), where y j = p(ω j ), j = 0,, 1 I words the th order discrete Fourier trasform, takes as iput the complex coefficiets of a degree 1 polyomial p, ad returs the -dimesioal vector whose compoets are the evaluatio of p at each of the th roots of uity Aother way to write DFT (c 0,, c 1 ) is DFT (p), where p is a polyomial of degree 1 Example 4 Compute DFT 4 (0, 1, 2, 3) 8

The discrete Fourier trasform maps from complex coefficiets to data poits However, mappig from data poits to coefficiets is also importat, sice their must be some empirical basis for derivig the set of polyomial coefficiets This problem is called the th order iverse discrete Fourier trasform, ad is represeted by the fuctio DFT 1 (y 0,, y 1 ), which takes as iput samples of a sigal, ad returs the coefficiets of a polyomial p(x) for which p(ω) j = y j, j = 0,, 1 Example 5 Compute DFT 1 4 (0, 1, 1, 2) The Fast Fourier Trasform To compute the th order DFT, oe must evaluate a ( 1)-degree polyomial p(x) at differet values, amely at the th roots of uity We ow show that each polyomial evaluatio ca be performed i Θ() steps, which implies that the DFT ca be computed i o more tha Θ( ) = Θ( 2 ) steps The method for evaluatig a th-degree polyomial p (x) i Θ() steps is called Horer s algorithm The algorithm is recursive with the followig base case ad recursive case Base case If = 0, the p 0 (x) = c 0 is a costat Thus p 0 (x) ca be computed i 0 steps Recursive case Suppose p (x) = c x + c 1 x 1 + + c 1 x + c 0 9

The p (x) ca be writte as p (x) = xp 1 (x) + c 0, where p 1 (x) = c x 1 + c 1 x 2 + + c 2 x + c 1 Thus, p (x) ca be computed by first callig Horer s algorithm o p 1 (x), ad the multiplyig the result by x, ad addig c 0 Moreover, if T is the umber of steps eeded to compute p (x) usig Horer s algorithm, the ecessarily T = T 1 + 2, sice T 1 steps are eeded to compute p 1 (x), followed by 2 arithmetic steps: multiplyig by x, ad addig c 0 To see that Horer s algorithm requires Θ() steps, otice that the recurrece T = T 1 + 2 has a associated recursio tree that cosists of a sigle brach with depth +1, ad that each ode (except for the leaf) of the tree requires 2 computatioal steps of work, which yields a total of 2 = Θ() steps Example 6 Show the sequece of polyomials p 0, p 1, p 2 that are evaluated whe usig Horer s algorithm to evaluate p 3 (x) = 4x 3 + 6x 2 + 10x 7 Usig Horer s algorithm, DFT ca be computed Θ( 2 ) steps Ufortuately, for may applicatios where is very large (say i the hudreds of thousads or millios), computig DFT may require a excessive amout of time We ow provide a algorithm for computig DFT i Θ( log ) steps This algorithm is kow as the fast Fourier trasform (FFT) I computig DFT (p), the algorithm starts by assumig that is a power of 2 Next, assumig p(x) = c 1 x 1 + c 2 x 2 + + c 1 x + c 0, the p(x) may also be writte as p(x) = p 0 (x 2 ) + xp 1 (x 2 ), where p 0 (x) = c 2 x ( 2)/2 + c 4 x ( 4)/2 + + c 2 x + c 0 is a degree /2 1 polyomial whose coefficiets cosist of the eve-idexed coefficiets of p(x), while p 1 (x) = c 1 x ( 2)/2 + c 3 x ( 4)/2 + + c 3 x + c 1 10

is a degree /2 1 polyomial whose coefficiets cosist of the odd-idexed coefficiets of p(x) Now, sice p = p 0 (x 2 ) + xp 1 (x 2 ), DFT (p) ca be computed by first evaluatig p 0 (x 2 ) at each of the th roots of uity, followed by evaluatig xp 0 (x 2 ) at the th roots of uity, ad the addig the two output vectors This is due to the additivity property of polyomials: (r + s)(x) = r(x) + s(x), for ay polyomials r ad s I other words DFT (p) = DFT (p 0 (x 2 )) + DFT (xp 1 (x 2 )) But, by the Cacellatio Rule (see Exercise 5), DFT (p 0 (x 2 )) = (p 0 ((ω) 0 2 ),, p 0 ((ω /2 1 ) 2 )p 0 ((ω /2 ) 2 ),, p 0 ((ω 1 ) 2 )) = (p 0 (ω 0 /2),, p 0 (ω /2 1 /2 )p 0 (ω /2+0 /2 ),, p 0 (ω /2+/2 1 /2 )) = (p 0 (ω 0 /2),, p 0 (ω /2 1 /2 )p 0 (ω 0 /2),, p 0 (ω /2 1 /2 )) = DFT /2 (p 0 ) DFT /2 (p 0 ), where the 2d to last equality comes from the fact that /2+k k mod /2, for each k = 0,, /2 1 Note also that the last operatio DFT /2 (p 0 ) DFT /2 (p 0 ) meas to cocateate vector DFT /2 (p 0 ) with itself For example, (1, 2, 3) (1, 2, 3) = (1, 2, 3, 1, 2, 3) Similarly, DFT (p 1 (x 2 )) = DFT /2 (p 1 ) DFT /2 (p 1 ) The above equatios yield the followig recursive algorithm for computig DFT (p), assumig is a power of 2 1 Base case If = 2, the retur DFT 2 (p) by usig the defiitio of DFT 2 Compute DFT /2 (p 0 ) ad form the vector Y 0 = DFT /2 (p 0 ) DFT /2 (p 0 ) 3 Compute DFT /2 (p 1 ) ad form the vector Y 1 = DFT /2 (p 1 ) DFT /2 (p 1 ) 4 For each j = 0,, 1, replace compoet j of Y 1 with ωy j 1j I other words, Y 1j ωy j 1j 5 Retur Y 0 + Y 1 11

Example 7 Compute DFT 4 (0, 1, 2, 3) usig the FFT algorithm 12

Theorem 2 Let T () deote the umber of steps eeded to compute DFT (p) usig the FFT algorithm The T () satisfies the recurrece T () = 2T (/2) + a, where a > 0 is a costat Moreover, T () = Θ( log ) Proof of Theorem 2 To compute DFT (p), we must first compute both DFT /2 (p 0 ) ad DFT /2 (p 1 ) By defiitio, both of these computatios will require T (/2) steps The vectors Y 0 ad Y 1 must be formed Both ca be computed i a costat times umber of steps For example, to compute Y 1, we eed oly cocateate DFT /2 (p 1 ) with itself which takes steps, ad the multiply each compoet with the appropriate power of ω, which takes aother steps Fially, computig the vector sum Y 0 + Y 1 requires aother steps Puttig this all together, we have where a > 0 is a costat T () = 2T (/2) + a, To see that T () = Θ( log ), ote that the algoroithm s recursio tree has a depth of log 1, ad that the umber of odes at depth i of the tree is 2 i Moreover, the umber of computig steps performed at each depth-i ode is a(/2 i ), sice each ode is performig a DFT /2 i computatio which requires a(/2 i ) steps Thus, the total umber of steps required at depth i is 2 i a(/2 i ) = a Therefore, sice there are log 1 depths, this gives the total work as a(log 1) = Θ( log ) 13

The Iverted Fast Fourier Trasform The FFT algorithm ca be modified to compute DFT 1 (y 0,, y 1 ) i Θ( log ) steps To begi, recall that we must fid coefficiets c 0,, c 1 for which y j = c 0 + c 1 ω j1 + c 2 ω j2 + + c 1 ω j( 1), for j = 0,, 1 This gives the followig liear system of equatios expressed i matrix-equatio form 1 1 1 1 c 0 y 0 1 ω ω 2 ω 1 c 1 y 1 1 ω 2 ω 4 ω 2( 1) c 2 = y 2 1 ω 1 ω 2( 1) ω ( 1)( 1) c 1 y 1 Notice that coefficiet matrix is a Vadermode matrix Deote it by V Notice that, for 0 j, k 1, etry (j, k) of V is ω jk The followig theorem ow shows how to compute V 1 Theorem 3 For 0 j, k 1, the (j, k) etry of V 1 is ω jk / Proof of Theorem 3 Let matrix A have coefficiets a jk = ω jk /, for 0 j, k 1 We must show that V A = I, which would the imply that A = V 1 Now cosider etry (j, k) of V A Case 1: j = k The 1 (V A) jj = ω jr ω rj r=0 / = 1 1 1 = / = 1 r=0 Case 2: j k The 1 (V A) jk = ω jr ω rk r=0 / = 1 1 ω r(j k) Now j k is a ozero iteger that lies i the iterval [ + 1, 1] Thus, j k is ot divisible by Therefore, by Exercise 8, 1 ω r(j k) = 0, which implies (V A) jk = 0 Therefore, V A = I, ad (V 1 r=0 r=0 ) jk = ω jk / Kowig the iverse of V allows us to solve the above matrix equatio by multiplyig both sides by V 1 This yields the equatio c 0 1/ 1/ 1/ 1/ y 0 c 1 1/ ω 1 / ω 2 / ω ( 1) / y 1 c 2 = 1/ ω 2 / ω 4 / ω 2( 1) / y 2 c 1 1/ ω ( 1) / ω 2( 1) / ω ( 1)( 1) / y 1 14

Therefore, for j = 0,, 1, c j = 1 (y 0 + y 1 ω j1 + y 2 ω j2 + + y 1 ω j( 1) ) I words, c j is obtaied by evaluatig 1 p(x) = 1 (y 0 + y 1 x + y 2 x 2 + + y 1 x 1 ) at ω j This leads to the followig defiitio Iverted Discrete Fourier Trasform Give complex coefficiets y 0,, y 1, let p(x) be the polyomial 1 p(x) = y k x k The the th order iverted discrete Fourier trasform is the fuctio k=0 IDFT (y 0,, y 1 ) = (c 0,, c 1 ), where c j = 1 p(ω j ), j = 0,, 1 I words the th order iverted discrete Fourier trasform, takes as iput the complex coefficiets of a degree 1 polyomial p, ad returs the -dimesioal vector whose compoets are the evaluatio of 1 p at each of the iverses of the th roots of uity Aother way to write IDFT (c 0,, c 1 ) is IDFT (p), where p is a polyomial of degree 1 Notice that IDFT ca be computed usig the FFT algorithm, sice it represets the same problem of evaluatig a polyomial at each of the th roots of uity (recall that the iverse of each root of uity is also a root of uity) To uderstad the recursio, we ow have Notice that evaluatig 2 p 0(x 2 ) at each ω j 1 p(x) = 1 p 0(x 2 ) + x p 1(x 2 ) = 1 2 ( 2 p 0(x 2 ) + 2x p 1(x 2 )) gives the same result as evaluatig p 0 (x) at each ω j /2, duplicatig the resultig vector, ad the dividig by /2 Similarly, evaluatig 2 p 1(x 2 ) at each ω j gives the same result as evaluatig p 1 (x) at each ω j /2, duplicatig the resultig vector, ad the dividig by /2 Thus, IDFT (p) = 1 2 (IDFT /2(p 0 ) IDFT /2 (p 0 ) + xidft /2 (p 1 ) IDFT /2 (p 1 ), where xidft /2 (p 1 ) IDFT /2 (p 1 ) has the effect of multiplyig compoet j of IDFT /2 (p 1 ) IDFT /2 (p 1 ) by ω j This leads us to the followig IFFT algorithm IFFT Algorithm for computig IDFT (p) = IDFT (y 0,, y 1 ) 1 Base case If = 2, the retur IDFT 2 (p) by usig the defiitio of IDFT 2 Compute IDFT /2 (p 0 ) ad form the vector C 0, where C 0 = IDFT /2 (p 0 ) IDFT /2 (p 0 ) 3 Compute IDFT /2 (p 1 ) ad form the vector C 1, where C 1 = IDFT /2 (p 1 ) IDFT /2 (p 1 ) 4 For each j = 0,, 1, replace compoet j of C 1 with ω j C 1j I other words, C 1j ω j C 1j 5 Retur 1 2 (C 0 + C 1 ) which equals DFT 1 (y 0,, y 1 ) 15

Example 8 Compute DFT 1 4 (0, 1, 1, 2) by a) usig the defiitio of IDFT 1 4 (0, 1, 1, 2), ad b) usig the IFFT algorithm o IDFT 4 (0, 1, 1, 2) 16

Exercises 1 Prove that for ay two complex umbers c ad d, cd = cd 2 Determie the complex cube roots of uity 3 Determie the complex 8th roots of uity 4 For the 8th roots of uity, determie the iverse of each group elemet, ad verify that (a + bi)(a + bi) 1 = 1 through direct multiplicatio 5 Let 1, d > 0, ad k be itegers Prove that ω dk d = ωk This is called the cacellatio rule 6 Let be a eve positive iteger Prove that the square of each of the th roots of uity yields the /2 roots of uity Moreover, each /2 root of uity is associated with two differet squares of th roots of uity 7 Show that ω /2 = 1, for all eve 2 8 For positive iteger ad for iteger j ot divisible by, prove that Hit: use the geometric series formula k=0 which is valid whe a is a complex umber 1 ω jk k=0 = 0 1 a k = a 1 a 1, 9 Fid the equatio of the quadratic polyomial whose graph passes through the poits (2, 13), ( 1, 10), ad (3, 26) 10 Fid the equatio of the cubic polyomial whose graph passes through the poits (0, 1), (1, 0), ( 1, 4), ad (2, 5) 11 Compute DFT 4 (1, 1, 2, 4) 12 Compute DFT 4 ( 1, 3, 4, 10) 13 Compute DFT 1 4 (0, 0, 4, 0) 14 Compute DFT 1 4 (2, 1 i, 0, 1 + i) 15 Show the sequece of polyomials that are evaluated whe evaluatig p(x) = x 3 3x 2 + 5x 6 usig Horer s algorithm Use the algorithm to evaluate p( 2) 16 Show the sequece of polyomials that are evaluated whe evaluatig p(x) = 2x 4 x 3 + 2x 2 + 3x 5 usig Horer s algorithm Use the algorithm to evaluate p(5) 17

17 Use the FFT algorithm to compute DFT 4 (1, 1, 2, 4) 18 Use the FFT algorithm to compute DFT 4 ( 1, 3, 4, 10) 19 Compute IDFT 4 (0, 0, 4, 0) usig the defiitio 20 Compute IDFT 4 (2, 1 i, 0, 1 + i) usig the defiitio 21 Use the IFFT algorithm to compute IDFT 4 (0, 0, 4, 0) 22 Use the IFFT algorithm to compute IDFT 4 (2, 1 i, 0, 1 + i) Exercise Solutios 1 Let c = a + bi, ad d = e + fi The cd = (ae bf) + i(af + be) = (ad bf) i(af + be) O the other had, overliecd = (a bi)(e fi) = (ae bf) + i( af be) = (ae + bf) i(af + be), which proves the claim 2 For j = 0, For j = 1, For j = 2, 3 For j = 0, For j = 1, For j = 2, For j = 3, For j = 4, e (2π)(0)i 3 = 1 e 2πi 3i 3 = 1/2 + 2 e 4πi 3i 3 = 1/2 2 e (2π)(0)i 3 = 1 e πi 2 2i 4 = 2 + 2 e πi 2 = i e 3πi 4 = 2 2i + 2 2 e πi = 1 18

For j = 5, For j = 6, For j = 7, e 5πi 4 = 2 2 e 7πi 4 = e 3πi 2 = i + 2i 2 2 2 + 2i 2 4 For example, ω8 2 = i while ω8 2 = ω8 6 = i, sice (i)( i) = 1 Similarly, ω8 4 = 1 while ω8 4 = ω8 4 = 1, sice ( 1)( 1) = 1 5 By defiitio, ωd dk = e 2πidk d = e 2πik = ω k 6 For j = 0,, 1, (ω) j 2 = ωω j j = ω 2j = ω j /2, where the last equality is due to the cacellatio rule from Exercise 5 Thus the square of a th root of uity is ideed a /2 root of uity Moreover, otice that j rages from 0 to 1 By defiitio, whe j rages from 0 to /2 1, we obtai each /2 root of uity The, due to the cyclic ature of the roots uity, whe j rages from /2 to 1, we oce agai obtai each /2 root of uity Therefore, each /2 root of uity ω j /2 is the square of exactly two differet th-roots of uity, amely (ω j /2 )2 ad (ω j+/2 /2 ) 2 7 We have, for eve 2, 8 Usig the geometric series formula we have ω /2 = e (2πi/)/2 = e πi = cos π + i si π = 1 1 a k = a 1 a 1, k=0 1 1 (ω) j k = k=0 ω jk = k=0 ω j 1 ω j 1 = ωj 1 1 ω j 1 = 1 1 ω j 1 = 0, where the first equality is due to the cacellatio rule, ad the 2d to last equality is due to the fact that ω1 1 = 1 Notice also that the deomiator is ot equal to zero, sice we assumed j is ot divisible by ; ie j 0 mod 9 We desire a polyomial of the form c 0 +c 1 x+c 2 x 2 The three poits imply the followig system of equatios c 0 + 2c 1 + 4c 2 = 13 c 0 c 1 + c 2 = 10 c 0 + 3c 1 + 9c 2 = 26 Solvig this system gives the polyomial 5 2x + 3x 2 19

10 We desire a polyomial of the form c 0 + c 1 x + c 2 x 2 + c 3 x 3 The four poits imply the followig system of equatios c 0 = 1 c 0 + c 1 + c 2 + c 3 = 0 c 0 c 1 + c 2 c 3 = 4 c 0 + 2c 1 + 4c 2 + 8c 3 = 5 Solvig this system gives the polyomial 1 + x x 2 + x 3 11 DFT 4 (1, 1, 2, 4) = (6, 1 5i, 0, 1 5i) 12 DFT 4 ( 1, 3, 4, 10) = (16, 5 7i, 10, 5 + 7i) 13 We desire a polyomial of the form p(x) = c 0 + c 1 x + c 2 x 2 + c 3 x 3 Moreover, the four fuctio values p(1) = 0, p(i) = 0, p( 1) = 4, ad p( i) = 0 imply the followig system of equatios c 0 + c 1 + c 2 + c 3 = 0 c 0 + ic 1 c 2 ic 3 = 0 c 0 c 1 + c 2 c 3 = 4 c 0 ic 1 c 2 + ic 3 = 0 Solvig this system gives the polyomial 1 + x x 2 + x 3 14 We desire a polyomial of the form p(x) = c 0 + c 1 x + c 2 x 2 + c 3 x 3 Moreover, the four fuctio values p(1) = 2, p(i) = 1 i, p( 1) = 0, ad p( i) = 1 + i imply the followig system of equatios c 0 + c 1 + c 2 + c 3 = 2 c 0 + ic 1 c 2 ic 3 = 1 i c 0 c 1 + c 2 c 3 = 0 c 0 ic 1 c 2 + ic 3 = 1 + i Solvig this system gives the polyomial 1 + x 3 15 p 0 (x) = 1, p 1 (x) = xp 0 (x) 3 = x 3, p 2 (x) = xp 1 (x) + 5 = x 2 3x + 5, p 3 (x) = xp 2 (x) 6 = x 3 3x 2 + 5x 6 p 0 ( 2) = 1, p 1 ( 2) = 2(1) 3 = 5, p 2 ( 2) = 2( 5) + 5 = 15, p 3 ( 2) = 2(15) 6 = 36 16 p 0 (x) = 2, p 1 (x) = xp 0 (x) 1 = 2x 1, p 2 (x) = xp 1 (x) + 2 = 2x 2 x + 2, p 3 (x) = xp 2 (x) + 3 = 2x 3 x 2 + 2x + 3, p 4 (x) = xp 3 (x) 5 = 2x 4 x 3 + 2x 2 + 3x 5 p 0 (5) = 2, p 1 (5) = 5(2) 1 = 9, p 2 (5) = 5(9) + 2 = 47, p 3 (5) = 5(47) + 3 = 238, p 4 (5) = 5(238) 5 = 1185 17 p 0 (x) = 1 + 2x, DFT 2 (1 + 2x) = (3, 1) Thus, Y 0 = (3, 1, 3, 1) Also, p 1 (x) = 1 + 4x, ad DFT 2 ( 1 + 4x) = (3, 5) Thus, Furthermore, Y 1j ω j 4Y 1j gives Y 1 = (3, 5, 3, 5) Y 1 = (3, 5i, 3, 5i) Fially, DFT 4 (1, 1, 2, 4) = Y 0 + Y 1 = (6, 1 5i, 0, 1 + 5i) 20

18 p 0 (x) = 1 + 4x, DFT 2 ( 1 + 4x) = (3, 5) Thus, Y 0 = (3, 5, 3, 5) Also, p 1 (x) = 3 + 10x, ad DFT 2 ( 1 + 4x) = (13, 7) Thus, Y 1 = (13, 7, 13, 7) Furthermore, Y 1j ω4y j 1j gives Y 1 = (13, 7i, 13, 7i) Fially, DFT 4 ( 1, 3, 4, 10) = Y 0 + Y 1 = (16, 5 7i, 10, 5 + 7i) 19 Iput (0, 0, 4, 0) correspods with polyomial p(x) = 4x 2 Moreover, ad Thus, p(ω ( 1)(0) 4 ) = p(1) = 4, p(ω 1 4 ) = p( i) = 4, p(ω 2 4 ) = p( 1) = 4, p(ω 3 4 ) = p(i) = 4 IDFT 4 (0, 0, 4, 0) = 1 ( 4, 4, 4, 4) = ( 1, 1, 1, 1), 4 ad so DFT 1 4 (0, 0, 4, 0) = ( 1, 1, 1, 1), which correspods with polyomial 1+x x 2 +x 3 20 Iput (2, 1 i, 0, 1 + i) correspods with polyomial p(x) = 2 + (1 i)x + (1 + i)x 3 Moreover, ad Thus, p(ω ( 1)(0) 4 ) = p(1) = 4, p(ω 1 4 ) = p( i) = 0, p(ω 2 4 ) = p( 1) = 0, p(ω 3 4 ) = p(i) = 4 IDFT 4 (0, 0, 4, 0) = 1 (4, 0, 0, 4) = (1, 0, 0, 1), 4 ad so DFT 1 4 (2, 1 i, 0, 1 + i) = (1, 0, 0, 1),, which correspods with polyomial 1 + x 3 21 p 0 (x) = 4x, IDFT 2 ( 4x) = 1 ( 4, 4) = ( 2, 2) Thus, 2 Also, p 1 (x) = 0, ad IDFT 2 (0) = (0, 0) Thus, C 0 = ( 2, 2, 2, 2) C 1 = (0, 0, 0, 0) 21

Furthermore, C 1j ω j 4 C 1j gives C 1 = (0, 0, 0, 0) Fially, IDFT 4 (0, 0, 4, 0) = 1(C 2 0 + C 1 ) = 1 ( 2, 2, 2, 2) = ( 1, 1, 1, 1) Therefore, 2 DFT 1 4 (0, 0, 4, 0) = ( 1, 1, 1, 1), which correspods with polyomial 1 + x x 2 + x 3 22 p 0 (x) = 2, IDFT 2 (2) = 1 (2, 2) = (1, 1) Thus, 2 C 0 = (1, 1, 1, 1) Also, p 1 (x) = (1 i) + (1 + i)x, ad IDFT 2 ((1 i) + (1 + i)x) = 1 (2, 2i) = (1, i) Thus, 2 Furthermore, C 1j ω j 4 C 1j gives C 1 = (1, i, 1, i) C 1 = (1, 1, 1, 1) Fially, IDFT 4 (2, 1 i, 0, 1 + i) = 1 2 (C 0 + C 1 ) = (1, 0, 0, 1) Therefore, which correspods with polyomial 1 + x 3 DFT 1 4 (2, 1 i, 0, 1 + i) = (1, 0, 0, 1), 22