How to solve the recurrence equation
T(n) = T(n/2) + T(n/4)
For base case T(n)=1
I have already checked this and this for clue but it didn't help me solving it using iterative method
I just need to get to the general equation for this.
How to solve the recurrence equation
T(n) = T(n/2) + T(n/4)
For base case T(n)=1
I have already checked this and this for clue but it didn't help me solving it using iterative method
I just need to get to the general equation for this.
I don't see how to use the "iterative method" to solve this.
But there's a similarity between the recurrence relation you have and the that for the fibonacci numbers, and that can be used to find a solution.
T(2^k) = T(2^(k-1)) + T(2^(k-2)). So assuming T(1) = T(2) = 1, T(2^k) = Fib(k). So for n a power of 2, T(n) = Fib(lg(n)). Since Fib(n) = Theta(phi^n), T(n) = Theta(phi^(lg n)) = Theta(n ^ lg(phi)) ~= n^0.7
Here Fib(n) is the n'th Fibonacci number, and phi = (1 + sqrt(5))/2.