Presentation is loading. Please wait.

Presentation is loading. Please wait.

Michael Duquette & Whitney Sherman

Similar presentations


Presentation on theme: "Michael Duquette & Whitney Sherman"— Presentation transcript:

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

2 Tucker, Applied Combinatorics, Section 7.1
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. 4/9/2003 Tucker, Applied Combinatorics, Section 7.1

3 Tucker, Applied Combinatorics, Section 7.1
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. 4/9/2003 Tucker, Applied Combinatorics, Section 7.1

4 Tucker, Applied Combinatorics, Section 7.1
Example 1: Page 280 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. Solution: Let an 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: 4/9/2003 Tucker, Applied Combinatorics, Section 7.1

5 Tucker, Applied Combinatorics, Section 7.1
Example 2: Page 283 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. 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). 4/9/2003 Tucker, 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 relation’s 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. 4/9/2003 Tucker, Applied Combinatorics, Section 7.1

7 Tucker, Applied Combinatorics, Section 7.1
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. There are k-subsets not using the first object. 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 ) 4/9/2003 Tucker, Applied Combinatorics, Section 7.1

8 Tucker, Applied Combinatorics, Section 7.1
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. 4/9/2003 Tucker, Applied Combinatorics, Section 7.1

9 Tucker, Applied Combinatorics, Section 7.1
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 it’s 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: 4/9/2003 Tucker, Applied Combinatorics, Section 7.1

10 Tucker, Applied Combinatorics, Section 7.1
Example 5: Page 287 Question: The 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: 4/9/2003 Tucker, Applied Combinatorics, Section 7.1

11 Tucker, Applied Combinatorics, Section 7.1
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 4/9/2003 Tucker, Applied Combinatorics, Section 7.1


Download ppt "Michael Duquette & Whitney Sherman"

Similar presentations


Ads by Google