Download Document

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Linear recurrences
and Fibonacci numbers
A rabbit problem
In a rabbit farm, we want to know the number of
does (female rabbits) we will have after a certain
number of months if
• A doe take one month to mature
• A doe gives birth to a doe every month after that.
• Rabbits never die.
• In the first month, we have only one newborn
doe.
n Fn Bn
1 1 0
2
1
1
3
2
1
4
3
2
5
5
3
6
8
5
Fn = Fn-1+Bn-1
Bn = Fn-1
Fn = Fn-1+Fn-2
Solution 1
1 5  1 5  
1
Theorem:







F n 5  2   2  
 
 

n
n
1
1

Proof:
1   1  5   1  5  






F1 5  2   2  
 
 

Check for F2
Fn = Fn-1+Fn-2
Replace and
check
The theorem is true by induction.
Solution 2
Fn
=
Bn
1 1 Fn-1
1 0 Bn-1
=
Fn = Fn-1+Bn-1
Bn = Fn-1
1 1 1 1 Fn-2
1 0 1 0 Bn-2
=
1 1
1 0
n-1
F1
B1
=
=
1 1
2
Bn-2
1 0
1 1
1 0
n-1
Fn-2
1
0
Solution 2
Fn
=
Bn
1 1
1 0
1 1
=
1 0
D=
n-1
r 0
0 s
VDV-1
1
0
1 1
n-1
= VDn-1V-1
1 0
r s r   1  5 , s   1 
V=
 2 
 2



1 1
5



Solution 2
Fn
Bn
=
=
1 1
n-1
1 0
r s r 0
1
0
n-1
1 1 0 s
r s
1 1

1 n n
Fn  5 r  s

-1
1
0
Solution 3
Rewrite all
equations as a
(F1,F2,F3,F4,…)={Fi}=F
vector equation.
Fn = Fn-1+Fn-2
0

0
0

0


1 0 0 ...  1 
 
0 1 0 ...  1 
0 0 1 ...  2 
 
0 0 0 ...  3 



     
L
L: The left shift
operator
L{Fi}={Fi+1}
Solution 3
Fn+2 = Fn+1+Fn
L2F = LF+F
I{Fi}={Fi}
(L2-L-I)F = 0
Ax = 0
(L-rI)(L-sI)F = 0
(L-sI)(L-rI)F = 0
1 5 
1 5 
, s  

r  

 2 
2




(L-rI)(L-sI)F = 0
(L-sI)(L-rI)F = 0
Everything in the null space of (L-sI)
and everything in the null space of
(L-rI) is a solution.
(L-sI)a = 0
(L-rI)b = 0
an+1 = san
an = sn-1a1
bn+1 = rbn
bn = rn-1b1
Fn = csn-1+drn-1
Fn = csn-1+drn-1
F1=1
F2=1
Solve for c and d
n
n

1   1  5   1  5  
F n  5   2    2  
 
 

Fibonacci numbers in nature
2 petals
3 petals
5 petals
34 petals
Fibonacci numbers in nature
Related documents