I'm trying to solve a recurrence T(n) = T(n/8) + T(n/2) + T(n/4)
.
I thought it would be a good idea to first try a recurrence tree method, and then use that as my guess for substitution method.
For the tree, since no work is being done at the non-leaves levels, I thought we could just ignore that, so I tried to come up with an upper bound on the # of leaves since that's the only thing that's relevant here.
I considered the height of the tree taking the longest path through T(n/2)
, which yields a height of log2(n)
. I then assume the tree is complete, with all levels filled (ie. we have 3T(n/2))
, and so we would have 3^i
nodes at each level, and so n^(log2(3))
leaves. T(n)
would then be O(n^log2(3))
.
Unfortunately I think this is an unreasonable upper bound, I think I've made it a bit too high... Any advice on how to tackle this?