Skip to content
Official PYQ · 2015

GATE CS 2015 Set 3 Q4 — Asymptotic Worst Case Time and Space Complexity

Explain with AI

Consider the equality ∑i=0ni3=X\displaystyle{\sum_{i=0}^n} i^3 = X and the following choices for XX:

  1. Θ(n4)\Theta(n^4)
  2. Θ(n5)\Theta(n^5)
  3. O(n5)O(n^5)
  4. Ω(n3)\Omega(n^3)

The equality above remains correct if XX is replaced by

Choose one option
View worked solution

Answer: C

First, let us find the exact closed-form expression for the given sum of cubes:

∑i=0ni3=(n(n+1)2)2=n4+2n3+n24\sum_{i=0}^n i^3 = \left( \frac{n(n+1)}{2} \right)^2 = \frac{n^4 + 2n^3 + n^2}{4}

Since the highest degree term in the polynomial is n4n^4, the exact asymptotic growth rate of the sum is:

X=Θ(n4)X = \Theta(n^4)

Now, let us evaluate each of the given choices for XX based on the definitions of asymptotic notations:

  1. Θ(n4)\Theta(n^4): Correct. Since the sum is a polynomial of degree 44, its tight bound is indeed Θ(n4)\Theta(n^4).
  2. Θ(n5)\Theta(n^5): Incorrect. A function of order n4n^4 cannot be asymptotically tight with n5n^5.
  3. O(n5)O(n^5): Correct. By definition of Big-O (upper bound), any function that is Θ(n4)\Theta(n^4) is also O(n5)O(n^5) because n4≤c⋅n5n^4 \le c \cdot n^5 for sufficiently large nn.
  4. Ω(n3)\Omega(n^3): Correct. By definition of Big-Omega (lower bound), any function that is Θ(n4)\Theta(n^4) is also Ω(n3)\Omega(n^3) because n4≥c⋅n3n^4 \ge c \cdot n^3 for sufficiently large nn.

Thus, the equality remains correct if XX is replaced by I, III, or IV, but not II.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Asymptotic Worst Case Time and Space Complexity questions