Question: ( 2 0 pts . ) Polynomial computation analysis. Suppose we want to evaluate the polynomial p ( x ) = a 0 + a
pts Polynomial computation analysis. Suppose we want to evaluate the polynomial
cdots
at some point
a Consider the algorithm that computes first for each using the fast exponentiation algorithm from lectures without taking mod Then, it computes dots,independently and, finally, it adds all of these numbers to to obtain How many sums and how many multiplications are involved in this algorithm? Please provide short explanations. You can give your answer in notation.
b We show next how to do better using Horner's rule. Prove that the following algorithm outputs
Algorithm Horner's rule
for to do:
end for
return
CMPSC Spring HW
c How many additions and multiplications does this algorithm use as a function of Please provide short explanations. You can give your answer in notation.
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
