0% found this document useful (0 votes)
52 views11 pages

Sequences and Summations: Milos Hauskrecht

This document defines sequences, arithmetic progressions, geometric progressions, recursively defined sequences like the Fibonacci sequence, and summations. It provides examples of each concept. Key formulas are given for the sum of terms in an arithmetic progression, also known as an arithmetic series. Examples are worked through to demonstrate calculating sums of sequences.
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)
52 views11 pages

Sequences and Summations: Milos Hauskrecht

This document defines sequences, arithmetic progressions, geometric progressions, recursively defined sequences like the Fibonacci sequence, and summations. It provides examples of each concept. Key formulas are given for the sum of terms in an arithmetic progression, also known as an arithmetic series. Examples are worked through to demonstrate calculating sums of sequences.
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/ 11

Sequences and summations

Milos Hauskrecht
milos@cs.pitt.edu
5329 Sennott Square

CS 441 Discrete mathematics for CS M. Hauskrecht

Sequences
Definition: A sequence is a function from a subset of the set of
integers (typically 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.
Notation: {an} is used to represent the sequence (note {} is the
same notation used for sets, so be careful). {an} represents the
ordered list a1, a2, a3, ... .

1 2 3 4 5 6 ….

a1 a2 a3 a4 a5 a6 ….

{an}
CS 441 Discrete mathematics for CS M. Hauskrecht

1
Sequences
Examples:
• (1) an = n2, where n = 1,2,3...
– What are the elements of the sequence?
1, 4, 9, 16, 25, ...
• (2) an = (-1) n, where n=0,1,2,3,...
– Elements of the sequence?
1, -1, 1, -1, 1, ...
• 3) an = 2 n, where n=0,1,2,3,...
– Elements of the sequence?
1, 2, 4, 8, 16, 32, ...

CS 441 Discrete mathematics for CS M. Hauskrecht

Arithmetic progression
Definition: An arithmetic progression is a sequence of the form
a, a+d,a+2d, …, a+nd
where a is the initial term and d is common difference, such that
both belong to R.

Example:
• sn= -1+4n for n=0,1,2,3, …
• members: -1, 3, 7, 11, …

CS 441 Discrete mathematics for CS M. Hauskrecht

2
Geometric progression
Definition A geometric progression is a sequence of the form:
a, ar, ar2, ..., ark,
where a is the initial term, and r is the common ratio. Both a and r
belong to R.

Example:
• an = ( ½ )n for n = 0,1,2,3, …
members: 1,½, ¼, 1/8, …..

CS 441 Discrete mathematics for CS M. Hauskrecht

Sequences
• Given a sequence finding a rule for generating the sequence is
not always straightforward

Example:
• Assume the sequence: 1,3,5,7,9, ….
• What is the formula for the sequence?
• Each term is obtained by adding 2 to the previous term.
1, 1+2=3, 3+2=5, 5+2=7
• What type of progression this suggest?

CS 441 Discrete mathematics for CS M. Hauskrecht

3
Sequences
• Given a sequence finding a rule for generating the sequence is
not always straightforward

Example:
• Assume the sequence: 1,3,5,7,9, ….
• What is the formula for the sequence?
• Each term is obtained by adding 2 to the previous term.
• 1, 1+2=3, 3+2=5, 5+2=7
• It suggests an arithmetic progression: a+nd
with a=1 and d=2
• an=1+2n

CS 441 Discrete mathematics for CS M. Hauskrecht

Sequences
• Given a sequence finding a rule for generating the sequence is
not always straightforward

Example 2:
• Assume the sequence: 1, 1/3, 1/9, 1/27, …
• What is the sequence?
• The denominators are powers of 3.
1, 1/3= 1/3, (1/3)/3=1/(3*3)=1/9, (1/9)/3=1/27
• This suggests a geometric progression: ark
with a=1 and r=1/3
• (1/3 )n

CS 441 Discrete mathematics for CS M. Hauskrecht

4
Recursively defined sequences
• The n-th element of the sequence {an} is defined recursively in
terms of the previous elements of the sequence and the initial
elements of the sequence.

Example :
• an = an-1 + 2 assuming a0 = 1;
• a0 = 1;
• a1 = 3;
• a2 = 5;
• a3 = 7;
• Can you write an non-recursively using n?
• an = 1 + 2n

CS 441 Discrete mathematics for CS M. Hauskrecht

Fibonacci sequence
• Recursively defined sequence, where
• f0 = 0;
• f1 = 1;
• fn = fn-1 + fn-2 for n = 2,3, …

• f2 = 1
• f3 = 2
• f4 = 3
• f5 = 5

CS 441 Discrete mathematics for CS M. Hauskrecht

5
Summations
Summation of the terms of a sequence:
n

a j  a m  a m  1  ...  a n
jm

The variable j is referred to as the index of summation.


