Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

14. There is a more efficient algorithm (in terms of the number of multiplications and additions used) for eval- uating polynomials than the conventional algorithm

image text in transcribed
image text in transcribed
14. There is a more efficient algorithm (in terms of the number of multiplications and additions used) for eval- uating polynomials than the conventional algorithm de- scribed in the previous exercise. It is called Horner's method. This pseudocode shows how to use this method a" + an-- ao at x = c. procedure Horner(c, do, a, a, ..., ,. real numbers) y := an for i:=1 to n y:= y* c + an- return y {y = a,c" + an-1ch-1 + ... +ac+a,} a) Evaluate 3x2 + x +1 at x = 2 by working through each step of the algorithm showing the values as- signed at each assignment step. b) Exactly how many multiplications and additions are used by this algorithm to evaluate a polynomial of degree n at x = c? (Do not count additions used to increment the loop variable.)

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

More Books

Students also viewed these Databases questions

Question

What are some special items that might affect a firms cash budget?

Answered: 1 week ago

Question

What sources of personal financing are available to entrepreneurs?

Answered: 1 week ago

Question

Explain the function and purpose of the Job Level Table.

Answered: 1 week ago