Skip to content
Mad4Study

Engineering & Science

GATE Computer Science

  • GATE CS
  • 2026–27 pattern practice
  • Algorithms
  • Big-O notation
  • Medium

Which of the following statements is true?

Asymptotic Analysis

Pick an option to check your answer.

By Stirling's approximation, log⁡(n!)=nlog⁡n−n+O(log⁡n)\log(n!) = n\log n - n + O(\log n). Directly:

  1. Upper bound: n!≤nn⇒log⁡(n!)≤nlog⁡nn! \le n^n \Rightarrow \log(n!) \le n\log n.
  2. Lower bound: the largest n2\tfrac{n}{2} factors are each ≥n2\ge \tfrac{n}{2}, so n!≥(n2)n/2⇒log⁡(n!)≥n2log⁡n2n! \ge \left(\tfrac{n}{2}\right)^{n/2} \Rightarrow \log(n!) \ge \tfrac{n}{2}\log\tfrac{n}{2}.

Both bounds are Θ(nlog⁡n)\Theta(n\log n).

Why not the others

  • n2=O(nlog⁡n)n^2 = O(n\log n) is false: n2nlog⁡n=nlog⁡n→∞\tfrac{n^2}{n\log n} = \tfrac{n}{\log n} \to \infty.
  • 22n=O(2n)2^{2n} = O(2^n) is false: 22n2n=2n→∞\tfrac{2^{2n}}{2^n} = 2^n \to \infty.
  • n!=O(2n)n! = O(2^n) is false: n!n! outgrows 2n2^n since each new factor exceeds 22 for n≥3n \ge 3.

Report an error

GATE CS · Algorithms · Asymptotic Analysis