Given Equation: T(n) = T(n/4) + T(n/2) + n^2
Model of Tree:
T(n) -- Level 1
/ \
T(n/4) T(n/2) -- Level 2
/ \ / \
T(n/16) *T(n/8) T(n/4) *T(n/8) -- Level 3
From Lecture of MIT Algorithm Class: http://www.youtube.com/watch?v=whjt_N9uYFI
Minute: 38:53
Question: How, What and Why 3rd level becomes n/8 ? What is the explicit equation to create recursion tree?
This isn’t the homework question by the way.
The original tree is this:
When you expand the first branch, you make a substitution
n = n/4so you get:and similarly for the second branch,
n = n/2so substituting these expansions back into
T(n)you get