03 - Polynomial Multiplication

# 03 - Polynomial Multiplication - Part I Divide and Conquer...

This preview shows pages 1–7. Sign up to view the full content.

Part I: Divide and Conquer Lecture 3: The Polynomial Multiplication Problem Lecture 3: The Polynomial Multiplication Problem Part I: Divide and Conquer

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Objective and Outline Objective : Show the general form of divide-and-conquer, and an second example of divide-and-conquer Outline: The general form of divide-and-conquer The polynomial multiplication problem A brute force algorithm A first divide-and-conquer algorithm An improved divide-and-conquer algorithm Remarks Lecture 3: The Polynomial Multiplication Problem Part I: Divide and Conquer
The general form of Divide-and-Conquer Divide Divide a given problem into subproblems (ideally of approximately equal size) No longer only two subproblems Conquer Solve each subproblem (directly or recursively ) Combine Combine the solutions of the subproblems into a global solution Lecture 3: The Polynomial Multiplication Problem Part I: Divide and Conquer

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Outline Outline: The general form of divide-and-conquer The polynomial multiplication problem A brute force algorithm A first divide-and-conquer algorithm An improved divide-and-conquer algorithm Remarks Lecture 3: The Polynomial Multiplication Problem Part I: Divide and Conquer
The Polynomial Multiplication Problem Definition (Polynomial Multiplication Problem) Given two polynomials A ( x ) = a 0 + a 1 x + · · · + a n x n B ( x ) = b 0 + b 1 x + · · · + b m x m Compute the product A ( x ) B ( x ) Example A ( x ) = 1 + 2 x + 3 x 2 B ( x ) = 3 + 2 x + 2 x 2 A ( x ) B ( x ) = 3 + 8 x + 15 x 2 + 10 x 3 + 6 x 4 Assume that the coefficients a i and b i are stored in arrays A [0 . . . n ] and B [0 . . . m ] Cost : number of scalar multiplications and additions Lecture 3: The Polynomial Multiplication Problem Part I: Divide and Conquer

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
What do we need to computer exactly? Define A ( x ) = n i =0 a i x i B ( x ) = m i =0 b i x i C ( x ) = A ( x ) B ( x ) = n + m k =0 c k x k Then c k = 0 i n , 0 j m , i + j = k a i b j , for all 0 k m + n Definition The vector ( c 0 , c 1 , . . . , c m + n ) is the convolution of the vectors ( a 0 , a 1 , . . . , a n ) and ( b 0 , b 1 , . . . , b m ) We need to calculate convolutions. This is a major problem in
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern