Beruflich Dokumente
Kultur Dokumente
Recursive Relations
Dr. Loredana Lanzani
Dr. Lanzani
8.1 8.3
Test 3.
Additional help: Enhanced Learning Center http://elc.uark.edu/ Gregson Hall (Garden Level) M F: 8:00am 5:00pm.
Dr. Lanzani
8.1 8.3
Chapter 8 overviev:
Review sequences and Recursive Sequences; learn techniques to Resolve recursive sequences.
Dr. Lanzani
8.1 8.3
8.1: Introduction.
Recall from Chapter 4: Example: dene a sequence S = {a1 , a2 , a3 , . . .} as follows. Set a1 = 2 ; Prove by induction: an = 2 5n1 n 1 (2) am = 5am1 m Z+ , m 2 . (1)
(1) and (2) are dierent formulas for the same sequence. Back in Chapter 4, we agreed that (2) is a better formula than (1) because it takes fewer calculations to compute values of the sequences using (2) than it would take using (1): formula (2) is faster than (1). Formula (1) is an example of a recurrence relation for the given sequence; identity (2) is the resolved formula for the same sequence.
Dr. Lanzani 8.1 8.3
b0 = 0 ; b1 = 1; bk = bk 1 + bk 2 k Z, k 2. This is the celebrated Fibonacci Sequence, or Fibonacci numbers. In his lifetime, Leonardo di Pisa (1175-1250; Fibonacci = Son of Bonaccio ) was a merchant who enjoyed playing with numbers; today he is acknowledged as the greatest European mathematician of the Middle Ages. Fibonacci came up with this numerical sequence when trying to model (predict) the reproductive growth of a pair of rabbits, read page 464 in the textbook. In fact, Fibonacci numbers are a common occurrence in the natural world.
Dr. Lanzani 8.1 8.3
8.1:
Fibonacci numbers: b0 = 0; b1 = 1; bk = bk 1 + bk 2 .
Solution: b0 = 0 (by given (IC)); b1 = 1 (by given (IC)); b2 = 1 (by (RR) and (IC)); b3 = 2 (previous steps and (RR)); b4 = 3 (prev. steps and (RR)). b5 = 5 (prev. steps and (RR)); b6 = 8 (prev. steps and (RR)); b7 = 13(prev. steps and (RR)). Answer: The rst eight Fibonacci numbers: {0, 1, 1, 2, 3, 5, 8, 13}. Note: sometimes the rst initial condition for the Fibonacci sequence is given as b0 = 1. The resulting sequence diers from the one above just by the rst element: {1, 1, 2, 3, 5, 8, 13, ...}
Dr. Lanzani 8.1 8.3
Dr. Lanzani
8.1 8.3
Fibonacci Spiral:
Dr. Lanzani
8.1 8.3
Dr. Lanzani
8.1 8.3
11/11/
Dr. Lanzani
8.1 8.3
The problem with Recurrence Relations is that calculating ak takes k -many computations: when k is large this takes a lot of time. Its much better to have a formula for ak that depends only on k , as we had in the example from Chapter 4: ak = 2 5k 1 (vs. ak = 5ak 1 ): we call such formula a resolved formula for the given sequence.
Dr. Lanzani
8.1 8.3
Question: Answer:
When can a recurrence relation be expressed by a resolved formula? For instance, in the following situation:
Denition: a Second Order Linear Homogeneous Recurrence Relation with Constant Coecients (SOLHRRCC) is a Recurrence Relation of the following type: ak = A ak 1 + B ak 2 , k k0
Second Order: only last two predecessors appear in (RR); Homogeneous: ak 1 and ak 2 have same power; Linear: (RR) is linear in ak 1 and ak 2 2 (e.g. ak 1 ak 2 ; ak 1 ; sin ak 2 etc... are not allowed; Constant Coecients: A and B are given constants and B = 0 (Second Order).
Dr. Lanzani
8.1 8.3
Example:
ak = 3ak 1 + 2ak 2 . Yes. (A = 3; B = 2). bk = bk 1 + bk 2 + bk 3 . No. (not SO: bk 3 ). 1 3 ck = ck 1 ck 2 . Yes. (A = 1/2, B = 3/7). 2 7 2 2 dk = dk + d k 2 . No. (not L: dk 1 ). 1 ek = ek 1 + ek 1 ek 2 . No. (not L: ek 1 ek 2 ). fk = 3fk 2 . Yes. (A = 0, B = 3). gk = 2gk 1 + 1. No. (not H: 1 = 1 (gk 2 )0 ). hk = hk 1 + hk 2 . Yes (A = 1, B = 1) does this (RR) look familiar? Its the (RR) of the Fibonacci numbers!
k
k 1
+ (k 1)
k 2 .
Dr. Lanzani
8.1 8.3
ak A ak 1 B ak 2 = 0 the characteristic equation of the (RR) is: t 2 At B = 0 This is a quadratic equation. Example: the Characteristic equation of the Fibonacci numbers: bk = bk 1 + bk 2 , is: t2 t 1 = 0
8.1 8.3
Dr. Lanzani
suppose the characteristic equation: t 2 At B = 0 has two distinct roots t1 = t2 . Then, bk has the following resolved formula:
k k bk = C t1 + D t2 ,
k k0
where C and D are two constants that are computed by imposing the initial conditions.
Dr. Lanzani
8.1 8.3
Thm. 8.3.3:
k k + D t2 t1 = t2 bk = C t1
Example: Find a resolved formula for the following (RR). Explain. bk = 5bk 1 6bk 2 , Solution: Relation is a SOHLRRCC t2 (A = 5, B = 6); Charact. Eqn. is: 5t + 6 = 0; roots are: t1,2 = 5 25 24 /2 = (5 1)/2 , i.e. t1 = 3, t2 = 2 By Thm. 8.3.3., resolved formula is: bk = C 3k + D 2k , k 0. compute C and D by imposing Initial Conditions:
b0 = 0 b1 = 1 0 = C 30 + D 20 = C + D C + D = 0; 1 = C 31 + D 21 = 3C + 2D 3C + 2D = 1;
b0 = 0, b1 = 1
D = C k 0
Dr. Lanzani
Thm. 8.3.3:
Solution:
k k + D t2 t1 = t2 bk = C t1
Example: Find a resolved formula for the Fibonacci numbers. bk = bk 1 + bk 2 , Charact. Eqn. is: t1 , 2 t2 b0 = 0, b1 = 1 (def. Fibonacci #s); (A = 1, B = 1);
Relation is a SOHLRRCC
k 0
b0 = 0 0 = C [(1 + 5)/2]0 + D [(1 5)/2]0 = C + D = C; C + D = 0 D 1 1 b1 = 1 1 = C [(1 5)/2] + 5)/2] + D [(1 1 = (C + D ) = 0 + 2C 5/2 D ) + 5/2(C C = 1/ 5; D = 1/ 5.
Dr. Lanzani 8.1 8.3
b0 = 0, b1 = 1 1 5 2
k
1 1+ 5 bk = 2 5
, k 0
5)/2.
lim bk +1 /bk =
Golden Rectangle: a rectangle whose sides a and b are in the proportion of the golden ratio (i.e. a/b = ).
Dr. Lanzani 8.1 8.3
the two constants C and D are computed by imposing the initial conditions.
Dr. Lanzani
8.1 8.3
Example: Find a resolved formula for the following (RR). Explain. bk = 4bk 1 4bk 2 , Solution: Relation is a SOHLRRCC Charact. Eqn. is: (A = 4, B = 4); roots are: t 2 4t + 4 = 0 = (t 2)2 ; b0 = 1, b1 = 3
t1 = t2 = 2, i.e. t0 = 2. By Case 2, , resolved formula is: bk = C 2k + D k 2k , k 0. compute C and D by imposing Initial Conditions:
b0 = 1 1 = C 20 + D 0 20 = C C = 1; b1 = 3 (and, C = 1) 3 = 1 21 + D 1 21 = 2 + 2D 2 + 2D = 3 D = 1/2;
Answer:
bk = 2k +
1 k 2k = 2k + k 2k 1 , 2
k 0
Dr. Lanzani
8.1 8.3