Module 12 Sequences 2 4 Sequences Summations 662021

  • Slides: 32
Download presentation
Module #12 - Sequences 2. 4 Sequences &Summations 6/6/2021 1

Module #12 - Sequences 2. 4 Sequences &Summations 6/6/2021 1

Module #12 - Sequences, Strings, & Summations • A sequence or series is just

Module #12 - Sequences, Strings, & Summations • A sequence or series is just like an ordered ntuple, except: – Each element in the series has an associated index number. – A sequence or series may be infinite. • A string is a sequence of symbols from some finite alphabet. • A summation is a compact notation for the sum of all terms in a (possibly infinite) series. 6/6/2021 2

Module #12 - Sequences • A sequence or series {an} : is a sequence

Module #12 - Sequences • A sequence or series {an} : is a sequence and an is a term of the sequence Sequences are described by listing the terms of the sequence in order of increasing subscripts. {an}= a 1, a 2, a 3, a 4, …. . , 6/6/2021 3

Module #12 - Sequences • If f is a generating function for a series

Module #12 - Sequences • If f is a generating function for a series {an}, then the symbol an denotes f(n), also called term n of the sequence. – The index of an is n. • A series is sometimes denoted by listing its first and/or last few elements, and using ellipsis (…) notation. – E. g. , “{an} = 0, 1, 4, 9, 16, 25, …” is taken to mean n N, an = n 2. 6/6/2021 4

Module #12 - Sequences Sequence Examples • An example of an infinite series: –

Module #12 - Sequences Sequence Examples • An example of an infinite series: – Consider the series {an} = a 1, a 2, …, where ( n 1) an= f(n) = 1/n. – Then, we have {an} = 1, 1/2, 1/3, … 6/6/2021 5

Module #12 - Sequences Example with Repetitions • Like tuples, but unlike sets, a

Module #12 - Sequences Example with Repetitions • Like tuples, but unlike sets, a sequence may contain repeated instances of an element. • Consider the sequence {bn} = b 0, b 1, … (note that 0 is an index) where bn = ( 1)n. – Thus, {bn} = 1, 1, … • Note repetitions! – This {bn} denotes an infinite sequence of 1’s and 1’s, not the 2 -element set {1, 1}. 6/6/2021 6

Module #12 - Sequences are two types: • Geometric progression: it is a sequence

Module #12 - Sequences are two types: • Geometric progression: it is a sequence of form a, ar 2, ar 3 ………, arn where the initial term is a and the common ratio r are real numbers. • Arithmetic progression: it is a sequence of form a, a+d, a+2 d, ………, a + nd where the initial term a and the common difference d are real numbers 6/6/2021 7

Module #12 - Sequences Examples of Geometric Example 1: {bn } with bn =

Module #12 - Sequences Examples of Geometric Example 1: {bn } with bn = (-1)n , n>=1 list of terms: b 1, b 2, ……are: -1, 1, ……. . – initial term = -1, common ratio= -1, Example 2: {Cn} with Cn = 2× 5 n , n>=1 list of terms: C 1, C 2, C 3, . . . are: 10, 50, 250, 1250, ………. – initial term = 10, common ratio= 5 6/6/2021 8

Module #12 - Sequences Examples of Geometric Example 3: {dn } with dn =

Module #12 - Sequences Examples of Geometric Example 3: {dn } with dn = 6×(1/3)n , n>=0 list of terms: d 1, d 2, d 3, d 4, . . Are: 2, 2/3, 2/9, 2/27, . . . – initial term = 2, common ratio= 1/3 6/6/2021 9

Module #12 - Sequences Examples of Arithmetic Example 1: {Sn} with Sn = -1

Module #12 - Sequences Examples of Arithmetic Example 1: {Sn} with Sn = -1 + 4 n, n ≥ 0 is arithmetic sequence where the list of terms : s 0, s 1, s 2, s 3, s 4, . . . are: Sn = -1, 3, 7, 11, … OR Sn = sn-1+4, S 0=-1, n ≥ 0 – initial term = -1, common Difference= 4 Example 2: {an } with an = 6 n – 1 , n ≥ 1 The sequence : 5, 11, 17, 23, 29 … is arithmetic progression where: initial term = 5, common Difference= 6 6/6/2021 10

Module #12 - Sequences Examples of Arithmetic Example 3: {tn} with tn = 7

Module #12 - Sequences Examples of Arithmetic Example 3: {tn} with tn = 7 - 3 n, n ≥ 0 is arithmetic sequence where the list of terms : t 0, t 1, t 2, t 3, t 4, . . . are: tn = 7, 4, 1, -2 , . . . – initial term = 7, common Difference= -3 tn = tn-1 +-3 , t 0 =7 6/6/2021 11

Module #12 - Sequences Recognizing Sequences • Sometimes, you’re given the first few terms

