1 / 10

Discrete Structures

Discrete Structures. Chapter 5: Sequences, Mathematical Induction, and Recursion 5.6 Defining Sequences Recursively. So, Nat’ralists observe, a Flea/Hath smaller Fleas on him prey, /And these have smaller Fleas to bite ‘ em , /And so proceed ad infinitum. – Jonathan Swift, 1667 – 1745.

Download Presentation

Discrete Structures

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. Discrete Structures Chapter 5: Sequences, Mathematical Induction, and Recursion 5.6 Defining Sequences Recursively So, Nat’ralists observe, a Flea/Hath smaller Fleas on him prey, /And these have smaller Fleas to bite ‘em, /And so proceed ad infinitum. – Jonathan Swift, 1667 – 1745 5.6 Defining Sequences Recursively

  2. Definition • Recurrence Relation A recurrence relation for a sequence a0, a1, a2, … is a formula that relates each term ak, to certain of its predecessors ak-1, ak-2, …, ak-i where iis an integer with k – i 0. • Initial Conditions The initial conditions for such a recurrence relation specify the values of a0, a1, a2, …, ai-1, if i is a fixed integer, or a0, a1, a2, …, am where m is an integer with m 0, if i depends on k. 5.6 Defining Sequences Recursively

  3. Example – pg. 302 #2 • Find the first four terms of the recursively defined sequence. 5.6 Defining Sequences Recursively

  4. Example – pg. 302 #10 5.6 Defining Sequences Recursively

  5. Fibonacci Numbers • Fibonacci proposed the following problem: • A single pair of rabbits (male and female) is born at the beginning of a year. Assume the following conditions: • Rabbit pairs are not fertile during their first month of life but thereafter give birth to one new male/female pair at the end of every month. • No rabbits die. How many rabbits will there be at the end of the year? 5.6 Defining Sequences Recursively

  6. Fibonacci Numbers • The solution is a recurrence relation 5.6 Defining Sequences Recursively

  7. Tower of Hanoi • Please read this section in your textbook. 5.6 Defining Sequences Recursively

  8. Example – pg. 303 #28 • F0, F1, F2, … is the Fibonacci sequence. 5.6 Defining Sequences Recursively

  9. Definition Given numbers a1, a2, …, an, where n is a positive integer, • the summation from i = 1 to n of the aiis defined as follows: if n > 1. • the product from i = 1 to n of the aiis defined by: if n > 1. 5.6 Defining Sequences Recursively

  10. Example – pg. 304 #42 5.6 Defining Sequences Recursively

More Related