StreakPeaked· Practice

ExamsGATEEngineering Mathematics

Which one of the following correctly determines the solution of the recurrence relation with T(1) = 1? T(n) = 2T(n/2) + log n

  1. Θ(n)
  2. Θ(n log n)
  3. Θ(n²)
  4. Θ(log n)

Correct answer: Θ(n)

Solution

Here a=2, b=2, so n^(log_b a)=n. Since f(n)=log n = O(n^(1-e)), Master theorem case 1 applies and T(n)=Theta(n). The answer is Theta(n), not Theta(n log n).

Related GATE Engineering Mathematics questions

⚔️ Practice GATE Engineering Mathematics free + battle 1v1 →