513 views
1 votes
1 votes

solve the above question and also calculate the solution for time Complexity Equation. 

1 Answer

1 votes
1 votes
T(n)= T(n-1)+T(n-2)+c

       =O(2^n)

This program is similar to Fibonacci series.The difference is that we need to multiply 1st recursive function by 2 n second recursive function by 3. Here multiply will take constant time.Only recursive functions will contribute to time complexity.

Related questions

0 votes
0 votes
1 answer
1
gateoverflow_ asked Aug 31, 2017
321 views
how to solve it further?
3 votes
3 votes
1 answer
2
sumit_kumar asked Jun 24, 2017
740 views
How to apply back substiution method on following recursive equation to find time complexity:T(n)= 2 T(n/2) + (n/log n) , where "n" is input.
2 votes
2 votes
1 answer
3
0 votes
0 votes
0 answers
4
usdid asked Apr 16, 2022
276 views
a) what is the iterative equation showing the running time of the algorithm whose pseudocode is given below? b) What is this repeated equation in asymptotic notation usin...