06.09.2021 Views

Discrete Mathematics- An Open Introduction - 3rd Edition, 2016a

Discrete Mathematics- An Open Introduction - 3rd Edition, 2016a

Discrete Mathematics- An Open Introduction - 3rd Edition, 2016a

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

2.4. Solving Recurrence Relations 169<br />

can write this explicitly: a n − a n−1 n. Of course, we could have<br />

arrived at this conclusion directly from the recurrence relation by<br />

subtracting a n−1 from both sides.<br />

Now use this equation over and over again, changing n each<br />

time:<br />

a 1 − a 0 1<br />

a 2 − a 1 2<br />

a 3 − a 2 3<br />

.<br />

a n − a n−1 n.<br />

Add all these equations together. On the right-hand side, we get<br />

the sum 1 + 2 + 3 + · · · + n. We already know this can be simplified<br />

to n(n+1)<br />

2<br />

. What happens on the left-hand side? We get<br />

(a 1 − a 0 ) + (a 2 − a 1 ) + (a 3 − a 2 ) + · · · (a n−1 − a n−2 ) + (a n − a n−1 ).<br />

This sum telescopes. We are left with only the −a 0 from the<br />

first equation and the a n from the last equation. Putting this all<br />

together we have −a 0 + a n n(n+1)<br />

2<br />

or a n n(n+1)<br />

2<br />

+ a 0 . But we know<br />

that a 0 4. So the solution to the recurrence relation, subject to the<br />

initial condition is<br />

n(n + 1)<br />

a n + 4.<br />

2<br />

(Now that we know that, we should notice that the sequence is<br />

the result of adding 4 to each of the triangular numbers.)<br />

.<br />

The above example shows a way to solve recurrence relations of the<br />

form a n a n−1 + f (n) where ∑ n<br />

k1<br />

f (k) has a known closed formula. If<br />

you rewrite the recurrence relation as a n − a n−1 f (n), and then add up<br />

all the different equations with n ranging between 1 and n, the left-hand<br />

side will always give you a n − a 0 . The right-hand side will be ∑ n<br />

k1 f (k),<br />

which is why we need to know the closed formula for that sum.<br />

However, telescoping will not help us with a recursion such as a n <br />

3a n−1 + 2 since the left-hand side will not telescope. You will have −3a n−1 ’s<br />

but only one a n−1 . However, we can still be clever if we use iteration.<br />

We have already seen an example of iteration when we found the closed<br />

formula for arithmetic and geometric sequences. The idea is, we iterate the<br />

process of finding the next term, starting with the known initial condition,<br />

up until we have a n . Then we simplify. In the arithmetic sequence example,

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!