This preview shows pages 1–5. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Section 7.1 Recurrence realtion models Def: A Recurrence relation is a formula that counts the number of ways to do a procedure with n objects based on the number of ways to do this procedure with fewer objects. Examples: a n = 5 a n 1 + 6 a n 2 a n = 3 a n 1 + 2 n 2 a n = a a n 1 + a 1 a n 2 + + a n 1 a Initial conditions are values for enough a i s so that all values can be computed. Examples: a n = 5 a n 1 + 3 , a = 1 a n = a n 1 + a n 2 a = 1 , a 1 = 2 Example 1: Find the number of ways to arrange n distinct objects in a row. Example 2: An elf has n stairs to climb. Each step he takes goes up either 1 or 2 steps. Example 3 Arrangements: Given n lines no 2 of which are parallel, and no three of which go through a single point. (a). a n = number of regions the plane is divided into. (b). b n = number of edges. (c). c n = number of intersections (vertices). Example 4 Tower of Hanoi: Given n rings on peg A, we want t transfer them to peg C. Only one ring can be moved at a time. A ring can be placed on top of a larger ring on at an empty peg. How manycan be moved at a time....
View Full
Document
 Spring '11
 Estie

Click to edit the document details