Answer to Question #271977 in Algorithms for Anu

Question #271977

(a) Write a brute force method and Horner’s algorithm to evaluate a polynomial expression

and compute their complexities

(b) Evaluate the following polynomial expression using Horner’s rule. Assume the value of x

is 3.

p(𝑥) = 10𝑥5 + 6x4 + 3𝑥3 − 6𝑥2 + 8𝑥 + 15

Show all the intermediate steps.


1
Expert's answer
2021-11-26T17:42:57-0500

b)

f(x) = a0 + a1x + a2x2 + a3x3 + a4x4 + a5x5


Can be arranged as follows

at "x_o"

f(x0) = a0 + x0(a1 + x0(a2 + x0(a3 + x0(a4 + a5x0))))


So

At k= 5

b5= a5=10


At k=4

b4=a4+xob5= 6+3×10=36


At k=3

b3=a3+xob4=3+3×36=111


At k=2

b2=a2+xob3=-6+3×111=327


At k=1

b1=a1+xob2=8+3×327=989


At k=0

b0=a0+xob1=15+3×989=2982


Therefore

"f(3)=2982"


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS