Chapter 13 Fibonacci Numbers and the Golden Ratio
Chapter 13: Fibonacci Numbers and the Golden Ratio Section 13. 1: Fibonacci Numbers ALWAYS LEARNING Copyright © 2018, 2014, 2010 Pearson Education Inc. Slide 1
Example – Fibonacci’s Rabbits We start this section with a brief discussion of the Fibonacci rabbit problem. The key elements of Fibonacci’s rabbit problem are as follows: • Start. The population count starts with one pair of baby rabbits (P 0 = 1). [Note: The rabbit count is by pairs, and each pair is assumed to be a male and a female. ] • Month 1. One month later the original pair is mature and able to produce offspring, but there is still one pair of rabbits: P 1 = 1. • Month 2. The original pair produces a baby pair. There are now two pairs (one baby pair plus the parent pair): P 2 = 1 + 1 = 2. ALWAYS LEARNING Copyright © 2018, 2014, 2010 Pearson Education Inc. Slide 2
Example – Fibonacci’s Rabbits (cont) • Month 2. The original pair produces a baby pair. There are now two pairs (one baby pair plus the parent pair): P 2 = 1 + 1 = 2. • Month 3. The original pair produces another baby pair. There are now three pairs [the two pairs from the previous month (now both mature) plus the new baby pair]: P 3 = ALWAYS LEARNING Copyright © 2018, 2014, 2010 Pearson Education Inc. Slide 3
Example – Fibonacci’s Rabbits (cont) • Month 3. The original pair produces another baby pair. There are now three pairs [the two pairs from the previous month (now both mature) plus the new baby pair]: P 3 = 2 + 1 = 3. • Month 4. The two mature pairs in the previous month both have offspring. There are now five pairs [the three pairs from the previous month plus two new baby pairs]: P 4 = ALWAYS LEARNING Copyright © 2018, 2014, 2010 Pearson Education Inc. Slide 4
Example – Fibonacci’s Rabbits (cont) • Month 4. The two mature pairs in the previous month both have offspring. There are now five pairs [the three pairs from the previous month plus two new baby pairs]: P 4 = 3 + 2 = 5. • Month 5. The three mature pairs in the previous month all have offspring. There are now eight pairs [the five pairs from the previous month plus three new baby pairs]: P 4 = 5 + 3 = 8. ALWAYS LEARNING Copyright © 2018, 2014, 2010 Pearson Education Inc. Slide 5
Example – Fibonacci’s Rabbits (cont) As long as the rabbits continue doing their thing and don’t die, the pattern will continue: Each month the population will consist of the population in the previous month (mature pairs) plus the population in the previous month (baby pairs). It’s a lot easier to express the idea in mathematical notation: • Month N. PN = PN-1 + PN-2. The month-by-month sequence for the growth of the rabbit population is given by 1, 1, 2, 3, 5, 8, 13, 21, . . This sequence is commonly called the Fibonacci sequence. ALWAYS LEARNING Copyright © 2018, 2014, 2010 Pearson Education Inc. Slide 6
Fibonacci Sequence • Infinite list form: 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, . . . The numbers in the Fibonacci sequence are called the Fibonacci numbers. (The conventional notation is to use FN to describe the Nth Fibonacci number and to start the count at F 1, so we write F 1 = 1, F 2 = 1, F 3 = 2, F 4 = 3, etc. ) F 8 = F 10 = F 13 = ALWAYS LEARNING Copyright © 2018, 2014, 2010 Pearson Education Inc. Slide 7
Recursive Sequence and Formula • A Recursive Sequence is a Sequence or List of numbers that use the previous number(s) to determine the next number in the List. • Recursive formula for the Fibonacci Sequence FN = FN-1 + FN-2; F 1 = 1 and F 2 = 1. FN represents the Nth term of the Fibonacci Sequence FN-1 represent the term BEFORE the nth term or term we are focusing on. FN-2 represents 2 terms BEFORE the nth term or term we are focusing on. ALWAYS LEARNING Copyright © 2018, 2014, 2010 Pearson Education Inc. Slide 8
Fibonacci Sequence and the Recursive Formula • Infinite list form: 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, . . . FN is a term we have yet to define For Example: If we say n is 7, then FN is F 7 Which is what term: What is FN-1 in the above example: ALWAYS LEARNING What is FN-2 Copyright © 2018, 2014, 2010 Pearson Education Inc. Slide 9
Example – Fibonacci Numbers Get Big Fast Suppose you were given the following choice: You can have $100 billion or a sum equivalent to F 100 pennies. Which one would you choose? Surely, this is a no brainer—how could you pass on the $100 billion? But before you make a rash decision, let’s see if we can figure out the dollar value of the second option. To do so, we need to compute the 100 th Fibonacci number F 100. ALWAYS LEARNING Copyright © 2018, 2014, 2010 Pearson Education Inc. Slide 10
Example – Fibonacci Numbers Get Big Fast How could one find the value of F 100? With a little patience (and a calculator) we could use the recursive formula for the Fibonacci numbers as a “crank” that we repeatedly turn to ratchet our way up the Fibonacci sequence: From the seeds F 1 and F 2 we compute F 3, then use F 3 and F 2 to compute F 4, and so on. If all goes well, after many turns of the crank (we will skip the details) you will eventually get to F 100 = F 99 + F 98 = 354, 224, 848, 179, 261, 915, 075 ≈ $3, 542, 248, 481, 792, 619, 150 (That’s enough for you to take your $100 billion and give every man, woman, and child on Earth more that $450 million each! ALWAYS LEARNING Copyright © 2018, 2014, 2010 Pearson Education Inc. Slide 11
Fibonacci Sequence: Explicit Formulas In 1736 Leonhard Euler (the same Euler behind the namesake theorems) discovered a formula for the Fibonacci numbers that does not rely on previous Fibonacci numbers. The formula was lost and rediscovered 100 years later by French mathematician and astronomer Jacques Binet, who somehow ended up getting all the credit, as the formula is now known as Binet’s formula. ALWAYS LEARNING Copyright © 2018, 2014, 2010 Pearson Education Inc. Slide 12
Binet’s Formula (Original Version) Admittedly, Binet’s original formula is quite complicated and intimidating, and even with a good calculator you might have trouble finding an exact value when N is large, but there is a simplified version of the formula that makes the calculations a bit easier. ALWAYS LEARNING Copyright © 2018, 2014, 2010 Pearson Education Inc. Slide 13
Binet’s Formula (Simplified Version) , where means “rounded to the nearest integer. Binet’s simplified formula is an explicit formula (we don’t have to know the previous Fibonacci numbers to use it), but it only makes sense to use it to compute very large Fibonacci numbers (for smaller numbers you are much better off using the recursive formula). ALWAYS LEARNING Copyright © 2018, 2014, 2010 Pearson Education Inc. Slide 14
Fibonacci Numbers in Nature One of the major attractions of the Fibonacci numbers is how often they show up in natural organisms, particularly flowers and plants that grow as spirals. • The petal counts of most varieties of daisies are Fibonacci numbers —most often 3, 5, 8, 13, 21, 34, or 55 (but giant daisies with 89 petals also exist). • The bracts of a typical pinecone arranged in 5, 8, and 13 spiraling rows depending on the direction you count. • The seeds on a sunflower head are arranged in 21 and 34 spiraling rows. ALWAYS LEARNING Copyright © 2018, 2014, 2010 Pearson Education Inc. Slide 15
- Slides: 15