Recurrence Tree Method
Recurrence Tree Method
Divide and
Conquer
Algorithm
Prepared by:
Rachana R. Buch
• In this method, we draw a Recurrence Tree
Recursion and calculate the time taken by every level of
Tree tree.
• Finally, we make the total of the work done
Method at all the levels.
● To draw the recurrence tree, we start from the given
equation of the recurrence and keep drawing till we find a
pattern.
● The pattern is typically an arithmetic series or geometric
series.
Equation of Arithmetic series
How to
draw a
Recurrence Equation of Geometric series
Tree ?
● Solve the following recurrence using
Recursion tree method
T(n) = 2T(n/2) + n2
Examples -
1
Continue
Note
Note
Note
Note
● Solve the following recurrence using
Recursion tree method
T(n) = 3T(n/3) + n3
Examples - 2
Continue
Continue
● Solve the following recurrence using
Recursion tree method
T(n) = 3T(n/4) + n2
Examples - 3
Continue
Continue
Continue
Examples -
4
Examples - 4
Continue…