380 views

1 Answer

0 votes
0 votes

According to master theorem - 

T(n) = aT(n/b) + f(n) where a >= 1 and b > 1

There are following three cases:
1. If f(n) = Θ(nc) where c < Logba then T(n) = Θ(nLogba)

2. If f(n) = Θ(nc) where c = Logba then T(n) = Θ(ncLog n)

3.If f(n) = Θ(nc) where c > Logba then T(n) = Θ(f(n))

  1.  a = 2^n
  2. b = 2
  3. c = n
  4. c = Logba
  5. T(n) = Θ(ncLog n)

so T(n) = Θ(n^n Log n)

Answer:

Related questions