(a) -The naive algorithm computes independently each of the terms aixo, a₂x, a3x,...,anx and then adds all of these numbers to ao to obtain p(xo). How many sums and how many multiplications are used by this algorithm, as a function of n? (You can give your answer in O-notation.)

Operations Research : Applications and Algorithms
4th Edition
ISBN:9780534380588
Author:Wayne L. Winston
Publisher:Wayne L. Winston
Chapter2: Basic Linear Algebra
Section: Chapter Questions
Problem 15RP
Question
Evaluating Polynomials Consider a polynomial given by p(x) = ao+a₁x+a₂x² + ... + a₂x².
Consider the problem of evaluating it at some point xo, i.e. computing p(xo).
Transcribed Image Text:Evaluating Polynomials Consider a polynomial given by p(x) = ao+a₁x+a₂x² + ... + a₂x². Consider the problem of evaluating it at some point xo, i.e. computing p(xo).
(a) The naive algorithm computes independently each of the terms aixo, a2x, a3x,...,anx and
then adds all of these numbers to ao to obtain p(xo). How many sums and how many multiplications
are used by this algorithm, as a function of n? (You can give your answer in O-notation.)
Transcribed Image Text:(a) The naive algorithm computes independently each of the terms aixo, a2x, a3x,...,anx and then adds all of these numbers to ao to obtain p(xo). How many sums and how many multiplications are used by this algorithm, as a function of n? (You can give your answer in O-notation.)
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Rod cutting
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Operations Research : Applications and Algorithms
Operations Research : Applications and Algorithms
Computer Science
ISBN:
9780534380588
Author:
Wayne L. Winston
Publisher:
Brooks Cole