Nov2017 cs Q33

0. Consider the recurrence relation:


 Where b and c are constants. The order of the algorithm corrosponding to above recurrence relation is:

  • Option : D
  • Explanation :
    We can use Master theorem to solve this recurrance relation:T(n) = aT(n/2) + Θ(nklogpn)
    In given question:
    T(n) = 8T(n/2) + Cn
    here a = 8 and b = 2 and k = 1.
    clearly a > bk
    So T(n) = Θ(nlogba )
    T(n) = Θ(nlog2 8)
    ie T(n) = Θ(n3)
    So, option (D) is correct.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *