Sequences, Mathematical Induction, and Recursion. CSE 2353 Discrete Computational Structures Spring 2018

Similar documents
Unit 6: Sequences and Series

2.4 - Sequences and Series

is also known as the general term of the sequence

SEQUENCES AND SERIES

Infinite Sequences and Series

Recurrence Relations

Sequences, Sums, and Products

Sequences A sequence of numbers is a function whose domain is the positive integers. We can see that the sequence

CSE 1400 Applied Discrete Mathematics Number Theory and Proofs

A sequence of numbers is a function whose domain is the positive integers. We can see that the sequence

Section 6.4: Series. Section 6.4 Series 413

SEQUENCES AND SERIES

CHAPTER 10 INFINITE SEQUENCES AND SERIES

These Two Weeks. Mathematical Induction Chapter 4 Lecture 10 & Lecture 13. CPRE 310 Discrete Mathematics. Mathematical Induction Problems

Math 155 (Lecture 3)

Sums, products and sequences

Topic 1 2: Sequences and Series. A sequence is an ordered list of numbers, e.g. 1, 2, 4, 8, 16, or

SEQUENCES AND SERIES

Recursive Algorithms. Recurrences. Recursive Algorithms Analysis

Ma 530 Infinite Series I

Bertrand s Postulate

CALCULATION OF FIBONACCI VECTORS

Mathematics review for CSCI 303 Spring Department of Computer Science College of William & Mary Robert Michael Lewis

10.1 Sequences. n term. We will deal a. a n or a n n. ( 1) n ( 1) n 1 2 ( 1) a =, 0 0,,,,, ln n. n an 2. n term.

In number theory we will generally be working with integers, though occasionally fractions and irrationals will come into play.

Section 7 Fundamentals of Sequences and Series

SEQUENCE AND SERIES NCERT

62. Power series Definition 16. (Power series) Given a sequence {c n }, the series. c n x n = c 0 + c 1 x + c 2 x 2 + c 3 x 3 +

Infinite Series and Improper Integrals

Chapter 4. Fourier Series

UNIT #5. Lesson #2 Arithmetic and Geometric Sequences. Lesson #3 Summation Notation. Lesson #4 Arithmetic Series. Lesson #5 Geometric Series

Discrete Mathematics for CS Spring 2007 Luca Trevisan Lecture 22

Different kinds of Mathematical Induction

Classification of problem & problem solving strategies. classification of time complexities (linear, logarithmic etc)

Sequence A sequence is a function whose domain of definition is the set of natural numbers.

Once we have a sequence of numbers, the next thing to do is to sum them up. Given a sequence (a n ) n=1

(A sequence also can be thought of as the list of function values attained for a function f :ℵ X, where f (n) = x n for n 1.) x 1 x N +k x N +4 x 3

3. Z Transform. Recall that the Fourier transform (FT) of a DT signal xn [ ] is ( ) [ ] = In order for the FT to exist in the finite magnitude sense,

( ) = p and P( i = b) = q.

If we want to add up the area of four rectangles, we could find the area of each rectangle and then write this sum symbolically as:

It is always the case that unions, intersections, complements, and set differences are preserved by the inverse image of a function.

SOME TRIBONACCI IDENTITIES

The picture in figure 1.1 helps us to see that the area represents the distance traveled. Figure 1: Area represents distance travelled

CS 270 Algorithms. Oliver Kullmann. Growth of Functions. Divide-and- Conquer Min-Max- Problem. Tutorial. Reading from CLRS for week 2

Sequences. Notation. Convergence of a Sequence

subcaptionfont+=small,labelformat=parens,labelsep=space,skip=6pt,list=0,hypcap=0 subcaption ALGEBRAIC COMBINATORICS LECTURE 8 TUESDAY, 2/16/2016

End-of-Year Contest. ERHS Math Club. May 5, 2009

6.3 Testing Series With Positive Terms

Math 475, Problem Set #12: Answers

Chapter 6 Infinite Series

Matsubara-Green s Functions

