Question

In: Computer Science

Polynomial Multiplication by Divide-&-Conquer A degree n-1 polynomial ? (?) =Σ(n-1)(i=0) ???i = ?0 + ?1?...

Polynomial Multiplication by Divide-&-Conquer

A degree n-1 polynomial ? (?) =Σ(n-1)(i=0) ???i = ?0 + ?1? + ?2?2 ... + ??−1?n-1 can be

represented by an array ?[0. . ? − 1] of its n coefficients. Suppose P(x) and Q(x) are two polynomials of degree n-1, each given by its coefficient array representation. Their product P(x)Q(x) is a polynomial of degree 2(n-1), and hence can be represented by its coefficient array of length 2n-1. The polynomial multiplication problem is to compute the coefficient array of P(x)Q(x), given the coefficient arrays of P(x) and of Q(x).

There is an obvious Θ ?2 (i.e., quadratic) time algorithm to solve this problem. However, a method similar to the divide-&-conquer integer multiplication algorithm of Karatsuba-Ofman can achieve sub-quadratic time complexity. Design and analyze one such sub-quadratic algorithm for the polynomial multiplication problem.

Solutions

Expert Solution

Running Time For Following Algorithm Is wich is Better

PolyMulti(P(x),(x))

begin

end

Thus as you can see from above steps and process that it need to call recursive multiplication procedure three times rather than four times

Hence

RUNNING TIME OF ALGORITHM WILL BE REDUCED TO .... Given in above image

**** HELLO I HAVE ADDED MORE DETAILS AS YOU REQUERED PLEASE REPLACE A WITH P AND B WITH Q AS PER YOUR REQUIREMENTS****

****THANK YOU****


Related Solutions

3. Suppose that a divide and conquer algorithm for multiplication of n x n matrices is...
3. Suppose that a divide and conquer algorithm for multiplication of n x n matrices is found such that it requires 6 multiplications and 31 additions of n/2 x n/2 submatrices. Write the recurrence for the running time T(n) of this algorithm and find the order of T(n).
Design and analyze a divide-and-conquer algorithm for finding the maximum element in a list: L[0: n – 1].
The following submission rules apply:·    For those questions requiring programs, the solutions must be implemented using JavaScript or Java.o Appropriate self-documenting comments in the source code are mandatory, consistent with good programming practices.o Solutions must be provided in plain text so that formatting is not lost.·    All answers must be provided in this document.·    Sources must be given accurate and complete citations sufficient for the instructor to find and confirm them.Design and analyze a divide-and-conquer algorithm for finding the maximum...
Let f be an irreducible polynomial of degree n over K, and let Σ be the...
Let f be an irreducible polynomial of degree n over K, and let Σ be the splitting field for f over K. Show that [Σ : K] divides n!.
Divide and conquer problem. Suppose we are given two sorted arrays A[1 . . . n]...
Divide and conquer problem. Suppose we are given two sorted arrays A[1 . . . n] and B[1 . . . n] and an integer k. Describe an algorithm to find the kth smallest element in the union of A and B in O(log n) time. For example, if k = 1, your algorithm should return the smallest element of A ∪ B; if k = n, your algorithm should return the median of A ∪ B.) You can assume...
In class we saw that the fast divide and conquer integer multiplication method takesO(nlog3) time. Thisis...
In class we saw that the fast divide and conquer integer multiplication method takesO(nlog3) time. Thisis because the the shifts and additions can be done in time O(n). Suppose we use a very inefficient method for doingthe shifts and additions, so these take timeO(n2). With this slower method for doing the shifts and additions, figureout how much time will the divide and conquer integer multiplication method take . You can assume that nothing elsechanges in the divide and conquer integer...
Let P(x) be a polynomial of degree n and A = [an , an-1,.... ] Write...
Let P(x) be a polynomial of degree n and A = [an , an-1,.... ] Write a function integral(A, X1, X2) that takes 3 inputs A, X0 and X1 A as stated above X1 and X2 be any real number, where X1 is the lower limit of the integral and X2 is the upper limit of the integral. Please write this code in Python.
Let P(x) be a polynomial of degree n and A = [an , an-1,.... ] Write...
Let P(x) be a polynomial of degree n and A = [an , an-1,.... ] Write a function integral(A, X1, X2) that takes 3 inputs A, X0 and X1 A as stated above X1 and X2 be any real number, where X1 is the lower limit of the integral and X2 is the upper limit of the integral. Please write this code in Python. DONT use any inbuilt function, instead use looping in Python to solve the question. You should...
Let A be an integer array of length n. Design a divide and conquer algorithm (description...
Let A be an integer array of length n. Design a divide and conquer algorithm (description and pseudo code) to find the index of an element of the minimum value in the array. If there are several such elements, your algorithm must return the index of the rightmost element. For instance, if A = {0,2,4,5,2,0,3,10}, then the algorithm should return 5, which is the index of the second 0.
If p(z) is a polynomial of degree n and that if α is a root of...
If p(z) is a polynomial of degree n and that if α is a root of p(z) = 0, then p(z) factors as p(z) = (z−α)q(z) where q(z) has degree (n − 1). Use this and induction to show that a polynomial of degree n has at most n roots.
Is there a fourth degree polynomial that takes these values? x 1 -2 0 3 -1...
Is there a fourth degree polynomial that takes these values? x 1 -2 0 3 -1 7 y -2 -56 -2 4 -16 376
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT