0
2.0kviews
Solve the following Recurrence

Using masters Algorithm or most appropriate methods how to solve the following Recurrence: 1) T(n)=T(n/2)+1

2) T(n)=T(n/2)+ n^2/2 +n

1 Answer
0
9views

1) Using Masters Theorem for Dividing Functions: T(n)=aT(n/b)+f(n). f(n)=Theta(n^k.logn^p). Here, log(a) to the base b is equal to 0. Also, k=0 and p=0. Thus, log(a) to base b=k and p>-1. Hence, we can say that Time Complexity of given relation will be equal to O(n^k.logn^(p+1)). Thus, substituting values of k …

Create a free account to keep reading this post.

and 3 others joined a min ago.

Please log in to add an answer.