• m is the lower limit and
• n is the upper limit of the summation.

CS 441 Discrete mathematics for CS M. Hauskrecht

Summations
Example:
• 1) Sum the first 7 terms of {n2} where n=1,2,3, ... .
• 7 7

j 1
a j   j 2 1  4  16  25  36  49  140
j 1

• 2) What is the value of


8 8

k4
a j   (  1) j 1  (  1)  1  (  1)  1  1
k4

CS 441 Discrete mathematics for CS M. Hauskrecht

6
Arithmetic series
Definition: The sum of the terms of the arithmetic progression
a, a+d,a+2d, …, a+nd is called an arithmetic series.

Theorem: The sum of the terms of the arithmetic progression


a, a+d,a+2d, …, a+nd is
n(n  1)
 j  na  d
n n
S   (a  jd )  na  d 
j 1 j 1 2

• Why?

CS 441 Discrete mathematics for CS M. Hauskrecht

Arithmetic series
Theorem: The sum of the terms of the arithmetic progression
a, a+d,a+2d, …, a+nd is
n(n  1)
 j  na  d
n n
S   (a  jd )  na  d 
j 1 j 1 2
Proof:
n n n n
S  (a  jd )  a  jd  na  d j
j 1 j 1 j 1 j 1

 j  1 2  3  4  ....  (n  2)  (n 1)  n
j 1

CS 441 Discrete mathematics for CS M. Hauskrecht

7
Arithmetic series
Theorem: The sum of the terms of the arithmetic progression
a, a+d,a+2d, …, a+nd is
n(n  1)
 j  na  d
n n
S   (a  jd )  na  d 
j 1 j 1 2
Proof: n n n n
S  (a  jd )  a  jd  na  d j
j 1 j 1 j 1 j 1

 j  1 2  3  4  ....  (n  2)  (n 1)  n
j 1

n+1 n+1 … n+1


n
*(n 1)
2
CS 441 Discrete mathematics for CS M. Hauskrecht

Arithmetic series
5
Example: S  (2  j3) 
j 1
5 5
 2  j3 
j 1 j 1

5 5
 21 3 j 
j 1 j 1

5
 2*5  3 j 
j 1

(5 1)
 10  3 *5 
2

 10  45  55

CS 441 Discrete mathematics for CS M. Hauskrecht

8
Arithmetic series
5
Example 2: S  (2  j3) 
j 3

 5
  2 
 (2  j3)   (2  j3)  Trick
 j 1   j 1 
 5 5   2 2 
 21 3 j   21 3 j 
 j 1 j 1   j 1 j 1 

 55 13  42

CS 441 Discrete mathematics for CS M. Hauskrecht

Double summations
42
Example: S  (2i  j) 
i1 j 1
4 2 2

  2i   j  
i1  j 1 j 1 
4  2 2 
 2i1 j 
i1  j 1 j 1 
4  2

 2i * 2  j 
i1  j 1 
4
 2i * 2  3 
i1
4 4
 4i 3 
i1 i1
4 4
 4 i  31  4*10  3* 4  28
i1 i1

CS 441 Discrete mathematics for CS M. Hauskrecht

9
Geometric series
Definition: The sum of the terms of a geometric progression a, ar,
ar2, ..., ark is called a geometric series.

Theorem: The sum of the terms of a geometric progression a, ar,


ar2, ..., arn is
n n
 rn1 1
S  (ar j )  ar j a 
j 0 j 0  r 1 

CS 441 Discrete mathematics for CS M. Hauskrecht

Geometric series
Theorem: The sum of the terms of a geometric progression a, ar,
ar2, ..., arn is n n
 rn1 1
S  (ar j )  a r j a 
j 0 j 0  r 1 
Proof: n
S  ar j  a  ar  ar 2  ar3  ...  arn
j 0

• multiply S by r
n
rS  rar j  ar  ar 2  ar3  ...  arn1 j
0

• Substract rS  S  ar  ar 2  ar 3  ...  ar n1  a  ar  ar 2 ..  ar n 


 arn1  a
arn1  a  rn1 1
S   a 
r 1  r 1 
CS 441 Discrete mathematics for CS M. Hauskrecht

10
Geometric series
Example: 3
S  2(5) j 
j 0

General formula:
n n
 rn1 1
S  (ar j )  a r j a 
j 0 j 0  r 1 
3
54 1 
S  2(5) j 2* 
j 0 5 1

625 1 624
 2*  2*  2*156  312
4 4

CS 441 Discrete mathematics for CS M. Hauskrecht

Infinite geometric series


• Infinite geometric series can be computed in the closed form
for x<1
• How?
 k
x k 1  1
 x  lim k   xn  lim
1 1
n
k    
n0 n0 x1 x 1 1  x

• Thus:

1

n0
xn 
1x

CS 441 Discrete mathematics for CS M. Hauskrecht

11

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy