Polynomials and FFT - PowerPoint PPT Presentation

1 / 37
About This Presentation
Title:

Polynomials and FFT

Description:

Polynomials and FFT Lecture 11 Prof. Dr. Ayd n zt rk – PowerPoint PPT presentation

Number of Views:100
Avg rating:3.0/5.0
Slides: 38
Provided by: Ayd89
Category:

less

Transcript and Presenter's Notes

Title: Polynomials and FFT


1
Polynomials and FFT
Lecture 11 Prof. Dr. Aydin Öztürk
2
Polynomials
  • A polynomial in the variable x is defined as
  • where are
    the
  • coefficiens of the polynomial.

3
Polynomials(cont.)
  • A polynomial A(x) is said have degree k if its
    highest non-zero coefficient is ak.
  • Any integer strictly greather than the degree of
    a polynomial is a degree bound of that
    polynomial.
  • Therefore, the degree of a polynomial of degree
    bound n may be any integer between 0 and n-1.

4
Polynomial addition
  • If A(x) and B(x) are polynomials of degree bound
    n, their sum is a polynomial C(x) s.t.
  • C(x) A(x) B(x)
  • For all x underlying their field F that is if

5
Polynomial addition(cont.)
  • Example

6
Polynomial multiplication
  • If A(x) and B(x) are polynomials of degree bound
    n, their product C(x) is a ppolynomial of
    degree-bound 2n-1 s.t.
  • C(x) A(x) B(x)
  • for all x underlying their field F.

7
Polynomial multiplication(cont.)
  • Example

8
Representation of polynomials
9
Coefficient representation
  • A coefficient representation of a polynomial
  • of degree bound n is a vector of coefficients

10
Coefficient representation(cont.)
  • A coefficient representation is convenient for
    certain operations on polynomials.
  • Example Evaluating A(x) at x0. Evaluation takes
    time T(n) when Horners rule is used

11
Point-value representation
  • A point-value representation of a polynomial A(x)
    of degree-bound n is a set of poin-value pairs.
  • s.t. all of the xk are distinct and
  • With Horners method, an n-point evaluation takes
    T(n2).

12
Point-value representation(cont.)
  • Addition based on point-value representation
  • If we have a point value representation for A(x)
  • and for B(x)
  • Then a point-value representation for C(x) A(x)
    B(x) is

13
Point-value representation(cont.)
  • The time to add two polynomials of degree bound
    point-value representation is T(n).

14
Point-value representation(cont.)
  • Multiplication based on point-value
    representation
  • If we have a point value representation for A(x)
  • and for B(x)
  • then a point-value representation for C(x)
    A(x)B(x) is

15
Point-value representation(cont.)
  • The time to multiply two polynomials of degree
    bound point-value representation is T(n).

16
Fast multiplication of polinomials
  • Can we use the linear-time multiplication method
    for polynomials in point-value form to expedite
    polynomial multiplication in coefficient form?
  • The answer hinges on our ability to convert a
    polynomial quickly from coefficient form to
    point-value form and vice-versa.

17
Fast multiplication of polinomials
  • We can choose the evaluation points carefully,
    we can convert between representations in T(nlg
    n) time.
  • If we choose complex roots of unity as the
    evaluation points, we can produce a point-value
    representation by taking the Discrete Fourier
    Transform(DFT) of a coefficient vector
  • The inverse operation can be performed by taking
    the inverse DFT of point-value pairs in T(nlg n)
    time.

18
Fast multiplication of polinomials

Ordinary multiplication
Coefficient representation
T(n2 )
Interpolation time T(nlg n)
T(nlg n)
Pointwise multiplication
Point-value representation
T(n)
19
The DFT and FFT
  • In this section we define
  • Complex roots of unity,
  • Define the DFT
  • Show how the FFT computes the DFT

20
Complex roots of unity
  • A complex nth root of unity is a complex number ?
    s.t.
  • The n roots are
  • To interpret this formula we use the defination
    of exponential of complex number

21
Complex roots of unity
  • The value is called the
    principal root of unity.
  • All of the other complex nth roots of unity are
    powers of .
  • The n complex nth roots of unity are

22
Complex roots of unity
  • Lemma-1 For any integers n 0 and d gt 0,
  • Proof

23
Complex roots of unity
  • Corollary For any even integer n gt 0,
  • Lemma-2 If n gt 0 is even then the squares of the
    nth roots of unity are the (n/2)th roots of
    unity.
  • Proof We have (by
    lemma-1)

24
Complex roots of unity
  • Lemma-3 For any integer n 1 and nonnegative
    integer k not divisible by n,
  • Proof

25
The DFT
  • We wish to evaluate a polynomial
  • of degree bound n at
  • Without loss of generality, we assume that n is
    a power of 2.
  • (We canalways add new high order zero coefficient
    as necessary)

26
The DFT
  • Assume that A(x) is given in coefficient form
  • For k0,1, ..., n-1 we define
  • The vector
    is called the Discrete Fourier Transform(DFT) of
    the coefficient vector
    We also write
    yDFTn(a).

27
The FFT(cont.)
  • Let
  • It follows that

28
The FFT(cont.)
  • The problem of evaluating A(x) at
  • reduces to
  • Evaluating the degree-bound n/2 polynomials
  • and at the points
  • as
  • 2. Combining the results.

29
Recursive FFT
30
Running time of RECURSIVE-FFT
  • We note that exclusive of the recursive calls,
    each invocation takes time T(n).
  • The recurrence for the running time is therefore

31
Interpolation
  • We can write the DFT as the matrix product y Va
    that is

32
Interpolation(cont.)
  • Theorem For j,k0,1, ..., n-1, the ( j,k) entry
    of the inverse of matrix is
  • Given the inverse matrix V -1, we have that
  • is given by

33
Interpolation(cont.)
  • By using the FFT and the inverse FFT, we can
    transform a polynomial of degree-bound n back and
    forth between its coefficient representation and
    a point-value representation in time T(n lg n).

34
Interpolation(cont.)
  • Theorem For any two vectors a and b of length n
    is a power of 2,
  • Where the vectors a and b are padded with zeros
    to length 2n and
  • . denotes the componentwise product of two 2n
    element vectors.

35
Example
  • Multiply the following polynomials.
  • Run time

36
Example
  • Multiply the polynomials in
  • The Discrete Fourier Transform(DFT) of the
    coefficient vectors
  • DFT(a)
  • 4.000, (-0.309 - 2.126i), (0.809 1.314i),
    (0.809 - 1.314i), ( -0.309 2.126i)
  • DFT(b)
  • 6.000, (-0.809 - 3.665i), (0.309 1.677i),
    (0.309 -1.677i), (-0.809 3.665i)
  • Run time

37
Example
  • DFT(a)DFT(b)
  • 24.00, (-7.545 2.853i), (-1.954 1.763i),
    ( -1.954 - 1.763i), (-7.545 - 2.853i)
Write a Comment
User Comments (0)
About PowerShow.com