Assignment 2 Solutions SOLUTION. ϕ 1 Â = 3 ϕ 1 4i ϕ 2. The other case can be dealt with in a similar way. { ϕ 2 Â} χ = { 4i ϕ 1 3 ϕ 2 } χ.

1. By using truth tables prove that, for all statements P and Q, the statement

Induction proofs - practice! SOLUTIONS

Chapter 6 Overview: Sequences and Numerical Series. For the purposes of AP, this topic is broken into four basic subtopics:

NICK DUFRESNE. 1 1 p(x). To determine some formulas for the generating function of the Schröder numbers, r(x) = a(x) =

Mathematical Induction

MAT1026 Calculus II Basic Convergence Tests for Series

SECTION 1.5 : SUMMATION NOTATION + WORK WITH SEQUENCES

Set Notation Review. N the set of positive integers (aka set of natural numbers) {1, 2, 3, }

Chapter 7: Numerical Series

Seunghee Ye Ma 8: Week 5 Oct 28

a 3, a 4, ... are the terms of the sequence. The number a n is the nth term of the sequence, and the entire sequence is denoted by a n

4.1 SIGMA NOTATION AND RIEMANN SUMS

4.1 Sigma Notation and Riemann Sums

Essential Question How can you recognize an arithmetic sequence from its graph?

September 2012 C1 Note. C1 Notes (Edexcel) Copyright - For AS, A2 notes and IGCSE / GCSE worksheets 1

Intro to Learning Theory

CSI 2101 Discrete Structures Winter Homework Assignment #4 (100 points, weight 5%) Due: Thursday, April 5, at 1:00pm (in lecture)

Math 2112 Solutions Assignment 5

10.2 Infinite Series Contemporary Calculus 1

Sequences I. Chapter Introduction

NUMERICAL METHODS FOR SOLVING EQUATIONS

Zeros of Polynomials

Random Models. Tusheng Zhang. February 14, 2013

Find a formula for the exponential function whose graph is given , 1 2,16 1, 6

Discrete Math Class 5 ( )

CS / MCS 401 Homework 3 grader solutions

= n which will be written with general term a n Represent this sequence by listing its function values in order:

Math 113 Exam 3 Practice

4.3 Growth Rates of Solutions to Recurrences

Optimally Sparse SVMs

1 Generating functions for balls in boxes

The Riemann Zeta Function

Test One (Answer Key)

CS583 Lecture 02. Jana Kosecka. some materials here are based on E. Demaine, D. Luebke slides

P1 Chapter 8 :: Binomial Expansion

COMP26120: More on the Complexity of Recursive Programs (2018/19) Lucas Cordeiro

Math 25 Solutions to practice problems

A Study on Some Integer Sequences

10.6 ALTERNATING SERIES

Physics 324, Fall Dirac Notation. These notes were produced by David Kaplan for Phys. 324 in Autumn 2001.

Lecture Overview. 2 Permutations and Combinations. n(n 1) (n (k 1)) = n(n 1) (n k + 1) =

3 Gauss map and continued fractions

Alternating Series. 1 n 0 2 n n THEOREM 9.14 Alternating Series Test Let a n > 0. The alternating series. 1 n a n.

MA131 - Analysis 1. Workbook 2 Sequences I

Lecture 2.5: Sequences

Chimica Inorganica 3

ECE-S352 Introduction to Digital Signal Processing Lecture 3A Direct Solution of Difference Equations

Appendix: The Laplace Transform

Transcription:

CSE 353 Discrete Computatioal Structures Sprig 08 Sequeces, Mathematical Iductio, ad Recursio (Chapter 5, Epp) Note: some course slides adopted from publisher-provided material

Overview May mathematical processes have repeated patters. These processes ca be characterized by sequeces, ad verified usig mathematical iductio. Sprig 08 CSE 353 Discrete Computatioal Structures 3 Outlie 5. Sequeces 5. Mathematical Iductio I 5.6 Defiig Sequeces Recursively 5.7 Solvig Recurrece Relatios by Iteratio Sprig 08 CSE 353 Discrete Computatioal Structures 4

