Why Recursion tree method is best than the Substitution method for solving a recurrence relation? Find the asymptotic upper bound of the following recurrence relation with the help of recursion tree method.
T(n)=T(n/4)+T(n/2)+Θ(n2)
Recursion tree method is best than the Substitution method for solving a recurrence relation because in recursion tree method, we draw a recurrence tree and calculate the time taken by every level of tree. Finally, we sum the work done at all levels. To draw the recurrence tree, we start from the given recurrence and keep drawing till we find a pattern among levels. The pattern is typically a arithmetic or geometric series but in substitution method we make a guess for the solution and then we use mathematical induction to prove the guess is correct or incorrect.
Write short notes on
Using greedy strategy, schedule the following jobs with deadline so as to maximize the profit.
Write short notes on
What do you mean by dynamic programming? Write the algorithm of chain matrix multiplication.
Write the string matching algorithm due to Knuth,Moris and Pratt. Analyze its time complexity.
Write a C program to addition of two matrices.
Write a C program to convert Centigrade temp into Farenhite temp.
Write a C program to check a number is even or odd.
What is the Modularity of a Software System ?