Docsity

Sequences and Summations: Understanding the Basics of Discrete Structures, Study notes of Computer Science

Partial preview of the text

Download Sequences and Summations: Understanding the Basics of Discrete Structures and more Study notes Computer Science in PDF only on Docsity!

Sequences & Summations

CS 1050

Rosen 1.

Sequence

A sequence is a discrete structure used to representan ordered list.

A sequence is a function from a subset of the setof integers (usually either the set {0,1,2,.. .} or{1,2, 3,.. .}to a set S.

We use the notation a

n

to denote the image of the

integer n. We call a

n

a term of the sequence.

Notation to represent sequence is {a

n

}

Common Sequences

a, a+d, a+2d, a+3d, a+4d, …1, 4, 9, 16, 25,.. .1, 8, 27, 64, 125,.. .1, 16, 81, 256, 625,.. .2, 4, 8, 16, 32,.. .3, 9, 27, 81, 243,.. .1, 2, 6, 24, 120,...

3 n!

n

2

n

n

4

n

3

n

2

Arithmetic

Summations

Notation for describing the sum of the termsa

m

, a

m+

,.. ., a

n

from the sequence, {a

n

}

n

a

m

+a

m+

+... + a

n

=

∑

a

j

j=m

j is the index of summation (dummy variable)

The index of summation runs through all integersfrom its lower limit, m, to its upper limit, n.

Summations follow all the rules

of multiplication and addition!

c

j

cj

j

n

j

n

=

=

=

=

1

1

c(1+2+…+n) = c + 2c +…+ nc

r

ar

ar

ar

ar

ar

ar

a

ar

j

j

n

j

j

n

k

n k

n

k

k

n

n

k

k

n

=

=

  • =

=

=

0

1

0

1 1

1

1

1

0

Telescoping Sums

a

a

a

a

a

a

a

a

a

a

a

a

j

j

n

j

n

n

n

=

−

−

∑

1

1

1

0

2

1

3

2

1

0

[
) ]

k

k

k

2

1 4

2

2

2

2

2

2

2

2

2

2

=

∑

Example

Proof

(cont.)

[

]

k

k

k

k

n

k

n

2

1

2

1

1

2

1

=

=

−

−

(

)

=

−

(

)

[

]

k

k

k

k

n

k

n

k

n

2

1

2

1

1

1

2

1

=

=

=

−

−

(

)

=

− (

)

n

k

n

k

n

2

2

1

0

2

−

=

  • −

=

( )

n

n

k

k

n

2

1

2

=

= ∑

( )

k

n

n

k

n^ = ∑

=

1

2

2

Closed Form Solutions to Sums

j

n

n n

j

n

=

=

= ∑

0

1

1

2

0

...

(

) /

j

n

n n

n

j

n

2

0

2

2

2

0

1

1

2

1

6

= ∑

=

=

...

(

)(

) /

k

n

n

k

n

3

1

2

2

1

4

= ∑

=

ar

ar

a

r

r

k

k

n

n

=

∑

=

−

−

≠

0

1

1

1

,

Cardinality

Earlier we defined cardinality of a set as thenumber of elements in the set. We can extend thisidea to infinite sets.

The sets A and B have the same cardinality if andonly if there is a one-to-one correspondence fromA to B.

A set that is either finite or has the samecardinality as the set of natural numbers is called countable.

A set that is not countable is called

uncountable.