Skip to content
Official PYQ · 1993

GATE CS 1993 Q8.7 — Asymptotic Worst Case Time and Space Complexity

Explain with AI

∑1≤k≤nO(n)\displaystyle \sum_{1\leq k\leq n} O(n), where O(n)O(n) stands for order nn is:

Select all correct options
View worked solution

Answer: B;C;D;E

To find the asymptotic upper bound of the summation ∑1≤k≤nO(n)\sum_{1 \le k \le n} O(n), we analyze the behavior of the sum:

∑k=1nO(n)=O(n)+O(n)+⋯+O(n)⏟n times\sum_{k=1}^{n} O(n) = \underbrace{O(n) + O(n) + \dots + O(n)}_{n \text{ times}}

Each term in the summation is bounded above by c⋅nc \cdot n for some positive constant cc. Summing this nn times gives:

∑k=1nO(n)≤∑k=1nc⋅n=c⋅n2=O(n2)\sum_{k=1}^{n} O(n) \le \sum_{k=1}^{n} c \cdot n = c \cdot n^2 = O(n^2)

Now let's evaluate each option based on the properties of Big-O notation:

  • Option B (O(n2)O(n^2)): This is the tightest upper bound of the summation.
  • Options D (O(3n2)O(3n^2)) and E (O(1.5n2)O(1.5n^2)): Constant factors inside the Big-O notation do not change the complexity class. Therefore, O(3n2)=O(n2)O(3n^2) = O(n^2) and O(1.5n2)=O(n2)O(1.5n^2) = O(n^2). Both are mathematically correct.
  • Option C (O(n3)O(n^3)): Since n2≤n3n^2 \le n^3 for all n≥1n \ge 1, any function that is O(n2)O(n^2) is also asymptotically bounded by O(n3)O(n^3). Thus, O(n3)O(n^3) is a valid (though looser) upper bound.

Hence, options B, C, D, and E are all correct.

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

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