recurrences-notes_2

# recurrences-notes_2 - Recurrence Relations September 15,...

This preview shows pages 1–3. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Recurrence Relations September 15, 2010 Adapted from appendix B of Foundations of Algorithms by Neapolitan and Naimipour. 1 Part I 1.1 Definitions and the Characteristic Function A recurrence relation is a relation in which t n is defined in terms of a smaller def. value of n . A recurrence does not define a unique function, but a recurrence together with some initial conditions does define a unique function. The initial conditions gives the values of t i for some set of i ’s starting with i = 0. def. A solution to a recurrence relation for a given set of initial conditions is an def. explicit function that defines t n without using any t i in the definition of t n . For example , the relation ex. t n = t n- 1 + 1 is a recurrence relation and if the initial condition is t = j for any value j , then the solution to t n = t n- 1 + 1 is t n = j + n A homogeneous linear recurrence equation with constant coeffi- cients is an equation of the form def. a t n + a 1 t n- 1 + ... + a k t n- k = 0 Let’s go through that step by step. • It’s linear because every term t k appears in the first power and term n def. depends on a sequence of n- k terms for an integer k . • Its homogeneous because it equals 0. def. • and it has constant coefficients. 1 For example , let’s solve the recurrence relation ex. t n- 5 t n- 1 + 6 t n- 2 = 0 (1) First off, note that its a homogeneous linear recurrence relation with constant coefficients. Linear systems theory leads us to set t n = r n For some non-zero value of r . We don’t know what r is, but we are going to require that the above equality holds. It remains to be proven that such an r exists. It also remains to be proven that replacing the nth term of t with the nth power of r results in the same solution to the recurrence relation. There are two ways to argue that replacing t n with r n gives a correct solution to the recurrence relation. First, we don’t have to know beforehand that t n = r n is going to work. After we find the roots of the characteristic function, we can verify that the substitution worked by testing the solution on some values. Second, we can prove that this substitution will work in general for any linear constant-coefficient homogeneous recurrence relation. That deeper answer is beyond the scope of the class but if you are interested, we recommend the text by Luenberger. 1 Moving on, if we replace t n with r n in Equation 1 then we get the charac- teristic function for the recurrence relation def. r n- 5 r n- 1 + 6 r n- 2 = 0 (2) We can now see that setting t n = r n is a solution to Equation 1 if r is a root of Equation 2. Why is that? Since we have t n- 5 t n- 1 + 6 t n- 2 = r n- 5 r n- 1 + 6 r n- 2 = 0 the roots of the polynomial in r are the values of r in which the polynomial equals zero. At those values of r , the values of the functions of both r and t n work out to be zero–as required by the recurrence relation....
View Full Document

## This note was uploaded on 01/12/2011 for the course CS 40443 taught by Professor Safari during the Spring '10 term at Sharif University of Technology.

### Page1 / 11

recurrences-notes_2 - Recurrence Relations September 15,...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online