Solving recurrences (CSCI 2824, Spring 2015)Topic covered:
We looked at deriving recurrences for counting last lecture. We also started looking into solving the very simplest of recurrences. This lecture, we will look at some more interesting ways to tackle recurrences. Especially, we will introduce generating functions as an interesting way of solving recurrences. Some Basic Summation FactsWe recall the following basic summation facts: Given a knowledge of the closed forms of the summations above, we can calculate other kinds of summations. Let us take an example. Example 1Find the value of Answer
Let From the reasoning above, we get Since Solving Linear Recurrences: BasicsWe consider recurrences of the form: Example 2Take the recurrence: Answer
ObservationFrom the example above, we can proceed to solve recurrences of the form
Answer
Suppose that If
Linear Recurrences with Two Initial TermsWe will now consider recurrences that are second-order of the form: with base cases Well-Known examples of such recurrences include:
Solving the likes of Fibonacci sequence by setting up a quadratic equationFor the recurrence We setup a quadratic equation
or equivalently,
whose real roots are given by ![]() If for some coefficients If the equation has a single repeated root, i.e., if for some coefficients Example 3Consider the recurrence: Answer
We write out some terms of this recurrence
Here we have Its roots are: Therefore, the solution is of the form Given Therefore,
Example 4Consider the Fibonacci recurrence
Answer
Here
Solving this equation, we obtain the roots
Therefore, the closed form is
Plugging, in
For
Writing Solving them we obtain,
A special note: usually, we have Fibonacci numbers starting as
|