Lecture 10: Sequences and Summations (2) Dr. Chengjiang Long - - PowerPoint PPT Presentation

lecture 10 sequences and summations 2
SMART_READER_LITE
LIVE PREVIEW

Lecture 10: Sequences and Summations (2) Dr. Chengjiang Long - - PowerPoint PPT Presentation

Lecture 10: Sequences and Summations (2) Dr. Chengjiang Long Computer Vision Researcher at Kitware Inc. Adjunct Professor at SUNY at Albany. Email: clong2@albany.edu Outline Special sequences Sum of the elements of a sequence 2 C.


slide-1
SLIDE 1

Lecture 10: Sequences and Summations (2)

  • Dr. Chengjiang Long

Computer Vision Researcher at Kitware Inc. Adjunct Professor at SUNY at Albany. Email: clong2@albany.edu

slide-2
SLIDE 2
  • C. Long

Lecture 10 September 25, 2018 2 ICEN/ICSI210 Discrete Structures

Outline

  • Special sequences
  • Sum of the elements of a sequence
slide-3
SLIDE 3
  • C. Long

Lecture 10 September 25, 2018 3 ICEN/ICSI210 Discrete Structures

Outline

  • Special sequences
  • Sum of the elements of a sequence
slide-4
SLIDE 4
  • C. Long

Lecture 10 September 25, 2018 4 ICEN/ICSI210 Discrete Structures

Sequences

  • Definition: A sequence is a function from a subset of

integers to a set S. We use the notation(s): {an} or {an}#$%

&

  • Each an is called the nth term of the sequence
  • We rely on the context to distinguish between a

sequence and a set, although they are distinct structures

slide-5
SLIDE 5
  • C. Long

Lecture 10 September 25, 2018 5 ICEN/ICSI210 Discrete Structures

Geometric Sequence

  • Definition: A geometric progression is a

sequence of the form a, aq, aq2, aq3, …, aqn, … Where:

  • aÎR is called the initial term
  • qÎR is called the common ratio
  • A geometric progression is a discrete analogue
  • f the exponential function

f(x) = aqx

slide-6
SLIDE 6
  • C. Long

Lecture 10 September 25, 2018 6 ICEN/ICSI210 Discrete Structures

Arithmetic Sequence

  • Definition: An arithmetric progression is a

sequence of the form a, a+d, a+2d, a+3d, …, a+nd, … Where:

  • aÎR is called the initial term
  • dÎR is called the common difference
  • An arithmetic progression is a discrete

analogue of the linear function f(x) = dx+a

slide-7
SLIDE 7
  • C. Long

Lecture 10 September 25, 2018 7 ICEN/ICSI210 Discrete Structures

Arithmetic Series

Consider an arithmetic series a1, a2, a3, …, an. If the common difference (ai+1 - a1) = d, then we can compute the kth term ak as follows: a2 = a1 + d a3 = a2 + d = a1 +2 d a4 = a3 + d = a1 + 3d ak = a1 + (k-1).d

slide-8
SLIDE 8
  • C. Long

Lecture 10 September 25, 2018 8 ICEN/ICSI210 Discrete Structures

Fibonacci Sequence

Golden ratio.

slide-9
SLIDE 9
  • C. Long

Lecture 10 September 25, 2018 9 ICEN/ICSI210 Discrete Structures

