




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
This document from cs 2610 course at docsity.com introduces recurrence relations in discrete mathematics. It explains how to define sequences recursively and functionally, the difference between recursive and functional definitions, and how to solve recurrence relations with and without initial conditions. Examples and applications of recurrence relations in interest problems and the towers of hanoi problem are also provided.
Typology: Slides
1 / 8
This page cannot be seen from the preview
Don't miss anything!





2
Earlier in the semester, we saw how we could define sequences recursively or functionally.
Specifically, we learned how to take functionally- defined sequences and transform them to recursively-defined sequences.
Example: an = 2 n^ becomes
a 0 = 1 an+1 = 2 n+1^ = 2⋅ 2 n = 2an, for n ≥ 1.
4
Without initial conditions, a recurrence relation defines a set, or family, of sequences.
Consider an+1 = 2an.
If a 0 = 1, an = 2n^. But if a 0 = 3, an = 3⋅ 2 n^.
These two sequences are clearly similar. This is because an+1 = 2an defines a family of sequences, an = a 0 ⋅ 2 n, for n ≥ 1.
5
A recurrence relation along with initial conditions specify a single sequence. Any such sequence is a
We can check solutions using substitution.
Consider the recurrence relation an = 2an-1 - an-2.
Is an = 3n a solution for n ≥ 1? Try it out!
an = 2an-1 - an-2 = 2⋅3(n-1) – 3(n-2) = 6n – 6 -3n + 6 = 3n = an
7
We can also use this method to describe the famous “Towers of Hanoi” problem…
The recurrence is an = 2an-1 + 1. Can you see why?
Let’s solve the relation for a 0 = 1…
8
Finally, let’s see how we can apply recurrence relations and their solutions to a tough counting problem.
How many bitstrings of length n do not contain consecutive 0’s?
The techniques we’ve studied so far can’t solve this without ridiculous amounts of effort!
One solution is 5 -½( (1+5½)/2 )n+2^ - 5 -½( (1-5½)/2 )n+^.
We can find a more elegant and easier solution!!!