Professional Documents
Culture Documents
Amity Mod-1 L6 Recursion Tree Method
Amity Mod-1 L6 Recursion Tree Method
Module-1[Lecture-6]
Recursion tree method
1
Amity School of Engineering & Technology (CSE)
OBJECTIVES
After completing this section, you will be able to
Understand recursion tree method to solve Recurrence of the form:
[Decreasing function]
[Dividing Function]
2
Amity School of Engineering & Technology (CSE)
[Decreasing function]
3
Amity School of Engineering & Technology (CSE)
4
Amity School of Engineering & Technology (CSE)
Fig (a)
Fig (b)
5
Amity School of Engineering & Technology (CSE)
From equation (2), now will be the value of node having 3 branch (child nodes) each
of size T(n/16). Now each in figure-b will be replaced as follows:
6
Amity School of Engineering & Technology (CSE)
7
Amity School of Engineering & Technology (CSE)
Fig-(d) 8
Amity School of Engineering & Technology (CSE)
e) Finally, the total cost is the sum of the costs of all levels (called column
sum), which gives the solution of a given Recurrence. Thus,
Total cost=
Fig-(d) 9
Amity School of Engineering & Technology (CSE)
10
Amity School of Engineering & Technology (CSE)
Thank You!
11