ISRO Computer Science (CSE) 2023 - Question 5

All ISRO Computer Science (CSE) papers | ISRO Computer Science (CSE) 2023

Topic: Algorithms

The minimum number of arithmetic operations required to evaluate the expression $f(z)=8z^{3}+3z+12$ is

  • A. 4
  • B. 5
  • C. 3
  • D. 6

Answer: B. 5

Explanation: Using Horner's method, the expression can be rewritten to minimize operations: $f(z) = z \times (z \times (8z) + 3) + 12$. The operations are: 1) $8 \times z$, 2) $\times z$, 3) $+ 3$, 4) $\times z$, 5) $+ 12$. This results in a total of 3 multiplications and 2 additions, equaling 5 arithmetic operations.

| | All questions of ISRO Computer Science (CSE) 2023