0% found this document useful (0 votes)
50 views39 pages

Discrete Structures Lecture 11

This document discusses sequences and summations in discrete mathematics. It defines sequences as ordered lists of elements represented by a function, and covers arithmetic and geometric sequences. It also defines summations as the sum of terms in a sequence, demonstrates examples of evaluating summations, and discusses properties of summations including double summations.

Uploaded by

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

Discrete Structures Lecture 11

This document discusses sequences and summations in discrete mathematics. It defines sequences as ordered lists of elements represented by a function, and covers arithmetic and geometric sequences. It also defines summations as the sum of terms in a sequence, demonstrates examples of evaluating summations, and discusses properties of summations including double summations.

Uploaded by

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

CSD101 - Discrete Structures

(Discrete Mathematics)
Fall 2016

Lecture - 11
Sequences
and
Summations
Sequences

• A sequence is a discrete structure used to represent


an ordered list of elements e.g. 1, 2, 3, 4, 5 and 1, 3,
9, 27, 81, ….
Sequences

• A sequence is a function from a subset of the set integers


Z (usually the set {0,1,2,…} or the set {1,2,3,…}) to a set
S.

• The notation 𝑎𝑛 denotes the image of the integer 𝑛.


• 𝑎𝑛 : a term of the sequence
• {𝑎𝑛 } : entire sequence
Z S
• Same notation as sets!

n an
Sequences

• Consider the sequence {an}, where an = 1/n.


• The list of the terms of this sequence beginning with a1:
a1 , a2 , a3 , a4 , …
{1, 1/2, 1/3, 1/4 , … }

• Consider the sequence {an}, where an = 3n.


• The list of the terms of this sequence beginning with a1:
{3, 6, 9, 12 , …}
Geometric Progression
A geometric progression is a sequence of the form

𝑎, 𝑎𝑟, 𝑎𝑟 2 , … . , 𝑎𝑟 𝑛 , …

Where the initial term a and the common ratio r are


real numbers.
General Term of Geometric Progression
• Let a be the first term and r be the common ratio of a
geometric sequence. Then the sequence is
𝑎, 𝑎𝑟, 𝑎𝑟 2 , 𝑎𝑟 3 , …

• If 𝑎𝑛 , for n ≥ 1, represents the terms of the sequence then


𝑎1 = first term = 𝑎 = 𝑎𝑟1;1
𝑎2 = second term = 𝑎𝑟 = 𝑎𝑟 2;1
𝑎3 = third term = 𝑎𝑟 2 = 𝑎𝑟 3;1
By symmetry
𝑎𝑛 = nth term = 𝑎𝑟 𝑛;1 for all integers n ≥ 1.
Geometric Progression (Example)

• Is {2. (5)𝑛;1 } geometric progression? If yes then what will


be sequence, initial term and common ratio?
2,10,50,250,…
Yes, a=2 and r=5

• Is {6. (1 3)𝑛;1 } geometric progression?


