DSSSB PGT 2021

October 17, 2023

Programming

October 17, 2023

DSSSB PGT 2021

October 17, 2023

Programming

October 17, 2023

Programming

Question 42

The minimum number of arithmetic operations required to evaluate the polynomial P(X) = X5 + 4X3 + 6X + 5 for a given value of X, using only one temporary variable is ________.

A
7
B
8
C
9
D
10
Question 42 Explanation: 
The minimum number of arithmetic operations required to evaluate
P(X) = x5+4x3+6x+5
= x(x4+4x2+6)+5
= x(x(x3+4x)+6)+5
= x(x(x(x2+4))+6)+5
= x(x(x(x(x)+4))+6)+5
4 multiplications & 3 additions.
4 + 3 = 7
Correct Answer: A
Question 42 Explanation: 
The minimum number of arithmetic operations required to evaluate
P(X) = x5+4x3+6x+5
= x(x4+4x2+6)+5
= x(x(x3+4x)+6)+5
= x(x(x(x2+4))+6)+5
= x(x(x(x(x)+4))+6)+5
4 multiplications & 3 additions.
4 + 3 = 7

Leave a Reply

Your email address will not be published. Required fields are marked *