1 / 17

Generalized Fibonacci Sequence: a n = Aa n-1 + Ba n-2 By: Caroline Chen Advisor: Jacob Matherne

Generalized Fibonacci Sequence: a n = Aa n-1 + Ba n-2 By: Caroline Chen Advisor: Jacob Matherne. What is the Fibonacci sequence?. Recurrence Relation--an equation that recursively defines a sequence: each term of the sequence is defined as a function of the preceding terms

xander
Download Presentation

Generalized Fibonacci Sequence: a n = Aa n-1 + Ba n-2 By: Caroline Chen Advisor: Jacob Matherne

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Generalized Fibonacci Sequence: an = Aan-1 + Ban-2 By: Caroline Chen Advisor: Jacob Matherne

  2. What is the Fibonacci sequence? Recurrence Relation--an equation that recursively defines a sequence: each term of the sequence is defined as a function of the preceding terms Defined as Fn = Fn-1 + Fn-2, with F0 = 0, F1 = 1, and n ≥ 2 Therefore F2 = 1, F3 = 2, F4 = 3 and F5 = 5…

  3. What is the closed formula for the Fibonacci sequence? Closed Formula: Fn = , where and and Can be shown: 1 + p = p2 and 1 + q = q2 Via Strong Induction Base Case: When n = 0, the closed formula holds. Substituting n = 1 holds as well. Assume this works for all F0…Fk. Show this works for some Fk+1.

  4. Continued… Fk+1 = Fk + Fk-1 = = = = = =

  5. What is the generalized Fibonacci sequence? Also a Recurrence Relation Defined as an = Aan-1 + Ban-2, with A and B as coefficients and a0 and a1 as some given seed values i.e. if a0 = 1and a1= 1 and A = 5 and B = 2, then a2 = Aan-1 + Ban-2 = 5(1) + 2(1)=7 a3 = Aan-1 + Ban-2 = 5(7) + 2(1) = 37 What is a4? Answer: a4 = 5(37) + 2(7) = 199

  6. What is the closed form for the generalized Fibonacci sequence? Guess that an = rn. Original Equation: an = Aan-1 + Ban-2 Reorganize the Equation: an – Aan-1 – Ban-2 = 0 Use our guess: rn – Arn-1 – Brn-2 = 0 Factor: rn-2(r2 – Ar– B) = 0 Since r ≠ 0, r2 – Ar– B = 0. Using the quadratic formula: r1= r2= an1= an2=

  7. Case 1 If A2 + 4B > 0, then there are two real roots: r1 and r2. Because our roots, r1 and r2, are linearly independent, a general formula can be written in the form: Here, the closed formula can be written as:

  8. Case 1 continued… Now we want and in terms of the givens (a0, a1, A, and B). By plugging in n = 0 and n = 1, we obtain two equations with two unknowns ( and ). Equation 1: Equation 2: or

  9. Case 1 continued… By solving that system of equations, you obtain: and So, the closed formula when A2 + 4B > 0 is:

  10. Case 1 continued… Let’s try an example! What is a4 when a0 = 3, a1 = 3, A = 1 and B = 2? Remember: Closed: Recursive: an = Aan-1 + Ban-2 Answer: a4 = 2(2)4 + (1)(-1)4 = 33

  11. Case 2 If A2 + 4B = 0, then there is only one distinct root: r = In our case, we can write a general formula in the form: where r is the root. Here, the closed formula can be written as: The general case occurs for a quadratic in the form: an= when there is only one root. The root here is . We use system of equations again like before. Ending with:

  12. Case 2 continued… Just like in Case 1, we must put and in terms of givens (a0, a1, A, and B). By plugging in n = 0 and n = 1. We obtain two equations with two unknowns ( and ). Equation 1: or Equation 2:

  13. Case 2 continued… By solving that system of equations, you obtain: and So, the closed formula when A2+4B = 0 is:

  14. Case 2 continued… Let’s try an example! What is a207 when a0 = 17, a1 = 7, A = 2 and B = -1? Remember: Answer: a207 = (17)(1)207 + (10)(207)(1)207 = 2087

  15. Case 3 DO IT YOURSELF!!!!!!!!!!!!!!!!!!

  16. summary Closed formula for Generalized Fibonacci Sequence: Case 1 (A2 + 4B > 0): Case 2 (A2 + 4B = 0): Case 3 (A2 + 4B < 0): Figure it out!

  17. Thank you.

More Related