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
0 0 votes
Article Rating
Subscribe
Notify of


0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: <b>Alert: </b>Content selection is disabled!!
DSSSB PGT 2021
October 17, 2023
Programming
October 17, 2023
DSSSB PGT 2021
October 17, 2023
Programming
October 17, 2023