The Gateway to Computer Science Excellence
+27 votes

Consider the polynomial $p(x) = a_0 + a_1x + a_2x^2 + a_3x^3$ , where $a_i \neq 0$, $\forall i$. The minimum number of multiplications needed to evaluate $p$ on an input $x$ is:

  1. 3
  2. 4
  3. 6
  4. 9
in Numerical Methods by Boss | 3.1k views
By Horner's Rule
Is it in syllabus?
we can factorize the equation (x+r1)(x+r2)(x+r3), where r1,r2 and r3 are root of equation
so 3 multiplication
Hello reena

Doesn't (x+r1)(x+r2)(x+r3) need 2 multiplication ?

Why're you sure enough that coefficient of $x^{3}$ in our general given equation would be 1 ?

3 Answers

+23 votes
Best answer
We can use just horner's method, according to which, we can write p(x) as :

        $$p(x) = a_0 + x(a_1 + x(a_2 + a_3x))$$

        As we can see, here we need only three multiplications, so option (A) is correct.
by Boss
selected by

Sir, if the question would be-:

Total number of arithmetic operation required,then answer would be $6(3+3)$.right?

@sourav I agree, it should be 6.
+5 votes
a_0+x(a_1+x(a_2+a_3x)) so 3 multiplications required
by Boss
+1 vote

Using Horner's rule to evaluate p(x)

p(x) = a_0 + a_1 x + a_2 x^{2} + a_3 x^{3}
p(x) = a_0 + x(a_1 + a_2 x + a_3 x^{2})
p(x) = a_0 + x(a_1 + x(a_2 + a_3x))
p(x) = a_0 + x*(a_1 + x*(a_2 + a_3*x))

So, 3 minimum number of multiplication needed to evaluate p on an input x.

Hope this helps :)

by Active
edited by

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
52,223 questions
59,818 answers
118,091 users