Polynomials and the FFT(UNIT-3)

Slides:



Advertisements
Similar presentations
Notes 6.6 Fundamental Theorem of Algebra
Advertisements

Polynomials Newport Math Club Warm up Problems:
Roots & Zeros of Polynomials I
Roots & Zeros of Polynomials
Splash Screen.
Introduction to Algorithms
Solving Linear Equations
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.
Chapter 4 – Polynomials and Rational Functions
Fast Fourier Transform Irina Bobkova. Overview I. Polynomials II. The DFT and FFT III. Efficient implementations IV. Some problems.
Bell Work: Find the values of all the unknowns: R T = R T T + T = 60 R = 3 R =
1 Preliminaries Precalculus Review I Precalculus Review II
7.5.1 Zeros of Polynomial Functions
Key Concept 1. Example 1 Leading Coefficient Equal to 1 A. List all possible rational zeros of f (x) = x 3 – 3x 2 – 2x + 4. Then determine which, if any,
Chapter 9 Polynomial Functions
TH EDITION LIAL HORNSBY SCHNEIDER COLLEGE ALGEBRA.
The Fast Fourier Transform and Applications to Multiplication
Zeros of Polynomials 2.5.
Warm-Up. TEST Our Ch. 9 Test will be on 5/29/14 Complex Number Operations.
Ch. 6.3 Dividing Polynomials. Divide x 2 + 2x – 30 by x – 5. ALGEBRA 2 LESSON 6-3 Dividing Polynomials – 30Subtract: (x 2 + 2x) – (x 2 – 5x) = 7x. Bring.
Lesson 76 – Introduction to Complex Numbers HL2 MATH - SANTOWSKI.
3.6 Complex Zereos. The Fundamental Theorem of Algebra The Fundamental Theorem of Algebra says that every polynomial with complex coefficients must have.
Copyright © 2009 Pearson Addison-Wesley De Moivre’s Theorem; Powers and Roots of Complex Numbers 8.4 Powers of Complex Numbers (De Moivre’s.
Real Zeros of Polynomial Functions
PreCalculus Section 2.7 Apply general theorems about polynomials Fundamental Theorem of Algebra In the complex number system, a polynomial of degree n.
Chapter 2 – Polynomial and Rational Functions 2.5 – The Fundamental Theorem of Algebra.
Objective Use long division and synthetic division to divide polynomials.
Introduction In mathematics, the word “remainder” is often used in relation to the process of long division. You are probably familiar with dividing whole.
LIAL HORNSBY SCHNEIDER
Roots & Zeros of Polynomials I
Splash Screen.
Polynomials.
Great Theoretical Ideas in Computer Science
Additional Topics in Trigonometry
Numerical Analysis Lecture 25.
Data Structures and Algorithms (AT70. 02) Comp. Sc. and Inf. Mgmt
Polynomial + Fast Fourier Transform
5-5 Theorems About Roots of Polynomial Equations
Copyright © 2017, 2013, 2009 Pearson Education, Inc.
The Rational Zero Theorem
Applied Symbolic Computation
Power and Polynomial Functions
Copyright © 2014, 2010, 2007 Pearson Education, Inc.
Splash Screen.
Polynomials, Secret Sharing, And Error-Correcting Codes
Applied Symbolic Computation
5.7: Fundamental Theorem of Algebra
Roots & Zeros of Polynomials I
Advanced Algorithms Analysis and Design
Roots & Zeros of Polynomials I
Splash Screen.
Applied Symbolic Computation
Great Theoretical Ideas in Computer Science
Numerical Analysis Lecture 23.
Polynomials, Secret Sharing, And Error-Correcting Codes
September 4, 1997 Applied Symbolic Computation (CS 567) Fast Polynomial and Integer Multiplication Jeremy R. Johnson.
Applied Symbolic Computation
Richard Anderson Lecture 14 Inversions, Multiplication, FFT
The Rational Zero Theorem
Warm-up: Find all real solutions of the equation X4 – 3x2 + 2 = 0
Polynomials and Polynomial Functions
Roots & Zeros of Polynomials I
Copyright © Cengage Learning. All rights reserved.
Roots & Zeros of Polynomials I
Find (x3 + 2x2 – 5x – 6) ÷ (x – 2) using synthetic division.
Applied Symbolic Computation
Roots & Zeros of Polynomials I
Remainder Theorem If P(x) is divided by x – r, then the remainder is equal to P(r). We can find P(r) using Synthetic Division.
Fast Polynomial and Integer Multiplication
Numerical Analysis Lecture 24.
Presentation transcript:

Polynomials and the FFT(UNIT-3) ADVANCED ALGORITHMS Polynomials and the FFT(UNIT-3)

Polynomials : A polynomial in the variable x over an algebraic field F represents a function A(x) as a formal sum : A(x) =  aj xj j = 0 to n-1 Here, we call the values a0, a1, a2, a3,….,an-1 as the coefficients of the polynomial. A polynomial has degree k, if its highest non-zero coefficient is ak. Any integer strictly greater than the degree of a polynomial ‘k’, is degree-bound ‘n’. i.e., n > k.

The representation of a Polynomial : Ex-1 : A(x) = 𝑥3 − 2𝑥 − 1 Here, A(x) has degree 3. A(x) has degree bounds 4,5,6,.. A(x) has coefficients (-1,-2,0,1) Ex-2 : 𝑥4 + 𝑥2 − 1 Here, A(x) has degree 4. A(x) has degree bounds 5,6,7,.. A(x) has coefficients (-1,0,1,0,1)

Coefficient Representation : (CR) A CR of a polynomial of degree bound ‘n’ is a vector of coefficients a = Adding Polynomials : Let a = (a0,a1,a2,… , an-1) b = (b0,b1,b2,… , bn-1) Sum is the coefficient vector C, where c = (c0,c1,c2,… , cn-1) Here, cj = aj + bj  j = 0,1,2,..,n-1.

Multiplying Polynomials : Multiplying of two degree-bound ‘n’ polynomials A(x) and B(x) : C(x) = Ex-3 : Add & Multiply the following two polynomials : A(x) = x2 - 10 x + 9 B(x) = x2 + 4 x - 5 A(x) + B(x) = 2x2 - 6 x + 4 A(x) X B(x) = x4 – 6 x3 – 36 x2 + 86 x - 45

Horner’s Rule : Given the Polynomial : p(x) =  ai xi = a0 + a1 x + a2 x2 + … + an xn i = 0 to n Here,  i = 0,1,2,..,n-1,n ai is a real number. The above polynomial can be written in the form : p(x) = a0 + x (a1 + x (a2 + x (a3 + …. + x (an-1 + an x )……)) Let x = x0 Now, assume bn := an bn-1 := an-1 + bn xo ………….. b0 := a0 + b1 xo

Here let us substitute b values into expression of p(x0). So, p(x0) = a0 + x0 (a1 + x0 (a2 + x0 (a3 + …. + x0 (an-1 + bn x0 )……)) = a0 + x0 (a1 + x0 (a2 + x0 (a3 + …. + x0 bn-1 )……)) = ………… = a0 + x0 (a1 + x0 (a2 + x0 b3 )) = a0 + x0 (a1 + x0 b2) = a0 + x0 b1 = b0 Hence p(x0) = b0

Ex-4 : Evaluate 2x3 - 6x2 + 2x - 1 for x = 3 Synthetic Division : (Horner’s Method) x0 | x3 x2 x1 x0 ---------------------------------------- 3 | 2 - 6 2 - 1 | 6 0 6 ----------------------------------------- 2 0 2 5 i.e., The Value of p(x0) is 5.

Ex-5 : Evaluate x3 - 6x2 + 11 x - 6 for x = 2 Synthetic Division : (Horner’s Method) x0 | x3 x2 x1 x0 ---------------------------------------- 2 | 1 - 6 11 - 6 | 2 - 8 6 ----------------------------------------- 1 - 4 3 0 i.e., The Value of p(x0) is 0.

3. Point-Value Representation : A Point-Value Representation of a polynomial A(x) of degree-bound n is a set of n point-value pairs : {(x0 ,y0), (x1 ,y1), (x2 ,y2),…, (xn-1 ,yn-1),} such that all of the xk are distinct and yk = A(xk) for k = 0,1,2,…,n-1. Ex-6 : A(x) = x3 - 2 x + 1 Here, xk : 0, 1, 2, 3 A(xk ) : 1, 0, 5, 22  { (0,1), (1,0), (2,5), (3,22) }

Interpolation of PVR : The inverse of evaluation is Interpolation. - determines coefficient form of polynomial from point value representation. Theorem : (Uniqueness of an interpolating polynomial) “For any set {(x0 ,y0), (x1 ,y1), (x2 ,y2),…, (xn-1 ,yn-1),} of n point-value pairs  all the xk values are distinct, there is a unique polynomial A(x) of degree-bound n such that yk = A(xk) for k = 0, 1, 2, …, n-1.”

The above theorem can be written as : The matrix on the left is denoted V(x0 , x1 , x2 , …, xn-1). It is known as : Vander-monde Matrix. i.e., a = V -1 y.

Z =  j  k (x – xj) /  j  k (xk – xj) Lagrange’s Formula : A(x) =  yk Z, where k = 0 to n-1 Z =  j  k (x – xj) /  j  k (xk – xj) Ex-7 : Consider the PVR : [ (0,1), (1,0), (2,5), (3,22) ] Here, 1.[(x-1)(x-2)(x-3)] / [(0-1) (0-2) (0-3)] = (x3 - 6x2 + 11 x - 6) / - 6 = (-x3 + 6x2 - 11 x + 6) / 6 ….(1) And 0.[(x-0)(x-2)(x-3)] / [(1-0) (1-2) (1-3)] = 0 ….(2)

And 5.[(x-0)(x-1)(x-3)] / [(2-0) (2-1) (2-3)] = x3 - 2 x + 1 …Answer The above is the polynomial for the given PVR.

Adding Polynomials using PVR : Let C(x) = A(x) + B(x) A : [(x0 ,y0), (x1 ,y1), (x2 ,y2),…, (xn-1 ,yn-1)] B : [(x0 ,z0), (x1 ,z1), (x2 ,z2),…, (xn-1 ,zn-1)] C : [ (x0 , y0+ z0), (x1 , y1+ z1), …., (xn-1 , yn-1+ zn-1) ] Ex-8 : Find the value of C(x) in PVR, where A(x) = x3 - 2 x + 1 B(x) = x3 + x2 + 1 Let x = (0,1,2,3) Then A : [(0,1), (1,0), (2, 5), (3,22) ] B : [ (0,1), (1,3), (2, 13), (3, 37) ] Hence C : [(0,2), (1, 3), (2, 18), (3, 59) ]

Multiplying Polynomials using PVR : Let C(x) = A(x) . B(x) A : [(x0 ,y0), (x1 ,y1), (x2 ,y2),…, (x2n-1 ,y2n-1)] B : [(x0 ,z0), (x1 ,z1), (x2 ,z2),…, (x2n-1 ,z2n-1)] C : [ (x0 , y0 z0), (x1 , y1 z1),….,(x2n-1 , y2n-1+ z2n-1) ] Ex-9 : Find the value of C(x) in PVR, where A(x) = x3 - 2 x + 1 ; B(x) = x3 + x2 + 1 Let x = (-3,-2,-1,0,1,2,3) A : [(-3,20), (-2,-3), (-1,2),(0,1), (1,0), (2, 5), (3,22) ] B : [ (-3,-17),(-2,-3), (-1, 1),(0,1), (1,3), (2, 13), (3,17)] C : [(-3,340),(-2,9),(-1,2),(0,1), (1, 0), (2, 65), (3,814) ]

Ex-8 Contd… There are FOUR cordinates : C : [(0,2), (1, 3), (2, 18), (3, 59) ] Basing on First & Second Coordinates : - 2 x3 + 12 x2 - 22 x + 12 …..(1) 9 x3 - 45 x2 + 54 x …..(2) Basing on Third & Fourth Coordinates : - 54 x3 + 216 x2 - 162 x …..(1) 59 x3 - 177 x2 + 118 x …..(2) The denominator is 6. Finally 2 x3 + x2 - 2 x + 2

4. Complex Roots of Unity : A complex nth root of unity (1) is a complex number  such that n = 1. There are exactly n complex nth roots of unity : e2  i k / n for k = 0, 1, 2, …., n-1 where eiu = cos (u) + i sin (u) Using e2  i k / n = cos(2 k / n) + i sin(2 k / n) we can check that it is a root. (e2  i k / n)n = e2  i k = cos(2 k) + i sin (2k) = 1 + 0 = 1

Principal nth Root of Unity : The Value n = e 2 ∏ i /n Degrees : 00 450 900 1800 SIN 0 1/ 2 1 0 COS 1 1/ 2 0 -1 Principal nth Root of Unity : The Value n = e 2 ∏ i /n is called the ‘principal nth root of unity’. All of the other complex nth roots of unity are powers of n . The n complex nth roots of unity are : n0, n1, n2,….., nn-1 Note : Here, nn = n0 = 1

Ex-10 : Find the 8th complex roots of unity. The two roots of unity are : +1, - 1 The complex 4th roots of unity are : 1, - 1, i, - i where (-1) = i In general, the n complex roots of unity are equally spaced around the circle of unit radius centered at the origin of the complex plane. Note : nj . nk = nj+k = n(j + k) mod n

Visualizing 8 Complex 8th Roots of Unity :

First Root : 80 = 88 = 1 Here, k = 0, n = 8 So, 80 = e 2 ∏ i k / n = e 0 = 1 Second Root : Here, k = 1, n = 8 81 = e 2 ∏ i k / n = e 2 ∏ i / 8 = e ∏ i / 4 by using the formula eiu = cos (u) + i sin (u) So, 81 = cos (/4) + i sin (/4) = 1 / 2 + i / 2

So, 82 = cos (/2) + i sin (/2) = i Third Root : Here, k = 2, n = 8 82 = e 2 ∏ i k / n = e 2 ∏ i 2 / 8 = e ∏ i / 2 So, 82 = cos (/2) + i sin (/2) = i Fourth Root : Here, k = 3, n = 8 83 = e 2 ∏ i k / n = e 2 ∏ i 3 / 8 = e ∏ i 3 / 4 So, 83 = cos (3/4) + i sin (3/4) = cos ( - /4) + i sin ( - /4) = - cos /4 + i sin /4) [since cos ( - x) = - cos x, sin ( - x) = sin x] = - 1 / 2 + i /2

Fifth Root : Here, k = 4, n = 8 84 = e 2 ∏ i k / n = e 2 ∏ i 4 / 8 = e ∏ i So, 84 = cos () + i sin () = - 1 Sixth Root : Here, k = 5, n = 8 85 = e 2 ∏ i k / n = e 2 ∏ i 5 / 8 = e ∏ i 5 / 4 So, 85 = cos (5/4) + i sin (5/4) = cos ( + /4) + i sin ( + /4) = - cos /4 + i (- sin /4) [since cos ( + x) = - cos x, sin ( + x) = - sin x] = - 1 / 2 - i /2

Seventh Root : Here, k = 6, n = 8 86 = e 2 ∏ i k / n = e 2 ∏ i 6 / 8 = e 3∏ i / 2 So, 86 = cos ( + /2 ) + i sin ( + /2) = - cos (/2) + i (- sin (/2) ) = - 0 + i ( - 1) = - i Eighth Root : Here, k = 7, n = 8 87 = e 2 ∏ i k / n = e 2 ∏ i 7 / 8 = e ∏ i 7 / 4 So, 87 = cos (7/4) + i sin (7/4) = cos ( + 3/4) + i sin ( + 3/4) = - cos 3/4 + i (- sin 3/4) [since cos ( + x) = - cos x, sin ( + x) = - sin x] = cos /4 + i (- sin /4) = 1 / 2 - i /2