

























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


























k
k-
k-
0
1
2
1
0
3
2
1
4
3
2
5
4
3
6
5
4
7
6
5
8
7
6
9
8
7
10
9
8
11
10
9
12
11
10
2
1
k
k
k
F
F
F
1
condition
initial
with
2
1
0
2
1
F
F k
F
F
F
k
k
k
0
1
2
k
2
1
2
1
2
5
1
2
5
1
2
5
1
2
5
1
F
1
Now
1
1
F
D
C
D
C n
n
n
n
n
n
n
5 1
5 1
F
then
2
5
1
and
2
5
1
Let
n
n
n
Running Time of Recursive Fibonacci Algorithm
n+
n+
n+
1
1
2
2
Running Time of Recursive Fibonacci Algorithm
Inductive HypothesisLet us suppose that statement is true some k
1
T(k)
F
k+
, for k =0, 1, 2,... and k
1
Now we show that statement is true for k + 1
Now, T(k + 1) = T(k) + T(k -1)
By definition on T(n)
T(k + 1) = T(k) + T(k -1)
F
k+
k
= F
k+
Assumption
T(k + 1)
F
k+
Hence the statement is true for k + 1.
We can now say with certainty that running time ofthis recursive Fibonacci algorithm is at least
(F
n+
).
Running Time of Recursive Fibonacci Algorithm
Golden Ratio
62 .
1
y x
y
y
x
Golden Ratio 0
1
1
1
1
i.e.
y
y
x
and
y
x
course
of
1
,
62 .
0
1
62 .
1
2
5
1
2
y x
x y
1
1