Presentation is loading. Please wait.

Presentation is loading. Please wait.

Linear recurrences and Fibonacci numbers.

Similar presentations


Presentation on theme: "Linear recurrences and Fibonacci numbers."— Presentation transcript:

1 Linear recurrences and Fibonacci numbers

2 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.

3 n Fn Bn Fn = Fn-1+Bn-1 Bn = Fn-1 Fn = Fn-1+Fn-2

4 Solution 1 Check for F2 Replace and check Fn = Fn-1+Fn-2
Theorem: Proof: Check for F2 Replace and check Fn = Fn-1+Fn-2 The theorem is true by induction.

5 2 n-1 n-1 Solution 2 Fn = Fn-1+Bn-1 Fn Bn 1 1 1 0 Fn-1 Bn-1 =
1 1 1 0 Fn-1 Bn-1 = Bn = Fn-1 2 Fn-2 Bn-2 1 1 1 0 1 1 1 0 Fn-2 Bn-2 1 1 1 0 = = n-1 n-1 F1 B1 1 1 1 1 0 1 1 1 0 = =

6 n-1 n-1 Solution 2 Fn Bn 1 1 1 0 1 = 1 1 1 0 1 1 1 0 = VDV-1
1 1 1 0 1 = n-1 1 1 1 0 1 1 1 0 = VDV-1 = VDn-1V-1 r 0 0 s r s 1 1 D= V=

7 Solution 2 n-1 Fn Bn 1 1 1 0 1 = n-1 -1 r s 1 1 r 0 0 s r s 1 1 1 =

8 Solution 3 Rewrite all equations as a vector equation. Fn = Fn-1+Fn-2
(F1,F2,F3,F4,…)={Fi}=F L: The left shift operator L{Fi}={Fi+1} L

9 Solution 3 Fn+2 = Fn+1+Fn I{Fi}={Fi} L2F = LF+F Ax = 0 (L2-L-I)F = 0
(L-rI)(L-sI)F = 0 (L-sI)(L-rI)F = 0

10 (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 bn+1 = rbn an = sn-1a1 bn = rn-1b1 Fn = csn-1+drn-1

11 Fn = csn-1+drn-1 F1= F2=1 Solve for c and d

12 Fibonacci numbers in nature
2 petals 3 petals 5 petals 34 petals

13 Fibonacci numbers in nature


Download ppt "Linear recurrences and Fibonacci numbers."

Similar presentations


Ads by Google