Harmonic Sequence

  • The sequence: {ℎ#}%&'

(

= 1/n is known as the harmonic sequence

  • The sequence is simply:

1, 1/2, 1/3, 1/4, 1/5, …

  • This sequence is particularly interesting because its

summation is divergent: ∑%&'

(

(1/n) = ¥

slide-10
SLIDE 10
  • C. Long

Lecture 10 September 25, 2018 10 ICEN/ICSI210 Discrete Structures

Some useful sequences

slide-11
SLIDE 11
  • C. Long

Lecture 10 September 25, 2018 11 ICEN/ICSI210 Discrete Structures

Outline

  • Special sequences
  • Sum of the elements of a sequence
slide-12
SLIDE 12
  • C. Long

Lecture 10 September 25, 2018 12 ICEN/ICSI210 Discrete Structures

Summation

  • You should be by now familiar with the summation

notation: ∑"#$

%

&" = am + am+1 + … + an-1 + an Here

  • i is the index of the summation
  • m is the lower limit
  • n is the upper limit
  • Often times, it is useful to change the lower/upper

limits, which can be done in a straightforward manner (although we must be very careful): ∑"#'

%

&" = ∑"#(

%)' &"*'

slide-13
SLIDE 13
  • C. Long

Lecture 10 September 25, 2018 13 ICEN/ICSI210 Discrete Structures

Summation

slide-14
SLIDE 14
  • C. Long

Lecture 10 September 25, 2018 14 ICEN/ICSI210 Discrete Structures

Summation of Geometric Sequence

Subtracting the expressions gives With 5 terms of the general geometric sequence, we have TRICK Multiply by r:

4 3 2 5

ar ar ar ar a S + + + + =

5 4 3 2 5

ar ar ar ar ar rS + + + + =

4 3 2 5 5

ar ar ar ar a rS S + + + + =

  • 5

4 3 2

ar ar ar ar ar + + + +

  • Move the lower row 1 place to the right and subtract
slide-15
SLIDE 15
  • C. Long

Lecture 10 September 25, 2018 15 ICEN/ICSI210 Discrete Structures

Summation of Geometric Sequence

Subtracting the expressions gives With 5 terms of the general geometric sequence, we have TRICK Multiply by r:

4 3 2 5

ar ar ar ar a S + + + + =

5 4 3 2 5

ar ar ar ar ar rS + + + + =

4 3 2 5 5

ar ar ar ar a rS S + + + + =

  • 5

4 3 2

ar ar ar ar ar + + + +

  • 5

5 5

ar a rS S

  • =
slide-16
SLIDE 16
  • C. Long

Lecture 10 September 25, 2018 16 ICEN/ICSI210 Discrete Structures

Summation of Geometric Sequence

r r a S

  • =

Þ 1 ) 1 (

5 5

r r a S

n n

  • =

1 ) 1 (

Similarly, for n terms we get

5 5 5

ar a rS S

  • =
  • So,

Take out the common factors and divide by ( 1 – r )

) 1 ( ) 1 (

5

r r

  • =
  • a

S5

slide-17
SLIDE 17
  • C. Long

Lecture 10 September 25, 2018 17 ICEN/ICSI210 Discrete Structures

Summation of Geometric Sequence

gives a negative denominator if r > 1

r r a S

n n

  • =

1 ) 1 (

The formula

1 ) 1 (

  • =

r r a S

n n

Instead, we can use

slide-18
SLIDE 18
  • C. Long

Lecture 10 September 25, 2018 18 ICEN/ICSI210 Discrete Structures

Find the sum of the first 20 terms of the geometric series, leaving your answer in index form

( )

( )

( )

3 1 3 1 2

20 20

  • =

Þ S

r r a S

n n

  • =

1 ) 1 (

. . . 54 18 6 2 +

  • +
  • 2

6 , 2

  • =

= r a

Solution:

3

  • 1

3

  • =

We’ll simplify this answer without using a calculator

Example

slide-19
SLIDE 19
  • C. Long

Lecture 10 September 25, 2018 19 ICEN/ICSI210 Discrete Structures

( )

4 3 1 2

20

  • =

2 3 1

20

  • =

There are 20 minus signs here and 1 more outside the bracket!

( )

( )

( )

3 1 3 1 2

20 20

  • =

Þ S

1 2

Example

slide-20
SLIDE 20
  • C. Long

Lecture 10 September 25, 2018 20 ICEN/ICSI210 Discrete Structures

Sum of arithmetic series

  • Write the first three terms and the last two terms of the

following arithmetic series.

( )

50 1

73 2

p

p

=

  • å

( ) ( )

71 69 67 . . . 25 27 = + + + + - + -

What is the sum of this series?

slide-21
SLIDE 21
  • C. Long

Lecture 10 September 25, 2018 21 ICEN/ICSI210 Discrete Structures

( ) ( )

71 69 67 . . . 25 27 + + + + - + -

( ) ( )

27 25 . . . 67 69 71

  • + -

+ + + +

44 44 44 . . . 44 44 44 + + + + + +

( )

( )

50 71 27 2 + - =

1100 =

71 + (-27) Each sum is the same.

50 Terms

Sum of arithmetic series

What is the sum of these terms?

slide-22
SLIDE 22
  • C. Long

Lecture 10 September 25, 2018 22 ICEN/ICSI210 Discrete Structures

Sum of arithmetic series

In general

( ) ( ) ( )

( )

1 1 1 1

2 . . . 1 a a d a d a n d + + + + + + +

  • (

)

( )

( ) ( )

1 1 1 1

1 . . . 2 a n d a d a d a +

  • +

+ + + + +

( )

1

2

n

n a a

s

+ =

1

Sum Number of Terms First Term Last Term

n

S n a a = ì ï = ï í = ï ï = î

( )

( )

( )

( )

( )

( )

1 1 1 1 1 1

1 1 . . . 1 a a n d a a n d a a n d + +

  • +

+ +

  • +

+ + +

  • é

ù é ù é ù ë û ë û ë û

slide-23
SLIDE 23
  • C. Long

Lecture 10 September 25, 2018 23 ICEN/ICSI210 Discrete Structures

( )

151 147 143 139 . . . 5 + + + + + -

( )

1

2

n

n a a S + =

1 40

40 151 5 n a a = = = -

( )

40 151 5 2 2920 S S + - = =

( ) ( )( )

1

1 5 151 1 4 40

n

a a n d n n = +

  • =

+

  • =

What term is -5?

Example

slide-24
SLIDE 24
  • C. Long

Lecture 10 September 25, 2018 24 ICEN/ICSI210 Discrete Structures

Alternate formula for the sum of an Arithmetic Series.

( )

1

2

n

n a S a + =

( )

1

1 Substitute

n

a a n d = +

  • (

)

( )

( )

( )

1 1 1

1 2 2 1 2 n a a n d S n a n d S + +

  • =

+

  • =

1

# of Terms 1st Term Difference n a d = ì ï = í ï = î

Sum of arithmetic series

slide-25
SLIDE 25
  • C. Long

Lecture 10 September 25, 2018 25 ICEN/ICSI210 Discrete Structures

Solve this

( )

36

2.25 0.75

j

j

=

+

å

( )

( )

1

2 1 2 n a n d S +

  • =

2.25 3 3.73 4.5 . . . = + + + +

1

37 2.25 0.75 n a d = = =

( ) ( )( )

( )

37 2 2.25 37 1 0.75 2 582.75 S S +

  • =

=

It is not convenient to find the last term.

slide-26
SLIDE 26
  • C. Long

Lecture 10 September 25, 2018 26 ICEN/ICSI210 Discrete Structures

Evaluating sequences

slide-27
SLIDE 27
  • C. Long

Lecture 10 September 25, 2018 27 ICEN/ICSI210 Discrete Structures

Series

  • When we take the sum of a sequence, we get a

series

  • We have already seen a closed form for geometric

series

  • Some other useful closed forms include the

following:

  • ∑"#$

%

1 = u-k+1, for k£u

  • ∑"#$

%

' = n(n+1)/2

  • ∑"#(

)

'* = n(n+1)(2n+1)/6

  • ∑"#(

)

