Solve the recurrence relation T(n) = 3T(n-2)+n² using-
1. Substitution method
2. Subtract and conquer method
Answers
Answered by
0
Answer:
In the previous post, we discussed analysis of loops. Many algorithms are recursive in nature. When we analyze them, we get a recurrence relation for time complexity. We get running time on an input of size n as a function of n and the running time on inputs of smaller sizes. For example in Merge Sort, to sort a given array, we divide it in two halves and recursively repeat the process for the two halves. Finally we merge the results. Time complexity of Merge Sort can be written as T(n) = 2T(n/2) + cn. There are many other algorithms like Binary Search, Tower of Hanoi, etc.
Similar questions
Biology,
3 months ago
Computer Science,
3 months ago
Social Sciences,
3 months ago
Physics,
6 months ago
Geography,
11 months ago
Biology,
11 months ago