Sequeces Imagie that a perso decides to cout his acestors. He has two parets, four gradparets, eight great- gradparets, ad so forth, These umbers ca be writte i a row as, 4, 8, 6, 3, 64, 8, The symbol is called a ellipsis. It is shorthad for ad so forth. To express the patter of the umbers, suppose that each is labeled by a iteger givig its positio i the row. (idex) Sprig 08 CSE 353 Discrete Computatioal Structures 5 Sequeces We ote that each successive umber doubles i size, or is a power of For a geeral value of, let A be the umber of acestors i the th geeratio bac. We ote that A, A 4, A 3 8 3, A 4 6 4. I geeral, we ote that the patter suggests that A This patter is called a sequece Sprig 08 CSE 353 Discrete Computatioal Structures 6

Sequece Formal Defiitio A sequece is a fuctio whose domai is either: All the itegers betwee two give itegers, or All the itegers greater tha or equal to a give iteger Sprig 08 CSE 353 Discrete Computatioal Structures 7 Sequece Notatio We typically represet a sequece as a set of elemets writte i a row. I the sequece deoted where each idividual elemet a (read a sub ) is called a term.. The i a is called a subscript or idex,. m (which may be ay iteger) is the subscript of the iitial term, 3. (which must be greater tha or equal to m) is the subscript of the fial term. Sprig 08 CSE 353 Discrete Computatioal Structures 8

Sequece Notatio deotes a ifiite sequece. A explicit formula or geeral formula for a sequece is a rule that shows how the values of a deped o. Sprig 08 CSE 353 Discrete Computatioal Structures 9 Example Assume we have the followig sequece of umbers: 3, 5, 7, 9,, 3, 5,.. Ca we determie a geeral term of the sequece a? Note: a 3, a 5,.. These are odd itegers: recall the defiitio of odd itegers: "a iteger m is odd if m + for ay iteger " Sprig 08 CSE 353 Discrete Computatioal Structures 0

Example If, a 3 + * + 3 a 5; *+ 5 a 3 7; *3+ 7 So it appears that a + for all itegers Sprig 08 CSE 353 Discrete Computatioal Structures Example 5.- Write the first four terms of the followig sequece: a," itegers 0 + ³ Sprig 08 CSE 353 Discrete Computatioal Structures

Summatio Notatio For our previous example, a +, what is the sum of all a for to 3? First 3 terms are: 3, 5, 7 Sum of these terms is 3+5+7 5 How about for to Sum 3 + 5 + 7 +. + a A shorthad otatio is to use summatio otatio Sprig 08 CSE 353 Discrete Computatioal Structures 3 Summatio Notatio Give itegers m ad where m, the symbol å m a is the sum of all the terms a m, a m+,., a is the idex of the summatio m is the lower limit of the summatio is the upper limit of the summatio Sprig 08 CSE 353 Discrete Computatioal Structures 4

Summatio Notatio We ca also express the summatio as å am + am + +! m a + a where the right-had side (RHS) of the equatio is called the expaded form of the sum Sprig 08 CSE 353 Discrete Computatioal Structures 5 Summatio Notatio for our Example Revisitig our previous example, a +, what is the sum of all a for to? For our example, the summatio otatio is: å m å( + ) a Sprig 08 CSE 353 Discrete Computatioal Structures 6

Example 5.- Compute the followig summatio: 5 ( ) å + Sprig 08 CSE 353 Discrete Computatioal Structures 7 Applicatio to C/C++/Java Code to compute sum? it sum, ; 5 ( ) å + sum 0; for (; <5; ++) sum sum + ( + ); Sprig 08 CSE 353 Discrete Computatioal Structures 8

å Summatio Notatio for our Example Expaded Form The expaded form of the summatio otatio for our example is the followig: ( + ) (() + ) + (() + ) + ((3) + ) +! + ( + ) 3+ 5 + 7 +! + ( + ) Sprig 08 CSE 353 Discrete Computatioal Structures 9 Separatig Off the Fial Term We ca also write our sum as the followig: å - ( ) ( + ) + ( + ) + å This is ow as separatig off the fial term. HINT: THIS MAY BE USEFUL LATER! Sprig 08 CSE 353 Discrete Computatioal Structures 0

