Question: Problem 2. In this problem we want to find the value of a polynomial, p(2), for a given value of x, using: p(x) = anx

 Problem 2. In this problem we want to find the value

Problem 2. In this problem we want to find the value of a polynomial, p(2), for a given value of x, using: p(x) = anx" + an-1.4- +...+011+ ao Assume, you are given an array A[0, ..., n] of the coefficients do, ...,an. For this problem the cost is computed by the number of multiplications. (a) Write pseudo-code for a brute-force algorithm to find the polynomial value in the worst- case. Analyze the exact number of multiplications. Show your work. (b) Write pseudo-code for an optimal algorithm to find the polynomial value in the worst-case. Analyze the exact number of multiplications. Show your work

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!