764 views
1 votes
1 votes

1 Answer

0 votes
0 votes
Recurrence Relation for Fib

T(n) = $\left\{\begin{matrix} 0 & if n=0 or 1 & \\ T(n-1) +t(n-2) + 1&if n>1 & \end{matrix}\right.$

Following this reccurence relation make a fib(6) ternary tree ( like T(2) goes to T(1) T(0) and +)

Now Function Calling - Pre-order
        Function Execution - post order
So there will be 16 function call before 7th addition.

Related questions

1 votes
1 votes
1 answer
1
1 votes
1 votes
1 answer
2
radha gogia asked Jul 21, 2015
2,202 views
I have already gone through the links of stackoverflow on this topic but still couldn't understand it clearly , so please explain the logic behind this .
3 votes
3 votes
1 answer
4
Pooja Palod asked Sep 25, 2015
1,333 views
Q1) What is the units digit of $\left (39^{11} – 32^{11} \right)$?    (a) 1  (b) 5    (c) 7  (d) 8Q2) What will be in the unit place of $45^8 + 19^{11} – 62...