Skip to content
Mad4Study

Engineering & Science

GATE Computer Science

  • GATE CS
  • 2026–27 pattern practice
  • Algorithms
  • Master theorem
  • Medium

What is the solution of the recurrence T(n)=2T(n/4)+nT(n) = 2T(n/4) + \sqrt{n}?

Asymptotic Analysis

Pick an option to check your answer.

Here a=2a = 2, b=4b = 4, so nlog⁡42=n1/2=nn^{\log_4 2} = n^{1/2} = \sqrt{n}.

  1. f(n)=n=Θ(nlog⁡ba)f(n) = \sqrt{n} = \Theta(n^{\log_b a}): Case 2.
  2. Every level of the recursion tree costs about n\sqrt{n}, and there are Θ(log⁡n)\Theta(\log n) levels.
  3. T(n)=Θ(nlog⁡n)T(n) = \Theta(\sqrt{n} \log n).

Why not the others

  • Θ(n)\Theta(\sqrt{n}) would be Case 3, but f(n)f(n) is not polynomially larger than n1/2n^{1/2}.
  • Θ(n)\Theta(n) overestimates both the per-level cost and the depth.
  • Θ(log⁡n)\Theta(\log n) ignores the n\sqrt{n} cost at each level.

Report an error

GATE CS · Algorithms · Asymptotic Analysis