Question: Suppose you have two polynomials P ( x ) and Q ( x ) which are to be multiplied together. Assume that P ( x
Suppose you have two polynomials Px and Qx which are to be multiplied together. Assume that Px has n nonzero terms and that Qx has m nonzero terms, where n m The polynomials are represented using linked lists for reasons of space efficiency and the lists should store the nonzero terms ordered from largest power to smallest power. a Draw a picture of the linkedlist representation of Pxx x marks.b Give an On times mtime algorithm for performing the multiplication marks.c Weiss proposes an alternative algorithm based on generating all of the ntimes m terms in the product, sorting these according to the exponent and then coalescing together any adjacent terms that have identical exponent. Comment on
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
