Presentation is loading. Please wait.

Presentation is loading. Please wait.

Fall 2015 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1.

Similar presentations


Presentation on theme: "Fall 2015 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1."— Presentation transcript:

1 Fall 2015 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1 Chapter 5.7 Solving Recurrence Relations by Iteration

2 Fall 2015 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University Sequences Informally, A set of elements written in a row and demonstrate some pattern (i.e. 1, 3, 5, 7, 9) In the sequence denoted, each individual elements is called a term. in is called a subscript or index, is the subscript of the initial term, is the subscript of the final term. 2

3 Fall 2015 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University How to Express a Sequence? Write the first few terms with the expectation that the general pattern will be obvious i.e. “consider the sequence 3, 5, 7, 9 …” Misunderstandings can occur Give an explicit formula for it th term, i.e. By recursion which requires a recurrence relation. 3 for all integers (Initial term) (recursive relation)

4 Fall 2015 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University How to Get an Explicit Formula? It is often helpful to know an explicit formula for the sequence Faster computation Proof of a theory Such explicit formula is called a solution to the recurrence relation The method of iteration The most basic method for finding an explicit formula Given a sequence defined by a recurrence relation and initial conditions, start from the initial conditions and calculate successive terms until you see a pattern 4

5 Fall 2015 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University Example Tips Leave most of the arithmetic undone Eliminate parentheses as you go from one step to the next 5 Q: What is the explicit formula?

6 Fall 2015 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University Example – cont’ 6

7 Fall 2015 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University Explicit Formula for a Geometric Sequence Let be a fixed nonzero constant Suppose a sequence is defined recursively as follows: The sequence above is called a “Geometric Sequence”. What is the explicit formula for this sequence? 7

8 Fall 2015 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University Explicit Formula for a Geometric Sequence Let be a fixed nonzero constant Suppose a sequence is defined recursively as follows: 8

9 Fall 2015 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University Two Famous Solutions for all integers 9

10 Fall 2015 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University Two Famous Solutions If is even If is odd 10

11 Fall 2015 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University Explicit Formula for Tower of Hannoi Sequence 11

12 Fall 2015 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University Checking the Correctness of a Formula by Mathematical Induction We have My solution: Mathematical Induction 12

13 Fall 2015 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University Discovering That at Explicit Formula Is Incorrect We have My solution: Mathematical Induction 13

14 Fall 2015 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University Some Examples Ex 11. Ex 12. 14

15 Fall 2015 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University Some Examples A bank pays interest at a rate of 6% per year compounded annually. An denotes the amount in the account at the end of year, then for. Assume no deposit or withdrawals during the year. Initial amount deposited is $150,000 Q1) How much will the account be worth at the end of 31 years? Q2) In how many years will the account be worth $2,000,000? 15


Download ppt "Fall 2015 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1."

Similar presentations


Ads by Google