The GATE Grind

GATE 2015 CS (CS3) – Question 20

Algorithms · Asymptotic Analysis and Time/Space Complexity · 1 mark · Multiple choice

For $\sum_{i=0}^n i^3=X$, consider I $\Theta(n^4)$, II $\Theta(n^5)$, III $O(n^5)$, IV $\Omega(n^3)$. Which may replace X?

  1. I only
  2. II only
  3. I or III or IV, but not II
  4. II or III or IV, but not I

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: (C) I or III or IV, but not II

Explanation

The sum is $[n(n+1)/2]^2$, hence Θ(n⁴). It is also O(n⁵), a looser upper bound, and Ω(n³), a looser lower bound. It is not Θ(n⁵) because its ratio to n⁵ tends to zero. Thus C.

More Asymptotic Analysis and Time/Space Complexity questions

All Asymptotic Analysis and Time/Space Complexity questions →