GATE / CS ARCHIVE

GATE CSE 2006 / QUESTION 1

Horner's rule evaluation

Algorithms · Asymptotic Analysis & Recurrences · Full GATE CSE 2006 paper

GATE 2006, Q1 1 mark · MCQ
Report issue

Asymptotic Analysis & Recurrences

Question 1, GATE 2006: For nonzero coefficients a₀,…,a₃, consider p(x)=a₀+a₁x+a₂x²+a₃x³. What is the minimum multiplication count for evaluating p at x? This is the GFG cubic reading; GateForum prints a₃x² instead, and neither source explicitly says generic coefficients.
Options:
(A) 3
(B) 4
(C) 6
(D) 9
Tap to enlarge
Your answer
Answer & solution

Answer: A for generic cubic coefficients (no official key was published)

1. The the paper displays a cubic: p=a0+x(a1+x(a2+a3x)). Horner evaluation uses three multiplications and three additions, giving A under the conventional generic-coefficient evaluation model.

2. Nonzero coefficients alone also do not rule out special simplifications, for example (x+1)3 uses two multiplications after forming x+1.

3. Thus three is the standard generic cubic cost, not a universal lower bound for every coefficient choice. Original official wording and key remain unavailable.

4. Teaching check: Evaluate the nested form from the inside: t=a₃x+a₂, then t=tx+a₁, then p=tx+a₀. Each stage contributes one multiplication. The answer depends on treating the cubic as a generic polynomial; it is not a theorem about every particular nonzero coefficient tuple.

Original paper, page 1