PA of Algorithms Q81

0. Consider a list of recursive algorithms and a list of recurrence relations as shown below. Each recurrence relation corresponds to exactly one algorithm and is used to derive the time complexity of the algorithm.
List-I (Recursive Algorithm)List-II (Recurrence Relation)
P.Binary searchI.T(n) = T(n - k) + T(k) + cn
Q.Merge sortII.T(n) = 2T(n - 1) + 1
R.Quick sortIII.T(n) = 2T(n/2) + cn
S.Tower of HanoiIV.T(n) = T(n/2) + 1

Codes:
 PQRS
(a)IIIIIIVI
(b)IVIIIIII
(c)IIIIIIVI
(d)IVIIIIII

  • Option : B
  • Explanation :
     Algorithm Recurrence Relation
     P. Binary Search IV. T (n) = T (n/2) + 1
     Q. Merge Sort III. T (n) = 2T (n/2) + cn
     R. Quick Sort I. T (n) = T (n-k) + T (K)
     S. Tower of Hanoi II T (n) = 2T (n-1)+1
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 *