

InterviewSolution
1. |
The recurrence T (n) = 7T (n / 2) + n 2 describes the running time of an algorithm A. Another algorithm B has a running time of T’(n) = k T’(n/ 4) + n 2 |
Answer» Answer: From the question the given recurrence relation is T(N)=7T(n/2)+n^2 while its solution is by the MASTER theorem of asymptotic complexity T(n)=Θ(n^log49base4). So, the general formulate of the complexity can be given as the recurrence relation T′(n)=αT′(n/4)+n^2. So, from the relation we have that, a=α,b=4,f(n)=n^2 n^loga base b=n^logα base 4, for the value of the α>16, f(n)=O(n^logα−ξ) where the ξ>0. Therefore, for α>16: T′(n)=Θ(n^logα base 4) Now A has to HOLD, for becoming asymptotically faster than A':- n^logα base 4 Consequently the value of α so that A′ is asymptotically faster than A will bet the value of 48. Explanation: |
|