Product Notatio Summatio adds terms of a sequece To multiply terms of a sequece, use product otatio Sprig 08 CSE 353 Discrete Computatioal Structures Product Notatio Give itegers m ad where m, the symbol Õ m a is the product of all the terms a m, a m+,., a is the idex of the product m is the lower limit of the product is the upper limit of the product Sprig 08 CSE 353 Discrete Computatioal Structures

Product Notatio We ca also express the product as Õ am am +! m a a where the right-had side (RHS) of the equatio is called the expaded form of the product Sprig 08 CSE 353 Discrete Computatioal Structures 3 Examples Let m, 3, a +. The we have: 3 å ( + ) 3+ 5 + 7 5 3 Õ( + ) (() + ) + (() + ) + ((3) + ) 3 5 7 05 Sprig 08 CSE 353 Discrete Computatioal Structures 4

Example 5.-3 Compute the followig product: 4 Õ Sprig 08 CSE 353 Discrete Computatioal Structures 5 Applicatio to C/C++/Java Code to compute product? it product, ; 4 Õ product ; for (; <4; ++) product product * ( * ); Sprig 08 CSE 353 Discrete Computatioal Structures 6

Properties of Summatios ad Products Sprig 08 CSE 353 Discrete Computatioal Structures 7 Assume that we have the followig sequeces of real umbers:. a m, a m+,..,a. b m, b m+,..,b Also assume that we have a real umber c The, we have the followig equatios that hold for ay iteger m Properties of Summatios ad Products Sprig 08 CSE 353 Discrete Computatioal Structures 8 ( ) Õ( ) Õ Õ å å å å å ø ö ç è æ ø ö ç è æ + + m m m m m m m m b a b a a c a c b a b a

Chage of Variable Suppose we have the followig two summatios: 3 å 3 åi i + + + 3 + 3 These two summatios are clearly the same, thus 3 å 3 åi i Sprig 08 CSE 353 Discrete Computatioal Structures 9 Chage of Variable If we ow that there are differet ways to express the same summatio, we may be able to simplify a give summatio usig chage of variable. For example, assume that we are give the followig summatio: 3 ( ) å - Sprig 08 CSE 353 Discrete Computatioal Structures 30

Chage of Variable Ca we simplify with chage of variable? What if we let j -? What are ew upper ad lower limits of summatio? For : j - - 0 For 3: j - 3-3 ( ) å - Sprig 08 CSE 353 Discrete Computatioal Structures 3 This becomes: Chage of Variable 3 ( ) å å - j 0 j Sprig 08 CSE 353 Discrete Computatioal Structures 3

Factorials Assume we have the product of cosecutive itegers from to, or Õ j j 3! ( -) This may loo familiar this is also the factorial of Õ j j! Zero factorial (0!) is defied to be : 0! Sprig 08 CSE 353 Discrete Computatioal Structures 33 Factorials Note that this umber ca become very large very quicly: 5! 5x4x3xx 0 6! 6x5x4x3xx 70 Thus, we ca also use a recursive defiitio for factorial (for all 0): ì! í î ( - ) Thus, 6! 6x5! 6 x 0 70! if if 0 ³ Sprig 08 CSE 353 Discrete Computatioal Structures 34

Factorials We ca use the recursive defiitio of factorials to simplify certai factorial expressios: 6! 6 5! 6 5! 5! 6! 6 5 4!!4!!4! 6 5 30 5 Sprig 08 CSE 353 Discrete Computatioal Structures 35 Outlie 5. Sequeces 5. Mathematical Iductio I 5.6 Defiig Sequeces Recursively 5.7 Solvig Recurrece Relatios by Iteratio Sprig 08 CSE 353 Discrete Computatioal Structures 36

Mathematical Iductio Type of direct proof method Used to chec cojectures about the outcomes of processes that occur repeatedly ad accordig to defiite patters (i.e., sequeces) Geeral approach: prove that a property defied for itegers is true for all values of that are greater tha or equal to some iitial iteger Sprig 08 CSE 353 Discrete Computatioal Structures 37 Priciple of Mathematical Iductio Let P() property defied for itegers Also let a fixed iteger Suppose the followig statemets are true. P(a) is true. itegers a, if P() is true the P(+) is true The the followig statemet is also true itegers a, P() Sprig 08 CSE 353 Discrete Computatioal Structures 38

