Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSE 2813 Discrete Structures Recurrence Relations Section 6.1.

Similar presentations


Presentation on theme: "CSE 2813 Discrete Structures Recurrence Relations Section 6.1."— Presentation transcript:

1 CSE 2813 Discrete Structures Recurrence Relations Section 6.1

2 CSE 2813 Discrete Structures Definition A recurrence relation for the sequence { a n } is an equation that expresses a n in terms of one or more of the previous terms of the sequence, namely, a 0, a 1,…, a n -1, for all integers n with n  n 0, where n 0 is a nonnegative integer. A sequence is called a solution of a recurrence relation if its terms satisfy the recurrence relation.

3 CSE 2813 Discrete Structures Recurrence Relations vs. Recursive Definitions So what is the difference? Recursive definitions can be used to solve counting problems. When they are used in this way, the rule for finding terms from those that precede them is called a recurrence relation.

4 CSE 2813 Discrete Structures Example Let { a n } be a sequence that satisfies the recurrence relation a n = a n -1  a n -2 for n = 2, 3, 4,… Suppose that a 0 = 3 and a 1 = 5. What are a 2 and a 3 ?

5 CSE 2813 Discrete Structures Example Consider the recurrence relation: a n = 2 a n -1  a n -2 for n = 2, 3, 4, … Show whether each of the following is a solution of this recurrence relation? a n = 3 n a n = 2 n a n = 5

6 CSE 2813 Discrete Structures Modeling with Recurrence Relations A person deposits $10,000 in a savings account at a bank yielding 11% per year with interest compounded annually. How much will be in the account after 30 years?

7 CSE 2813 Discrete Structures Rabbits and the Fibonacci Sequence A young pair of rabbits (one of each sex) is placed on an island. –A pair does not breed until they are 2 months old. –After they are 2 months old, each pair produces another pair each month. Find the number of pairs of rabbits on the island after n months, assuming that no rabbits ever die.

8 CSE 2813 Discrete Structures The Tower of Hanoi Find a recurrence relation to find the number of moves needed to solve the Tower of Hanoi problem with n disks. Tower of Hanoi

9 CSE 2813 Discrete Structures More Example Find a recurrence relation for the number of bit strings of length n that do not contain two consecutive 0s. Find a recurrence relation for the number of bit strings of length n that contain two consecutive 0s.

10 CSE 2813 Discrete Structures Exercises 1, 5, 9, 10, 11, 13, 24, 25, 27


Download ppt "CSE 2813 Discrete Structures Recurrence Relations Section 6.1."

Similar presentations


Ads by Google