Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1. The conventional algorithm for evaluating a polynomial once + an_1mn_1 expressed in pseudocode by +~~-+a1:e+a0atm=ccanbe procedure polynomiaKc, a0, a1, . . . , an:
1. The conventional algorithm for evaluating a polynomial once\" + an_1mn_1 expressed in pseudocode by +~~-+a1:e+a0atm=ccanbe procedure polynomiaKc, a0, a1, . . . , an: real numbers) power 2: 1 y 3: a0 fori := 1 to n power 2: power *0 y := y + az- at: power return y{y = one\" + an_lcn_1 + + one + a0} where the nal value of y is the value of the polynomial at a: = c. a) Evaluate 3x2 + m + 1 at x = 2 by working through each step of the algorithm showing the values assigned at each assignment step. b) Exactly how many multiplications and additions are used to evaluate a polynomial of degree n at m = (1? (Do not count additions used to increment the loop variable.)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started