Method of Proof by Mathematical Iductio Cosider a statemet of the form: itegers a, a property P() is true To prove this statemet, perform the followig steps. Basis Step. Iductive Step Sprig 08 CSE 353 Discrete Computatioal Structures 39 Proof by Mathematical Iductio Basis Step Origial statemet form is itegers a, a property P() is true Basis Step: Show that P(a) is true Show that the property holds for the first iteger i the sequece (a) If we ca prove this step, the proceed to the Iductive Step Sprig 08 CSE 353 Discrete Computatioal Structures 40

Proof by Mathematical Iductio Iductive Step Show that itegers a, if P() is true the P(+) is true How? Suppose that P() is true, where is ay particular but arbitrarily chose iteger with a (this suppositio is called the iductive hypothesis) The, show that P(+) is true Sprig 08 CSE 353 Discrete Computatioal Structures 4 Mathematical Iductio Example Show that the followig is true: Proof (by mathematical iductio): Let the property P() be the equatio { Left-had side (LHS) of equatio { Right-had side (RHS) of equatio Sprig 08 CSE 353 Discrete Computatioal Structures 4

Mathematical Iductio Example BASIS STEP: Show that P() is true: To establish P(), we must show that LHS ; RHS is For P(), LHS RHS, so the BASIS STEP has bee proved Sprig 08 CSE 353 Discrete Computatioal Structures 43 Mathematical Iductio Example INDUCTIVE STEP: Show that for all itegers, if P() is true the P( + ) is also true: [Suppose that P() is true for a particular but arbitrarily chose iteger ³.That is:] Suppose that is ay iteger with ³ such that [We must show that P( + ) is true. That is:] We must show that Sprig 08 CSE 353 Discrete Computatioal Structures 44

Mathematical Iductio Example Ca also be writte as: [We will show that the left-had side ad the right-had side of P( + ) are equal to the same quatity ad thus are equal to each other.] Sprig 08 CSE 353 Discrete Computatioal Structures 45 Mathematical Iductio Example The left-had side (LHS) of P( + ) is: + + 3 +! + ( + ) + + 3 +! + + ( + ) Note that we have separated off the fial term why? Recall our iductive hypothesis we assumed the followig was true: Thus, we ca rewrite our LHS equatio as ( ) é + ù [ + + 3 +! + ] + ( + ) ê + + ë ú û ( ) Sprig 08 CSE 353 Discrete Computatioal Structures 46

Mathematical Iductio Example We ca simplify our LHS equatio as follows: ( ) é + ê ë ù ú + û ( + ) + + + ( + ) + 3 + ( + ) + Sprig 08 CSE 353 Discrete Computatioal Structures 47 Mathematical Iductio Example Now, develop our RHS of P(+). Recall that origial P(+) was: So, RHS is: ( )( + ) + + 3 + But ote that this is the same as for our LHS i the previous slide! Sprig 08 CSE 353 Discrete Computatioal Structures 48

Mathematical Iductio Example Thus the two sides of P( + ) are equal to the same quatity ad so they are equal to each other. Therefore the equatio P( + ) is true [as was to be show]. [Sice we have proved both the basis step ad the iductive step, we coclude that the theorem is true.] Sprig 08 CSE 353 Discrete Computatioal Structures 49 Example 5.- Usig Proof by Mathematical Iductio, show that the followig is true: For all itegers, + 3 ( + )( ) + + +! + 6 Sprig 08 CSE 353 Discrete Computatioal Structures 50

Closed Form of a Equatio Recall our earlier example sum: The RHS of the equatio is called the closed form (the LHS is called the expaded form) Why is this useful? If we wat to ow the value of a sum for a give, the closed form is easier to compute Sprig 08 CSE 353 Discrete Computatioal Structures 5 Geometric Sequeces I a geometric sequece, each term is obtaied from the precedig oe by multiplyig by a costat factor. If the first term is ad the costat factor is r, the the sequece is, r, r, r 3,..., r,.... The sum of the first terms of this sequece is give by the formula for all itegers ³ 0 ad real umbers r ot equal to. Sprig 08 CSE 353 Discrete Computatioal Structures 5

Outlie 5. Sequeces 5. Mathematical Iductio I 5.6 Defiig Sequeces Recursively 5.7 Solvig Recurrece Relatios by Iteratio Sprig 08 CSE 353 Discrete Computatioal Structures 53 Defiig Sequeces Recursively We have see that there are various ways to defie a sequece Oe iformal way is to write the first few terms with the expectatio that the geeral patter will be obvious. We might say, for istace, cosider the sequece, 4,.... Ufortuately, misuderstadigs ca occur whe this approach is used. The ext term of the sequece could be 6 if we mea a sequece of eve itegers, or it could be 8 if we mea the sequece of powers of. Sprig 08 CSE 353 Discrete Computatioal Structures 54

Defiig Sequeces Recursively A secod way to defie a sequece is to give a explicit formula for its th term. For example, we ca defie a sequece of eve itegers a, a. as a, " itegers ³ Sprig 08 CSE 353 Discrete Computatioal Structures 55 Defiig Sequeces Recursively We ca defie the sequece of powers of as a," itegers ³ The advatage of defiig a sequece by such a explicit formula is that each term of the sequece is uiquely determied ad ca be computed i a fixed, fiite umber of steps, by substitutio. Sprig 08 CSE 353 Discrete Computatioal Structures 56

Defiig Sequeces Recursively A third way to defie a sequece is to use recursio. This requires givig both a equatio, called a recurrece relatio, that defies each later term i the sequece by referece to earlier terms ad also oe or more iitial values for the sequece. Sprig 08 CSE 353 Discrete Computatioal Structures 57 Recurrece Relatio Assume we have a sequece a 0, a, a, A recurrece relatio for this sequece is a formula that relates each term a to predecessor terms (a -, a -, ) The iitial coditios for this relatio specify iitial values of the sequece (a 0, a, ) Sprig 08 CSE 353 Discrete Computatioal Structures 58

Example We have the followig recurrece relatio: a a +, for all itegers ³ - We are give the iitial coditio a What are the first 4 terms i this sequece? We are give a Term (): a a + () + 4 ( 3): a 3 a + 3 (4) + 3 8 + 3 ( 4): a 4 a 3 + 4 () + 4 + 4 6 Sprig 08 CSE 353 Discrete Computatioal Structures 59 Explicit Formulas ad Recurrece Relatios Let a 0, a, a be defied by the formula a 3 + for all itegers 0. Ca this sequece also be expressed as a recurrece relatio? Idetify first 5 terms: For 0, a 0 3(0) + For, a 3() + 4 For, a 3() + 7 For 3, a 3 3(3) + 0 For 4, a 4 3(4) + 3 Sprig 08 CSE 353 Discrete Computatioal Structures 60

Explicit Formulas ad Recurrece Relatios Let a 0 be the iitial coditio: a 0 3(0) + The, we eed a recurrece relatio for all itegers a 3 +, ad a - 3(-) + 3 3 + (3+) 3 a - 3 Thus, a a - + 3 for all itegers For, a + 3 4 For, a 4 + 3 7 For 3, a 3 7 + 3 0 For 4, a 4 0 + 3 3 Sprig 08 CSE 353 Discrete Computatioal Structures 6 Example 5.6- We are give a sequece t 0, t, t.. that is defied by the formula t + for all itegers 0. Ca we develop a recurrece relatio for this sequece? Sprig 08 CSE 353 Discrete Computatioal Structures 6

Recursive Defiitio of Sums ad Products We ca also use recurrece relatios to defie sums ad products. First, we ca defie a summatio as the followig: Iitial Coditio : Recurrece Relatio : å a i i å a i a i ( ) å a + a, if > - i i Sprig 08 CSE 353 Discrete Computatioal Structures 63 Recursive Defiitio of Sums ad Products Next, we ca defie a product as the followig: Iitial Coditio : Recurrece Relatio : Õa i i Õ a i a i ( ) Õa a, if > - i i Sprig 08 CSE 353 Discrete Computatioal Structures 64

Recursive Defiitio of Sums ad Products The effect of these defiitios is to specify a order i which sums ad products of more tha two umbers are computed. For example, The recursive defiitios are used with mathematical iductio to establish various properties of geeral fiite sums ad products. Sprig 08 CSE 353 Discrete Computatioal Structures 65 Outlie 5. Sequeces 5. Mathematical Iductio I 5.6 Defiig Sequeces Recursively 5.7 Solvig Recurrece Relatios by Iteratio Sprig 08 CSE 353 Discrete Computatioal Structures 66

Solvig Recurrece Relatios by Iteratio Suppose you have a sequece that satisfies a certai recurrece relatio ad iitial coditios. It is ofte helpful to ow a explicit formula for the sequece, especially if you eed to compute terms with very large subscripts or if you eed to examie geeral properties of the sequece. Sprig 08 CSE 353 Discrete Computatioal Structures 67 Solvig Recurrece Relatios by Iteratio Such a explicit formula is called a solutio to the recurrece relatio. The most basic method for fidig a explicit formula for a recursively defied sequece is iteratio. Sprig 08 CSE 353 Discrete Computatioal Structures 68

The Method of Iteratio Iteratio wors as follows: Give a sequece a 0, a, a,... defied by a recurrece relatio ad iitial coditios, you start from the iitial coditios ad calculate successive terms of the sequece util you see a patter developig At that poit you guess a explicit formula Sprig 08 CSE 353 Discrete Computatioal Structures 69 Example Let a, a,... be the sequece defied recursively as follows: Recurrece relatio is: a 3a - +, itegers Iitial coditio is: a Use iteratio to guess a explicit formula for the sequece. Start developig the sequece from the iitial coditio: Sprig 08 CSE 353 Discrete Computatioal Structures 70

Example a a 3a + 3() + 3 + a 3 3a + 3(3 + ) + 3 + 3 + a 4 3a + 3(3 + 3 + ) + 3 3 + 3 + 3 + a 5 3a 3 + 3(3 3 + 3 + 3 + ) + 3 4 + 3 3 + 3 + 3 + There seems to be a patter here! a 3 - + 3 - +. + 3 3 + 3 + 3 + 3 0 Sprig 08 CSE 353 Discrete Computatioal Structures 7 Specific Sequeces Whe solvig recurrece relatios by iteratio, we may ecouter oe of two commo sequece types:. Arithmetic Sequece. Geometric Sequece Sprig 08 CSE 353 Discrete Computatioal Structures 7

Arithmetic Sequece Assume we have a sequece a 0, a, a, If we have a costat d such that a a - + d for all itegers The this sequece is called a arithmetic sequece I this case, it follows that a a 0 + d for all itegers 0 Sprig 08 CSE 353 Discrete Computatioal Structures 73 a 0 d 5 a + 5 Example a + 5() 6 + 5 for recurrece relatio a + 5() 6 + 5 a 3 + 5(3) 6 + 5 Series is,6,,6, Sprig 08 CSE 353 Discrete Computatioal Structures 74

Geometric Sequece Assume we have a sequece a 0, a, a, If we have a costat r such that a ra - for all itegers The this sequece is called a geometric sequece I this case, it follows that a a 0 r for all itegers 0 Sprig 08 CSE 353 Discrete Computatioal Structures 75 a 0 r 3 a a 0 r Example a ()3 3 3() for recurrece relatio a ()3 9 3(3) a 3 ()3 3 7 3(9) Series is,3,9,7 Sprig 08 CSE 353 Discrete Computatioal Structures 76

Example 5.7- Our compay, Mustag Idustries, is producig a ew microprocessor, code amed Perua Our iitial productio ru yield 70 uits If we ca icrease our productivity by uits per day, how may uits ca we expect to produce i 30 days? Sprig 08 CSE 353 Discrete Computatioal Structures 77