Skip to content

GATE CS 2022 Q1 — Asymptotic Worst Case Time and Space Complexity

Explain with AI

Which one of the following statements is TRUE\text{TRUE} for all positive functions f(n)?f(n)?

Choose one option
View worked solution

Answer: A

Let us analyze each option to determine the correct statement:

  • Option A: Let f(n)f(n) be a polynomial of degree kk where k≥0k \ge 0. Then, f(n)=Θ(nk)f(n) = \Theta(n^k).
    • f(n2)=Θ((n2)k)=Θ(n2k)f(n^2) = \Theta((n^2)^k) = \Theta(n^{2k})
    • (f(n))2=Θ((nk)2)=Θ(n2k)(f(n))^2 = \Theta((n^k)^2) = \Theta(n^{2k})
    Since both expressions are asymptotically equivalent to n2kn^{2k}, we have f(n2)=Θ((f(n))2)f(n^2) = \Theta((f(n))^2). Thus, Option A is TRUE.
  • Option B: Let f(n)=nf(n) = n. Then f(n2)=n2f(n^2) = n^2 and (f(n))2=n2(f(n))^2 = n^2. Since n2=Θ(n2)n^2 = \Theta(n^2), it is not o(n2)o(n^2). Thus, Option B is false.
  • Option C: Let f(n)=2nf(n) = 2^n (an exponential function). Then f(n2)=2n2f(n^2) = 2^{n^2} and (f(n))2=22n(f(n))^2 = 2^{2n}. Since 2n22^{n^2} grows much faster than 22n2^{2n}, f(n2)≠O((f(n))2)f(n^2) \neq O((f(n))^2). Thus, Option C is false.
  • Option D: Let f(n)=2−nf(n) = 2^{-n} (a positive decreasing function). Then f(n2)=2−n2f(n^2) = 2^{-n^2} and (f(n))2=2−2n(f(n))^2 = 2^{-2n}. For large nn, 2−n2<2−2n2^{-n^2} < 2^{-2n}, so f(n2)≠Ω((f(n))2)f(n^2) \neq \Omega((f(n))^2). Thus, Option D is false.

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

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