0% found this document useful (0 votes)
25 views19 pages

Lecture 11

Uploaded by

Hasanul Mahi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views19 pages

Lecture 11

Uploaded by

Hasanul Mahi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 19

Lecture 11

Sequences and Summations

Topics:
1. Sequences and their Summation
2. Recurrence Relations
Sequences
Definition: A sequence is a function from a subset of the set of integers (usually
either the set {0, 1, 2, …} or the set {1, 2, 3, …}) to a set S. We use the notation an
to denote the image of the integer n. We call an a term of the sequence.

Example: Consider the sequence {an}, where

an = 1 /n .

The list of the terms of this sequence, beginning with a1, namely,

a1, a2, a3, a4, … ,

starts with 1, 1/ 2 , 1 /3 , 1 /4 , . …
Sequences: Geometric Progression
Definition: A geometric progression is a sequence of the form

a, ar, ar2 , … , arn , …

where the initial term a and the common ratio r are real numbers.

Remark: A geometric progression is a discrete analogue of the exponential


function f(x) = arx.
Sequences: Geometric Progression
Example: The sequences{bn} with bn = (-1)n, {cn} with cn = 2·5n, and {dn} with dn = 6
· (1/3)n are geometric progressions with initial term and common ratio equal to 1
and −1; 2 and 5; and 6 and 1/3, respectively, if we start at n = 0. The list of terms
b0,b1,b2,b3,b4,...begins with

1, −1, 1, −1, 1,...;

the list of terms c0,c1,c2,c3,c4,...begins with

2, 10, 50, 250, 1250,...;

and the list of terms d0,d1,d2,d3,d4,...begins with

6, 2, 2/3, 2/9, 2/27 ,....


Sequences: Arithmetic Progression

Definition: An Arithmetic Progression is a sequence of the form


a,a +d,a+2d,...,a+nd,...

where the initial term a and the common difference d are real numbers.
Sequences: Arithmetic Progression
Example: The sequences {sn} with sn = −1 + 4n and {tn} with tn = 7 − 3n are both arithmetic
progressions with initial terms and common differences equal to −1 and 4, and 7 and −3,
respectively, if we start at n = 0. The list of terms s0, s1, s2, s3, … begins with
−1, 3, 7, 11, … ,
and the list of terms t0, t1, t2, t3,, … begins with
7, 4, 1,−2, … .

Sequences of the form a1, a2, … , an are often used in computer science. These finite
sequences are also called strings. This string is also denoted by a1 a2 … an . The length of a
string is the number of terms in this string. The empty string, denoted by 𝜆, is the string that
has no terms. The empty string has length zero. For example, The string abcd is a string of
length four.
Recurrence Relations
Definition: A recurrence relation for the sequence {an} is an equation that
expresses an in terms of one or more of the previous terms of the sequence,
namely, a0, a1, … , an−1, for all integers n with n ≥ n0, where n0 is a nonnegative
integer. A sequence is called a solution of a recurrence relation if its terms satisfy
the recurrence relation. (A recurrence relation is said to recursively define a
sequence.)
Recurrence Relations
Example: Let {an} be a sequence that satisfies the recurrence relation an = an−1 + 3
for n = 1, 2, 3, … , and suppose that a0 = 2. What are a1, a2, and a3?

Solution: We see from the recurrence relation that a1 = a0 + 3 = 2 + 3 = 5.

It then follows that a2 = 5 + 3 = 8

and a3 = 8 + 3 = 11.
Recurrence Relations: Fibonacci sequence
Definition: The Fibonacci sequence, f0, f1, f2, … , is defined by the initial
conditions f0 = 0, f1 = 1, and the recurrence relation
fn = fn−1 + fn−2
for n = 2, 3, 4, … .
Recurrence Relations: Fibonacci sequence
Example: Find the Fibonacci numbers f2, f3, f4, f5, and f6.

Solution: The recurrence relation for the Fibonacci sequence tells us that we find
successive terms by adding the previous two terms. Because the initial conditions tell us
that f0 = 0 and f1 = 1, using the recurrence relation in the definition we find that,

f2 = f 1 + f 0 = 1 + 0 = 1 f5 = f 4 + f 3 = 3 + 2 = 5

f3 = f 2 + f 1 = 1 + 1 = 2 f6 = f 5+ f 4= 5 + 3 = 8

f4 = f 3 + f 2 = 2 + 1 = 3
Recurrence Relations: Compound Interest
Example: Suppose that a person deposits $10,000 in a savings account at a bank yielding 11% per year
with interest compounded annually. How much will be in the account after 30 years?

Solution: To solve this problem, let Pn denote the amount in the account after n years. Because the amount
in the account after n years equals the amount in the account after n−1 years plus interest for the nth year,
we see that the sequence { Pn} satisfies the recurrence relation

Pn = Pn−1 + 0.11Pn−1 = (1.11)Pn−1.

The initial condition is P0 = 10,000. We can use an iterative approach to find a formula for P n . Note that

P1 = (1.11)P0

P2 = (1.11)P1 = (1.11)2P0

P3 = (1.11)P2 = (1.11)3P0

Pn = (1.11)Pn−1 = (1.11)nP0.
Recurrence Relations: Compound Interest
When we insert the initial condition P0 = 10,000, the formula Pn = (1.11)n10,000 is
obtained.

Inserting n = 30 into the formula Pn = (1.11)n10,000 shows that after 30 years the
account contains

P30 = (1.11)3010,000 = $228,922.97.


Special Integer Sequences
Example 1: Find formulae for the sequences with the following first five terms: (a) 1, 1/2,
1/4, 1/8, 1/16 (b) 1, 3, 5, 7, 9 (c) 1, −1, 1, −1, 1.
Solution: (a) We recognize that the denominators are powers of 2. The sequence with a n
= 1/2n, n = 0, 1, 2, … is a possible match. This proposed sequence is a geometric
progression with a = 1 and r = 1/2.
(b) We note that each term is obtained by adding 2 to the previous term. The sequence
with an = 2n + 1, n = 0, 1, 2, … is a possible match. This proposed sequence is an
arithmetic progression with a = 1 and d = 2.
(c) The terms alternate between 1 and −1. The sequence with an = (−1)n, n = 0, 1, 2… is
a possible match. This proposed sequence is a geometric progression with a = 1 and r =
−1.
Special Integer Sequences
Example 2: How can we produce the terms of a sequence if the first 10 terms are
1, 2, 2, 3, 3, 3, 4, 4, 4, 4?

Solution: In this sequence, the integer 1 appears once, the integer 2 appears
twice, the integer 3 appears three times, and the integer 4 appears four times. A
reasonable rule for generating this sequence is that the integer n appears exactly
n times, so the next five terms of the sequence would all be 5, the following six
terms would all be 6, and so on. The sequence generated this way is a possible
match.
Summations
Next, we consider the addition of the terms of a sequence. For this we introduce
summation notation. We begin by describing the notation used to express the sum of
the terms

am, am+1, … , an

from the sequence {an}. We use the notation

(read as the sum from j = m to j = n of aj) to represent

am + am+1 + … + an
Summations

Here, the variable j is called the index of summation, and the choice of the letter j
as the variable is arbitrary; that is, we could have used any other letter, such as i
or k. Or, in notation,
Sum of terms of a geometric progression
Theorem:
Sum of terms of a geometric progression
Proof: Let
Sum of terms of a geometric progression

You might also like