UGC-NET Jun 2014 · Asymptotic Analysis & Recurrences

MCQ · 2 marks · Problem PROG-DIVC-0051

The solution of the recurrence relation of $ T(n)=3T\left(floor \left(\frac{n}{4}\right)\right)+n$ is
  1. A
    $O(n^{2})$
  2. B
    $O(n/g n)$
  3. C
    $O(n)$
  4. D
    $O(l g n)$

Solve it on GATE DA practice →More Searching & Sorting Algorithms problems

Show the worked solution\[\boxed{f(n)=\Omega(n^{\log_b a+\epsilon})\text{ and regular}\Rightarrow T(n)=\Theta(f(n))}\]Here \(a=3,\ b=4\): \(n^{\log_4 3}\approx n^{0.79}\), while \(f(n)=n=\Omega(n^{0.79+0.2})\). Regularity: \(3\cdot\frac n4=\frac34 n\le c\,n\) with \(c=\frac34<1\). Case 3 of the master theorem gives\[T(n)=\Theta(n),\]so \(T(n)=O(n)\). The floor does not change the bound.Answer: C

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com