4/9/2003Tucker, Applied Combinatorics, Section 7.1 1 Recurrence Relations Michael Duquette & Whitney Sherman Tucker, Applied Combinatorics, Section 7.1,

  • Published on
    22-Dec-2015

  • View
    212

  • Download
    0

Transcript

<ul><li> Slide 1 </li> <li> 4/9/2003Tucker, Applied Combinatorics, Section 7.1 1 Recurrence Relations Michael Duquette &amp; Whitney Sherman Tucker, Applied Combinatorics, Section 7.1, Group G </li> <li> Slide 2 </li> <li> 4/9/2003Tucker, Applied Combinatorics, Section 7.1 2 A variety of counting problems can be modeled with recurrence relations Definition: A recurrence relation is a recursive formula that counts the number of ways to do a procedure involving n objects in terms of the number of ways to do it with fewer objects. Definition: Initial Conditions are the initial values for your relation so that the other terms can be computed. </li> <li> Slide 3 </li> <li> 4/9/2003Tucker, Applied Combinatorics, Section 7.1 3 The following are examples of recurrence relations: 1. 2. 3. Note: For many common types of recurrence relations, there are explicit solutions for, but frequently it is easier to determine recursively the value of up to the desired value then using the formula. </li> <li> Slide 4 </li> <li> 4/9/2003Tucker, Applied Combinatorics, Section 7.1 4 Example 1: Page 280 Solution: Let a n denote the number of arrangements of n objects. There are n choices for the first object in the row. This choice can be followed by any arrangement of the remaining n-1 objects. Thus Substituting recursively in this relation we see that: Question: Find a recurrence relation for the number of ways to arrange n distinct objects in a row. Find the number of arrangements of eight objects. </li> <li> Slide 5 </li> <li> 4/9/2003Tucker, Applied Combinatorics, Section 7.1 5 Question: A bank pays 8 percent interest each year on money in savings accounts. Find recurrence relations for the amounts of money a gnome would have after n years if it follows the investment strategy of: (a) Investing $1,000 and leaving it in the bank for n years. (b) Investing $100 at the end of each year. Example 2: Page 283 Solution: If an account has x dollars at the start of a year, then at the end of the year it will have x dollars plus the interest on the x dollar, provided no money was added during the year. (a) The recurrence relation is and the initial condition is (b) The relation must reflect the $100 added (which collects no interest since it comes at the end of the year). </li> <li> Slide 6 </li> <li> 4/9/2003Tucker, Applied Combinatorics, Section 7.1 6 So far there have been two simple methods for solving the relations. 1) Recursive backward substitution: Whenever occurs in the relation for, we replace by the relations formula for (involving ) and then replace, and so on. i.e. 2) Guess the solution to the relation and then to verify it by mathematical induction. See example #4, Tower of Hanoi problem. </li> <li> Slide 7 </li> <li> 4/9/2003Tucker, Applied Combinatorics, Section 7.1 7 Example 3: Page 285 Question: Find a recurrence relation for Where is the number of ways to select a subset of k objects from a set of n distinct objects. Solution: Notice that is the same as so break it up into two cases depending on whether or not the first object is used. a.There are k-subsets not using the first object. b.There are k-subsets that do use the first object. So we have (Note: this is just identity ) Recall that this is Pascal's Triangle Identity from section 5.5 and the initial conditions are for all (and ) </li> <li> Slide 8 </li> <li> 4/9/2003Tucker, Applied Combinatorics, Section 7.1 8 Example 4: Page 285 Question: Find a recurrence relation for the ways to distribute n identical balls into k distinct boxes with between two and four balls in each box. Repeat the problem with balls of three colors. Solution: If there are 2 balls in the first box then there are ways to put the remaining identical balls in the remaining boxes. If we kept going with this idea we would get that The initial conditions are and otherwise. Now if three colors are allowed: there are ways to pick a subset of two balls for the first box. There are ways to pick three balls from three types and ways to pick four balls from 3 types. So with initial conditions and otherwise. </li> <li> Slide 9 </li> <li> 4/9/2003Tucker, Applied Combinatorics, Section 7.1 9 The First (Backward) Difference of the sequence is defined to be The Second Difference is and so on. Definition: A Difference Equation is an equation involving and its differences, such as Equations can express in terms of Therefore any recurrence relation can be written as a difference equation or visa versa. For example: </li> <li> Slide 10 </li> <li> 4/9/2003Tucker, Applied Combinatorics, Section 7.1 10 Example 5: Page 287 Question: T he number of rabbits increases by ( is the number of rabbits). When foxes are present each rabbit has a probability of of being eaten by a fox ( is the number of foxes). Foxes decrease by each year. When rabbits are present, each fox has a probability of of feeding and reproducing. Give a pair of simultaneous difference equations describing the number of rabbits and foxes in successive years. Solution: </li> <li> Slide 11 </li> <li> 4/9/2003Tucker, Applied Combinatorics, Section 7.1 11 Class Example Question: Find a recurrence relation for the number of ways to hand out a piece of chewing gum worth 1 cent, a candy bar worth 10 cents, or a donut worth 20 cents on successive days until n cents worth of food has been given away. Solution: If on the first day we hand out 1 cent worth of chewing gum we are left with cents worth of food to give away on the following days. Likewise if on the first day we hand out 10 cents worth of candy bar we are left with cents worth of food to give away on the following days. And if on the first day we hand out 20 cents worth of donut we are left with cents worth of food to give away on the following days. So with because there is only 1 way to give nothing (0 pieces of each item) and implicitly, for </li> </ul>

Recommended

View more >