Michael Duquette & Whitney Sherman

Slides:



Advertisements
Similar presentations
AE1APS Algorithmic Problem Solving John Drake
Advertisements

Chapter 6 Advanced Counting 6.1 Recurrence Relations.
Sequences and Mathematical Induction
4/16/2015 MATH 224 – Discrete Mathematics Counting Basic counting techniques are important in many aspects of computer science. For example, consider the.
Counting Chapter 6 With Question/Answer Animations.
State University of New York WARNING All rights reserved. No part of the course materials used in the instruction of this course may be reproduced in any.
Factoring Polynomials
Kavita Math231 Recursion and Iteration. Kavita Math231 We use Recursion when we have to perform a complex task that can be broken into the several subtasks.
CSE115/ENGR160 Discrete Mathematics 04/19/12 Ming-Hsuan Yang UC Merced 1.
CSE115/ENGR160 Discrete Mathematics 04/21/11 Ming-Hsuan Yang UC Merced 1.
Chapter 6.1 Generating Functions
4/5/05Tucker, Sec Applied Combinatorics, 4rth Ed. Alan Tucker Section 5.4 Distributions Prepared by Jo Ellis-Monaghan.
Recursion.
1 Section 6.1 Recurrence Relations. 2 Recursive definition of a sequence Specify one or more initial terms Specify rule for obtaining subsequent terms.
3/26/03 Tucker, Applied Combinatorics Section General Counting Methods for Arrangements and Selections Tucker, Applied Combinatorics, Sec. 5.1,
Recursion Lecture 17: Nov 11. Quiz int hello(int n) { if (n==0) return 0; else printf(“Hello World %d\n”,n); hello(n-1); } 1.What would the program do.
Tucker, Section 5.41 Section 5.4 Distributions By Colleen Raimondi.
Applied Combinatorics, 4th Ed. Alan Tucker
Applied Combinatorics, 4th Ed. Alan Tucker
Exponents and Properties Recall the definition of a r where r is a rational number: if then for appropriate values of m and n, For example,
Copyright © Cengage Learning. All rights reserved.
Recursively Defined Sequences Lecture 35 Section 8.1 Wed, Mar 23, 2005.
Applied Discrete Mathematics Week 9: Relations
Advanced Counting Techniques
Induction and recursion
Towers of Hanoi. Introduction This problem is discussed in many maths texts, And in computer science an AI as an illustration of recursion and problem.
Final Exam Review Advanced Algebra 1.
Jessie Zhao Course page: 1.
Chapter 8. Section 8. 1 Section Summary Introduction Modeling with Recurrence Relations Fibonacci Numbers The Tower of Hanoi Counting Problems Algorithms.
13.2 Recursive Definitions Objective 1) Provide the recursive definition for sequences; 2) Identify the type of a sequence from a recursive definition.
Fall 2015 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1.
Chapter 6 With Question/Answer Animations 1. Chapter Summary The Basics of Counting The Pigeonhole Principle Permutations and Combinations Binomial Coefficients.
1 Section 5.5 Solving Recurrences Any recursively defined function ƒ with domain N that computes numbers is called a recurrence or recurrence relation.
CSE 2813 Discrete Structures Recurrence Relations Section 6.1.
Module #20 - Recurrences 1 Ch. 7 Recurrence Relations Rosen 6 th ed., §§7.1.
15.1 CompSci 102© Michael Frank Today’s topics Recurrence relationsRecurrence relations –Stating recurrences –LiHoReCoCo Reading: Sections Reading:
Module #17: Recurrence Relations Rosen 5 th ed., §
March 10, 2015Applied Discrete Mathematics Week 6: Counting 1 Permutations and Combinations How many different sets of 3 people can we pick from a group.
Chapter 7 Advance Counting Techniques. Content Recurrence relations Generating function The principle of inclusion-exclusion.
Section 2.4. Section Summary Sequences. Examples: Geometric Progression, Arithmetic Progression Recurrence Relations Example: Fibonacci Sequence Summations.
Module #1 - Logic 1 Based on Rosen, Discrete Mathematics & Its Applications. Prepared by (c) , Michael P. Frank and Modified By Mingwu Chen Recurrence.
Fall 2015 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1.
3.6 Derivatives of Logarithmic Functions In this section, we: use implicit differentiation to find the derivatives of the logarithmic functions and, in.
Recurrence Relation Models
Sequences and Summations Section 2.4. Section Summary Sequences. – Examples: Geometric Progression, Arithmetic Progression Recurrence Relations – Example:
Generating Functions and Counting Trees. Today’s Plan 1.Generating functions for basic sequences 2.Operations on generating functions 3.Counting 4.Solve.
Section 1.3 Models and Applications. Problem Solving with Linear Equations.
Exponential Function If a > 0 and a ≠ 1, then defines the exponential function with base a. 4.2.
CHAPTER TWO RECURRENCE RELATION
College Algebra & Trigonometry
Basic Subtraction An Overview. Definition Subtraction’s literal meaning is removing some objects from a group The meaning of 6-3=3 is – "Three objects.
Agenda Lecture Content:  Recurrence Relations  Solving Recurrence Relations  Iteration  Linear homogenous recurrence relation of order k with constant.
Differential equations and Slope Fields Greg Kelly, Hanford High School, Richland, Washington.
Modelling Equations with Algebra Tiles Jostie & The Dangers of Algebra.
Bellringer 1. Solve by Elimination 2. Solve by Substitution.
Recursively Defined Sequences Lecture 40 Section 8.1 Wed, Apr 11, 2007.
Discrete Math For Computing II. Contact Information B. Prabhakaran Department of Computer Science University of Texas at Dallas Mail Station EC 31, PO.
CMSC Discrete Structures
Chapter 10 Counting Methods.
The Pigeonhole Principle
Welcome to Interactive Chalkboard
Copyright © Cengage Learning. All rights reserved.
CMSC Discrete Structures
Michael Duquette & Whitney Sherman
Applied Discrete Mathematics Week 7: Computation
1A Recursively Defined Functions
CMSC Discrete Structures
Recurrence Relations Discrete Structures.
Applied Combinatorics, 4th Ed. Alan Tucker
Recurrence Relations Rosen 5th ed., §6.2 5/22/2019
Presentation transcript:

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

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

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

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

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

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

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

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

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

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

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