'$ » nk+1/(k+1)

slide-28
SLIDE 28
  • C. Long

Lecture 10 September 25, 2018 28 ICEN/ICSI210 Discrete Structures

Infinite Series

  • Although we will mostly deal with finite series (i.e., an

upper limit of n for fixed integer), inifinite series are also useful

  • Consider the following geometric series:
  • Sn=0(1/2n) = 1 + 1/2 + 1/4 + 1/8 + … converges to 2
  • Sn=0(2n) = 1 + 2 + 4 + 8 +

… does not converge

  • However note: Sn=0 (2n) = 2n+1 – 1 (a=1, q=2)
slide-29
SLIDE 29
  • C. Long

Lecture 10 September 25, 2018 29 ICEN/ICSI210 Discrete Structures

Evaluating sequences

slide-30
SLIDE 30
  • C. Long

Lecture 10 September 25, 2018 30 ICEN/ICSI210 Discrete Structures

Can you evaluate this?

Here is the trick. Note that Does it help?

slide-31
SLIDE 31
  • C. Long

Lecture 10 September 25, 2018 31 ICEN/ICSI210 Discrete Structures

Double Summation

slide-32
SLIDE 32
  • C. Long

Lecture 10 September 25, 2018 32 ICEN/ICSI210 Discrete Structures

Solve the following

slide-33
SLIDE 33
  • C. Long

Lecture 10 September 25, 2018 33 ICEN/ICSI210 Discrete Structures

Sum of harmonic series

slide-34
SLIDE 34
  • C. Long

Lecture 10 September 25, 2018 34 ICEN/ICSI210 Discrete Structures

Products

slide-35
SLIDE 35
  • C. Long

Lecture 10 September 25, 2018 35 ICEN/ICSI210 Discrete Structures

Dealing with Products

slide-36
SLIDE 36
  • C. Long

Lecture 10 September 25, 2018 36 ICEN/ICSI210 Discrete Structures

Factorial

slide-37
SLIDE 37
  • C. Long

Lecture 10 September 25, 2018 37 ICEN/ICSI210 Discrete Structures

Factorial

slide-38
SLIDE 38
  • C. Long

Lecture 10 September 25, 2018 38 ICEN/ICSI210 Discrete Structures

Stirling’s formula

slide-39
SLIDE 39
  • C. Long

Lecture 10 September 25, 2018 39 ICEN/ICSI210 Discrete Structures

Next class

  • Topic: Cardinality of Sets
  • Pre-class reading: Chap 2.5