Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

( 2 0 pts . ) Polynomial computation analysis. Suppose we want to evaluate the polynomial p ( x ) = a 0 + a

(20 pts.) Polynomial computation analysis. Suppose we want to evaluate the polynomial
p(x)=a0+a1x+a2x2+cdots+anxn
at some point x0.
(a) Consider the algorithm that computes first x0i for each i, using the fast exponentiation algorithm from lectures (without taking mod). Then, it computes a1x0,a2x02,a3x03,dots,anx0n(independently) and, finally, it adds all of these numbers to a0 to obtain p(x0). How many sums and how many multiplications are involved in this algorithm? Please provide short explanations. (You can give your answer in O-notation.)
(b) We show next how to do better using Horner's rule. Prove that the following algorithm outputs p(x0).
Algorithm 1 Horner's rule
z=an
for i=n-1 to 0 do:
z=z*x0+ai
end for
return z
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications 23rd International Conference Dexa 2012 Vienna Austria September 2012 Proceedings Part 1 Lncs 7446

Authors: Stephen W. Liddle ,Klaus-Dieter Schewe ,A Min Tjoa ,Xiaofang Zhou

2012th Edition

3642325998, 978-3642325991

More Books

Students also viewed these Databases questions

Question

Use C++ code Bank Charges or 15.00 and The Total Fee

Answered: 1 week ago

Question

Does it avoid use of underlining?

Answered: 1 week ago