(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
Consider the polynomial $p(x) = a_0 + a_1x + a_2x^2 + a_3x^3$ , where $a_i ≠0\; ∀i$. The minimum number of
 
Consider the polynomial $p(x) = a_0 + a_1x + a_2x^2 + a_3x^3$ , where $a_i ≠0\; ∀i$. The minimum number of
multiplications needed to evaluate p on an input x is:
+
multiplications needed to evaluate $p$ on an input $x$ is:
 
 
 
<b>(A) </b>3
 
<b>(A) </b>3
Line 16: Line 16:
  
  
As we can see, here we need only 3 multiplications, so option <b>(A)</b> is correct.
+
As we can see, here we need only three multiplications, so option <b>(A)</b> is correct.
 
 
Note that in question paper, $a_3x^2$ is written instead of $a_3x^3$, but for $a_3x^2$, answer is 2, because we can save  
+
Note that in question paper, $a_3x^2$ is written instead of $a_3x^3$, but for $a_3x^2$, answer is $2$, because we can save  
one more multiplication between $a_3$ and x, but 2 is not in the options, so I guess question paper had a printing mistake.
+
one more multiplication between $a_3$ and $x$, but $2$ is not in the options, so I guess question paper had a printing mistake.
  
  
Line 25: Line 25:
  
  
[[Category: Mathematics]]
+
 
 
[[Category: GATE2006]]
 
[[Category: GATE2006]]
[[Category: Mathematics questions]]
+
[[Category: Mathematics questions from GATE]]

Latest revision as of 11:47, 15 July 2014

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

(A) 3

(B) 4

(C) 6

(D) 9

Solution by Happy Mittal

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.

Note that in question paper, $a_3x^2$ is written instead of $a_3x^3$, but for $a_3x^2$, answer is $2$, because we can save one more multiplication between $a_3$ and $x$, but $2$ is not in the options, so I guess question paper had a printing mistake.




blog comments powered by Disqus

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

(A) 3

(B) 4

(C) 6

(D) 9

Solution by Happy Mittal[edit]

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 3 multiplications, so option (A) is correct.

Note that in question paper, $a_3x^2$ is written instead of $a_3x^3$, but for $a_3x^2$, answer is 2, because we can save one more multiplication between $a_3$ and x, but 2 is not in the options, so I guess question paper had a printing mistake.




blog comments powered by Disqus