18.04.2013 Views

The.Algorithm.Design.Manual.Springer-Verlag.1998

The.Algorithm.Design.Manual.Springer-Verlag.1998

The.Algorithm.Design.Manual.Springer-Verlag.1998

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Lecture 3 - recurrence relations<br />

<strong>The</strong> initial or boundary condition terminate the recursion.<br />

As we will see, induction provides a useful tool to solve recurrences - guess a solution and prove it by<br />

induction.<br />

Guess what the solution is?<br />

Prove by induction:<br />

1. Show that the basis is true: .<br />

2. Now assume true for .<br />

3. Using this assumption show:<br />

Listen To Part 3-5<br />

n 0 1 2 3 4 5 6 7<br />

0 1 3 7 15 31 63 127<br />

Solving Recurrences<br />

No general procedure for solving recurrence relations is known, which is why it is an art. My approach<br />

is:<br />

Realize that linear, finite history, constant coefficient recurrences always can be<br />

solved<br />

Check out any combinatorics or differential equations book for a procedure.<br />

Consider , ,<br />

It has history = 2, degree = 1, and coefficients of 2 and 1. Thus it can be solved mechanically! Proceed:<br />

● Find the characteristic equation, eg.<br />

file:///E|/LEC/LECTUR17/NODE3.HTM (3 of 10) [19/1/2003 1:34:27]

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

Saved successfully!

Ooh no, something went wrong!