Module #12 - Sequences Recognizing Sequences • Sometimes, you’re given the first few terms of a sequence, – and you are asked to find the sequence’s generating function, – or a procedure to generate the sequence. • Examples: What’s the next number? – 1, 2, 3, 4, … – 1, 3, 5, 7, 9, … – 2, 3, 5, 7, 11, . . . 6/6/2021 5 (the 5 th smallest number >0) 11 (the 6 th smallest odd number >0) 13 (the 6 th smallest prime number) 12

Module #12 - Sequences Example • Find the formula the following sequence: 1, ½,

Module #12 - Sequences Example • Find the formula the following sequence: 1, ½, ¼, 1/8, 1/16, …… {an} with an = 1/2 n-1 , n>=1 (OR 1/2 n n>=0) it’s a geometric progression where: initial term a is 1 , common ratio r is 1/2 6/6/2021 13

Module #12 - Sequences Example • Find the formula the following sequence: 1, 3

Module #12 - Sequences Example • Find the formula the following sequence: 1, 3 , 5, 7, 9, …… {an} with an = 2 n-1 , n>0 (Or 2 n+1 when n>=0) the sequence is an arithmetic progression where: initial term a is 1 , common difference d is 2 6/6/2021 14

Module #12 - Sequences Some Useful Sequences nth term n 2 n 3 2

Module #12 - Sequences Some Useful Sequences nth term n 2 n 3 2 n n! 6/6/2021 First 5 terms 1, 4, 9, 16, 25, …. . 1, 8, 27, 64, 125, …. 2, 4, 8, 16, 32, 64, …. 1, 2, 6, 24, 120, …. 15

Module #12 - Sequences Example: Find the formula the following sequence: 2, 5, 10,

Module #12 - Sequences Example: Find the formula the following sequence: 2, 5, 10, 17, 26, …. . {an} where an = n 2 +1 Because: n 2 is 1, 4, 9, 16, 25, …. . 6/6/2021 16

Module #12 - Sequences Summations 6/6/2021 17

Module #12 - Sequences Summations 6/6/2021 17

Module #12 - Sequences Summation Notation • Given a series {an}, an integer lower

Module #12 - Sequences Summation Notation • Given a series {an}, an integer lower bound (or limit) j 0, and an integer upper bound k j, then the summation of {an} from j to k is written and defined as follows: • Here, i is called the index of summation. 6/6/2021 18

Module #12 - Sequences Generalized Summations • For an infinite series, we may write:

Module #12 - Sequences Generalized Summations • For an infinite series, we may write: • To sum a function over all members of a set X={x 1, x 2, …}: • Or, if X={x|P(x)}, we may just write: 6/6/2021 19

Module #12 - Sequences Simple Summation Example 6/6/2021 20

Module #12 - Sequences Simple Summation Example 6/6/2021 20

Module #12 - Sequences More Summation Examples Using a predicate to define a set

Module #12 - Sequences More Summation Examples Using a predicate to define a set of elements to sum over: 6/6/2021 21

Module #12 - Sequences Summation Manipulations • Some handy identities for summations: (Distributive law.

Module #12 - Sequences Summation Manipulations • Some handy identities for summations: (Distributive law. ) (Application of commutativity. ) (Index shifting. ) 6/6/2021 22

Module #12 - Sequences More Summation Manipulations • Other identities that are sometimes useful:

Module #12 - Sequences More Summation Manipulations • Other identities that are sometimes useful: (Series splitting. ) 6/6/2021 23

Module #12 - Sequences Nested Summations • These have the meaning you’d expect. •

Module #12 - Sequences Nested Summations • These have the meaning you’d expect. • Note issues of free vs. bound variables, just like in quantified expressions, integrals, etc. 6/6/2021 24

Module #12 - Sequences Some Shortcut Expressions(1) Geometric series. Euler’s trick. Quadratic series. Cubic

Module #12 - Sequences Some Shortcut Expressions(1) Geometric series. Euler’s trick. Quadratic series. Cubic series. 6/6/2021 25

Module #12 - Sequences Some Shortcut Expressions(2) 6/6/2021 26

Module #12 - Sequences Some Shortcut Expressions(2) 6/6/2021 26

Module #12 - Sequences Using the Shortcuts • Example: Evaluate . – Use series

Module #12 - Sequences Using the Shortcuts • Example: Evaluate . – Use series splitting. – Solve for desired summation. – Apply quadratic series rule. – Evaluate. 6/6/2021 27

Module #12 - Sequences Example 6/6/2021 28

Module #12 - Sequences Example 6/6/2021 28

Module #12 - Sequences Examples • Find = n(n+1)/2 – n(n+1)/2 = (200)(201)/2 –

Module #12 - Sequences Examples • Find = n(n+1)/2 – n(n+1)/2 = (200)(201)/2 – (99)(100)/2 =15150 6/6/2021 29

Module #12 - Sequences Example • Find: 6/6/2021 30

Module #12 - Sequences Example • Find: 6/6/2021 30

Module #12 - Sequences Example • Find 6/6/2021 31

Module #12 - Sequences Example • Find 6/6/2021 31

Module #12 - Sequences Example • Find : An infinite series with a finite

Module #12 - Sequences Example • Find : An infinite series with a finite sum: 6/6/2021 32