6,2,2/3,2/9,…
Yes, a=6 and r=1/3
Geometric Progression (Example

• Find the 8th term of the following geometric sequence

4, 12, 36, 108, …


Arithmetic Progression

• An arithmetic progression is a sequence of the form

𝑎, 𝑎 + 𝑑, 𝑎 + 2𝑑, … . , 𝑎 + 𝑛𝑑, …

• Where the initial term a and the common difference d


are real numbers.
General Term of Arithmetic Progression
• Let a be the first term and d be the common difference of
an arithmetic sequence. Then the sequence is
𝑎, 𝑎 + 𝑑, 𝑎 + 2𝑑, 𝑎 + 3𝑑, …

• If 𝑎𝑛 , for n ≥ 1, represents the terms of the sequence then


𝑎1 = first term = 𝑎 = 𝑎 + (1 − 1)𝑑
𝑎2 = second term = 𝑎 + 𝑑 = 𝑎 + (2 − 1)𝑑
𝑎3 = third term = 𝑎 + 2𝑑 = 𝑎 + (3 − 1)𝑑
By symmetry
𝑎𝑛 = nth term = 𝑎 + (𝑛 − 1)𝑑 for all integers n ≥ 1.
Arithmetic Progression (Example)

• Is *4𝑛 − 5+ Arithmetic progression?


-1,3,7,11,…
Yes, a=-1 and d=4

• Is *10 − 3𝑛+ Arithmetic progression?


7,4,1,-2,…
Yes, a=7 and d=-3
Arithmetic Progression (Example)

• Find the 20th term of the arithmetic sequence

3, 9, 15, 21, …

• Which term of the arithmetic sequence

4, 1, −2, … , 𝑖𝑠 − 77
Determining the Sequence Formula
• Given values in a sequence, how do you determine the
formula?
• Steps to consider:
• Is it an arithmetic progression (each term a constant
amount from the last)?
• Is it a geometric progression (each term a factor of the
previous term)?
• Does the sequence repeat itself (or cycle)?
• Does the sequence combine previous terms?
• Are there runs of the same value?
Sequences (Example)

• Find a formula for the following sequence.

1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, …

Solution:

The sequence alternates 1’s and 0’s, increasing the


number of 1’s and 0’s each time.
Sequences (Example)

• Find a formula for the following sequence.

1, 1/2, 1/4, 1/8, 1/16, …

Solution:

*1/2𝑛;1 +
It is a geometric progression.
a=1 and r=1/2
Sequences (Example)
• Find formula for the following sequence.

1, 3, 5, 7, 9, …

Solution:

*2𝑛 − 1+
It is a arithmetic progression.
a=1 and d=2
Sequences (Example)
• Find formula for the following sequence.

1, −1, 1, −1, 1, …

Solution:

* −1 𝑛;1 +
It is a geometric progression.
a=1 and r=-1
Sequences (Example)

• How can you produce the terms of the following


sequence?
1, 2, 2, 3, 3, 3, 4, 4, 4, 4, …

Solution:

A rule for generating this sequence is that integer n


appears exactly n times.
Sequences (Example)

• How can you produce the terms of the following


sequence?
5, 11, 17, 23, 29, 35, 41, …
Solution:

A rule for generating this sequence is 6𝑛 − 1.


It is an arithmetic progression.
a=5 and d=6
Sequences (Example)

• Find a formula for the following sequence.

15, 8, 1, −6, −13, −20, −27, …


Solution:

Each term is 7 less than the previous term.


𝑎𝑛 = 22 − 7𝑛
Useful Sequences
Sequences (Example)

• Find a formula for the following sequence?

2, 16, 54, 128, 250, 432, 686, …


Solution:

Each term is twice the cube of 𝑛.


𝑎𝑛 = 2 ∗ 𝑛3
Sequences (Example)
• Find formula for the following sequence.

1, 7, 25, 79, 241, 727, 2185, …

Solution:

Compare it to *3𝑛 +.
*3𝑛 −2+
Summations
• The sum of the terms 𝑎𝑚 , 𝑎𝑚:1 , … , 𝑎𝑛 from the sequence
{𝑎𝑛 } is:

• 𝑎𝑚 , 𝑎𝑚:1 , … , 𝑎𝑛
𝑛
• 𝑗<𝑚 𝑎𝑗
• 𝑚≤𝑗≤𝑛 𝑎𝑗 , where donates summation and j is the
index of summation.

• m is lower limit and n is upper limit.


Summations
• A summation:
𝑛

𝑎𝑗
𝑗<𝑚
is like a for loop:

int sum = 0;
for ( int j = m; j <= n; j++ )
sum += a(j);
Summations (Example)

Express the sum of the first 100 terms of the sequence


{1/n} for n=1,2,3,… .

Solution:

100
1
𝑛
𝑛<1
Summations (Example)

3 2?
What is the value of 𝑖<1
𝑖

Solution:

𝑖 2 = 1 + 4 + 9 = 14
𝑖<1
More Summations (Example)
5
• 𝑘<1(𝑘 + 1) = 2 + 3 + 4 + 5 + 6 = 20

4 𝑘
• 𝑘<0(−2) = −2 0 + −2 1 + −2 2 + −2 3 +
(−2)4 = 11

10
• 𝑘<1 3 = 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3
= 30
More Summations (Example)
10
Evaluate 𝑘<1
2𝑘 − 2𝑘;1 ) = ?

Solution:

10

2𝑘 − 2𝑘;1 ) = (21 − 20 ) + (22 − 21 ) + (23 − 22 ) + (24 − 23 ) +


𝑘<1
25 − 24 ) + (26 − 25 ) + (27 − 26 ) + (28 − 27 ) + (29 − 28 ) + (210 − 29

= −1 + 210 = −1 + 1024 = 1023


Shifting the Index of Summation
• Useful in case of sum.

5 2
• 𝑗<1 𝑗 shift the index of summation from 0 to 4 rather
than from 1 to 5.
Properties of Summations
Example
𝑛 𝑛

𝑆𝑜𝑙𝑣𝑒 3 (2𝑘 − 3) + (4 − 5𝑘)


𝑘<1 𝑘<1
Double Summations
• Like a nested for loop
4
3
• 𝑗<1 𝑖𝑗
𝑖<1

Is equivalent to:
int sum = 0;
for ( int i = 1; i <= 4; i++ )
for ( int j = 1; j <= 3; j++ )
sum += i*j;
Double Summations
4
3
• 𝑗<1 𝑖𝑗
𝑖<1
Example
3
2
𝑆𝑜𝑙𝑣𝑒 𝑗<1
(𝑖 − 𝑗).
𝑖<1
Some Useful Summations
Example

100 2
Find 𝑘<50 𝑘 .
Example

200
Find 𝑘<100 𝑘 .
200 3
Find 𝑘<99 𝑘 .
Exercise Questions

Chapter # 2
Topic # 2.4
Questions 1, 2, 4, 25, 26, 29,30,31, 32, 33, 34, 39, 40

You might also like