1 / 9

Polynomials and Fast Fourier Transform Chapter 30, pp.823-848 new edition - PowerPoint PPT Presentation

Polynomials and Fast Fourier Transform Chapter 30, pp.823-848 new edition. Polynomials. Polynomial in coefficient representation A(x ) = a 0 + a 1 x +a 2 x 2 +…+ a n-2 x n-2 + a n-1 x n-1 Operations over polynomials: polynomial degree n = highest nonzero coeff addition = O(n)

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about ' Polynomials and Fast Fourier Transform Chapter 30, pp.823-848 new edition' - beatrice-west

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

Polynomials and Fast Fourier TransformChapter 30, pp.823-848 new edition

CS8550

• Polynomial in coefficient representation

A(x) = a0 + a1x+a2 x2+…+ an-2 xn-2+ an-1 xn-1

• Operations over polynomials:

• polynomial degree n = highest nonzero coeff

• addition = O(n)

• multiplication = O(n2)!!! Bad -- too slow!

• evaluation (finding the value in a point) = O(n) !!! Good --

Horner’s rule = stack-based

A(x0 ) = a0 + x0 (a1 + x0 (a2 + …+ x0 (an-2 + x0 (an-1))…)

• Point-value representation

• (x0 ,y0 ), (x1 ,y1 ), …, (xn-1 ,yn-1 ) - n point-values are sufficient

CS8550

• Interpolation = getting polynomial coefficients from point-value representation

• Theorem (unique interpolation):

for any set of distinct n point-value pairs,

! polynomial of degree less than n

• Operations over polynomials:

• addition = O(n)

• multiplication = O(n)!!! Good --

• how?

• evaluation (finding the value in a point) = O(n2)!!! Bad -- too slow!

• IDEA: Use both representations!!!

CS8550

• Coefficient => point-value (evaluation)

• just O(n) per point

• O(n2)!!! Bad -- too slow!

• Point-value => coefficient (interpolation)

• Lagrange’s formula

n-1

 yk  (x-xj) / (xk-xj)

k=0 jk jk

• O(n2)!!! Bad -- too slow!

• GOAL

• both transformations in O(n log n)

CS8550

• Double-degree bound

• 2n point-value pairs

• O(n)

• Evaluate

• Compute point point-value representations using FFT

• in (2n)-roots of unity

• O(n log n)

• Point-wise multiply

• Multiply the values for each of 2n points

• O(n)

• Interpolate

• Compute coefficient representation of product using FFT

• O(n log n)

CS8550

• Point-value representation in complex roots of 1

= DFT = discrete Fourier Transform

• Complex n-th root of 1: wn = 1

• Complex numbers: i =  -1

• The principal n-th root is

wn1= e2 i /n = cos(2/n)+ i sin (2/n)

• n roots of n-th power :

wn0 = 1, wn1 = principal , wn2 = wnwn, …, wnn-1

• Properties:

• Cancellation: wdndk= wnk

• Halving: if n is even then the squares of nth roots are n/2-roots

• Summation: n-1

 (wnk ) j= 0

j=0

CS8550

• Problem:

• Given polynomial

A(x) = a0 + a1x+a2 x2+…+ an-2 xn-2+ an-1 xn-1

• Find values in roots of unity

• FFT = divide and conquer:

A[0](x)= a0 + a1x+a2 x2+…+ an-2 xn/2-1

A[1](x) = a1 + a3x+a5 x2+…+ an-1 xn/2-1

• A(x) = A[0](x2)+ xA[1](x2)

• Recursive procedure:

• Evaluate A[0](x) and A[1](x) in points (wn0 )2 , (wn1 )2 ,…, (wnn-1 )2

• n/2 roots each

• Combine the results

• T(n) = 2T(n/2) +(n) = (n log n) (master theorem)

CS8550

y = (y0 y1 y2...yn-1), a = (a0 a1 a2...an-1), x = (x0 x1 x2…xn-1)

Vn = Vn (x) Vandermonde matrix

y = a Vn (x)

Replace x = (x0 x1 x2…xn-1) => wn = (wn0w n1 w n2 …wnn-1)

DFT = y = a Vn (wn)

a = y Vn-1 (wn)

CS8550

CS8550