discrete mathematics -...
TRANSCRIPT
![Page 1: Discrete Mathematics - informationtechnology.pkinformationtechnology.pk/wp-content/uploads/2018/09/Lecture10.pdf · Sequences Summations Countable Sets Uncountable Sets. Sequences](https://reader033.vdocument.in/reader033/viewer/2022052310/5f0c5aea7e708231d434fd91/html5/thumbnails/1.jpg)
Discrete MathematicsCMP-101
Lecture 10
Abdul Hameed
http://informationtechnology.pk/
1
![Page 2: Discrete Mathematics - informationtechnology.pkinformationtechnology.pk/wp-content/uploads/2018/09/Lecture10.pdf · Sequences Summations Countable Sets Uncountable Sets. Sequences](https://reader033.vdocument.in/reader033/viewer/2022052310/5f0c5aea7e708231d434fd91/html5/thumbnails/2.jpg)
Outline
Lecture 10
2
Sequences
Summations
Countable Sets
Uncountable Sets
![Page 3: Discrete Mathematics - informationtechnology.pkinformationtechnology.pk/wp-content/uploads/2018/09/Lecture10.pdf · Sequences Summations Countable Sets Uncountable Sets. Sequences](https://reader033.vdocument.in/reader033/viewer/2022052310/5f0c5aea7e708231d434fd91/html5/thumbnails/3.jpg)
Sequences
Lecture 10
3
A sequence represents an ordered list of elements.
e.g., {an} = 1, 1/2, 1/3, 1/4, …
Formally: A sequence or series {an} is identified
with a generating function f:S→A for some subset
SN (often S=N) and for some set A.
e.g., an= f(n) = 1/n.
The symbol an denotes f(n), also called term n of
the sequence.
![Page 4: Discrete Mathematics - informationtechnology.pkinformationtechnology.pk/wp-content/uploads/2018/09/Lecture10.pdf · Sequences Summations Countable Sets Uncountable Sets. Sequences](https://reader033.vdocument.in/reader033/viewer/2022052310/5f0c5aea7e708231d434fd91/html5/thumbnails/4.jpg)
Example with Repetitions
Consider the sequence bn = (−1)n.
{bn} = 1, −1, 1, −1, …
{bn} denotes an infinite sequence of 1’s
and −1’s, not the 2-element set {1, −1}.
Lecture 10
4
![Page 5: Discrete Mathematics - informationtechnology.pkinformationtechnology.pk/wp-content/uploads/2018/09/Lecture10.pdf · Sequences Summations Countable Sets Uncountable Sets. Sequences](https://reader033.vdocument.in/reader033/viewer/2022052310/5f0c5aea7e708231d434fd91/html5/thumbnails/5.jpg)
Geometric Progression
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
A geometric progression is a discrete analogue of
the exponential function f(x) = arx .Lecture 10
5
![Page 6: Discrete Mathematics - informationtechnology.pkinformationtechnology.pk/wp-content/uploads/2018/09/Lecture10.pdf · Sequences Summations Countable Sets Uncountable Sets. Sequences](https://reader033.vdocument.in/reader033/viewer/2022052310/5f0c5aea7e708231d434fd91/html5/thumbnails/6.jpg)
Example
The sequences {bn} with bn = (-1)n , is a
geometric progressions with initial term
and common ratio equal to 1 and - 1 if we
start at n = 0
The list of terms b0, bl , b2 , b3 , b4 , • • •
begins with 1 , - 1 , 1 , - 1 , 1 , . . .
Lecture 10
6
![Page 7: Discrete Mathematics - informationtechnology.pkinformationtechnology.pk/wp-content/uploads/2018/09/Lecture10.pdf · Sequences Summations Countable Sets Uncountable Sets. Sequences](https://reader033.vdocument.in/reader033/viewer/2022052310/5f0c5aea7e708231d434fd91/html5/thumbnails/7.jpg)
Example
The sequences {cn} with cn=2·5n , is a
geometric progressions with initial term
and common ratio equal to 2 and 5, if we
start at n = 0
the list of terms c0 , c1 , c2 , c3 , c4 , • • •
begins with 2, 10 , 50, 250, 1250, . . . ;
Lecture 10
7
![Page 8: Discrete Mathematics - informationtechnology.pkinformationtechnology.pk/wp-content/uploads/2018/09/Lecture10.pdf · Sequences Summations Countable Sets Uncountable Sets. Sequences](https://reader033.vdocument.in/reader033/viewer/2022052310/5f0c5aea7e708231d434fd91/html5/thumbnails/8.jpg)
Example
Lecture 10
8
The sequences {dn} with dn = 6·(l/3)n is a
geometric progressions with initial term and
common ratio equal to 6 and 1/3, respectively,
if we start at n = 0.
The list of terms d0 , dl , d2 , d3 , d4 ,…. begins
with
6, 2 , 2/3 , 2/9 , 2/27 , ……..
![Page 9: Discrete Mathematics - informationtechnology.pkinformationtechnology.pk/wp-content/uploads/2018/09/Lecture10.pdf · Sequences Summations Countable Sets Uncountable Sets. Sequences](https://reader033.vdocument.in/reader033/viewer/2022052310/5f0c5aea7e708231d434fd91/html5/thumbnails/9.jpg)
Arithmetic Progression
A 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
An arithmetic progression is a discrete
analogue of the linear function f(x) = dx + aLecture 10
9
![Page 10: Discrete Mathematics - informationtechnology.pkinformationtechnology.pk/wp-content/uploads/2018/09/Lecture10.pdf · Sequences Summations Countable Sets Uncountable Sets. Sequences](https://reader033.vdocument.in/reader033/viewer/2022052310/5f0c5aea7e708231d434fd91/html5/thumbnails/10.jpg)
Example
The sequences {Sn} with Sn = - 1 + 4n is
an arithmetic progressions with initial
terms and common differences equal to -1
and 4 if we start at n = 0.
The list of terms S0 , Sl , S2 , S3 , . . .
begins with - 1 , 3 , 7, 1 1 , . . . ,
Lecture 10
10
![Page 11: Discrete Mathematics - informationtechnology.pkinformationtechnology.pk/wp-content/uploads/2018/09/Lecture10.pdf · Sequences Summations Countable Sets Uncountable Sets. Sequences](https://reader033.vdocument.in/reader033/viewer/2022052310/5f0c5aea7e708231d434fd91/html5/thumbnails/11.jpg)
Example
The sequences {tn} with tn = 7 - 3n is both
arithmetic progressions with initial terms and
common differences equal to 7 and -3 if we start
at n = 0.
The list of terms t0 ,tl , t2 , t3 , . . . begins with 7,
4, 1 , -2, . . . .
Lecture 10
11
![Page 12: Discrete Mathematics - informationtechnology.pkinformationtechnology.pk/wp-content/uploads/2018/09/Lecture10.pdf · Sequences Summations Countable Sets Uncountable Sets. Sequences](https://reader033.vdocument.in/reader033/viewer/2022052310/5f0c5aea7e708231d434fd91/html5/thumbnails/12.jpg)
Strings
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 ala2...an. The length
of the string S 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.
Example: The string abcd is a string of length four
Lecture 10
12
![Page 13: Discrete Mathematics - informationtechnology.pkinformationtechnology.pk/wp-content/uploads/2018/09/Lecture10.pdf · Sequences Summations Countable Sets Uncountable Sets. Sequences](https://reader033.vdocument.in/reader033/viewer/2022052310/5f0c5aea7e708231d434fd91/html5/thumbnails/13.jpg)
Recognizing Sequences
Sometimes, you’re given the first few
terms of a sequence, and you are asked to
find the sequence’s generating function, or
a procedure to enumerate the sequence.
Lecture 10
13
![Page 14: Discrete Mathematics - informationtechnology.pkinformationtechnology.pk/wp-content/uploads/2018/09/Lecture10.pdf · Sequences Summations Countable Sets Uncountable Sets. Sequences](https://reader033.vdocument.in/reader033/viewer/2022052310/5f0c5aea7e708231d434fd91/html5/thumbnails/14.jpg)
Recognizing Sequences
Examples: What’s the next number?
1,2,3,4,…
1,3,5,7,9,…
2,3,5,7,11,...
Lecture 10
14
5 (the 5th smallest number >0)
11 (the 6th smallest odd number >0)
13 (the 6th smallest prime number)
![Page 15: Discrete Mathematics - informationtechnology.pkinformationtechnology.pk/wp-content/uploads/2018/09/Lecture10.pdf · Sequences Summations Countable Sets Uncountable Sets. Sequences](https://reader033.vdocument.in/reader033/viewer/2022052310/5f0c5aea7e708231d434fd91/html5/thumbnails/15.jpg)
The Trouble with Recognition
The problem of finding “the” generating
function given just an initial subsequence
is not well defined.
This is because there are infinitely many
computable functions that will generate
any given initial subsequence.Lecture 10
15
![Page 16: Discrete Mathematics - informationtechnology.pkinformationtechnology.pk/wp-content/uploads/2018/09/Lecture10.pdf · Sequences Summations Countable Sets Uncountable Sets. Sequences](https://reader033.vdocument.in/reader033/viewer/2022052310/5f0c5aea7e708231d434fd91/html5/thumbnails/16.jpg)
The Trouble with Recognition (cont’d)
We implicitly are supposed to find the simplest such
function but, how should we define the simplicity of a
function?
We might define simplicity as the reciprocal of
complexity, but…
There are many reasonable, competing definitions of
complexity, and this is an active research area.
So, these questions really have no objective right answer!
Lecture 10
16
![Page 17: Discrete Mathematics - informationtechnology.pkinformationtechnology.pk/wp-content/uploads/2018/09/Lecture10.pdf · Sequences Summations Countable Sets Uncountable Sets. Sequences](https://reader033.vdocument.in/reader033/viewer/2022052310/5f0c5aea7e708231d434fd91/html5/thumbnails/17.jpg)
Exercise
Lecture 10
17
Ex. 1, 3, 5, 7, 9, …
Ex. 1, 2, 2, 3, 3, 3, 4, 4, 4, 4, …
Ex. 7, 25, 79, 241, 727, 2185, 6559,
19681, 59047, …
![Page 18: Discrete Mathematics - informationtechnology.pkinformationtechnology.pk/wp-content/uploads/2018/09/Lecture10.pdf · Sequences Summations Countable Sets Uncountable Sets. Sequences](https://reader033.vdocument.in/reader033/viewer/2022052310/5f0c5aea7e708231d434fd91/html5/thumbnails/18.jpg)
Important:
Another useful technique for finding a rule for
generating the terms of a sequence is to compare
the terms of a sequence of interest with the terms
of a well-known integer sequence, such as terms
of arithmetic progression, terms of a geometric
progression, perfect squares, perfect cubes, and
so on. The first 10 terms of some sequences you
may want to keep in mind are displayed in Table
Lecture 10
18
![Page 19: Discrete Mathematics - informationtechnology.pkinformationtechnology.pk/wp-content/uploads/2018/09/Lecture10.pdf · Sequences Summations Countable Sets Uncountable Sets. Sequences](https://reader033.vdocument.in/reader033/viewer/2022052310/5f0c5aea7e708231d434fd91/html5/thumbnails/19.jpg)
Lecture 10
19
![Page 20: Discrete Mathematics - informationtechnology.pkinformationtechnology.pk/wp-content/uploads/2018/09/Lecture10.pdf · Sequences Summations Countable Sets Uncountable Sets. Sequences](https://reader033.vdocument.in/reader033/viewer/2022052310/5f0c5aea7e708231d434fd91/html5/thumbnails/20.jpg)
Lecture 10
20
Summations
![Page 21: Discrete Mathematics - informationtechnology.pkinformationtechnology.pk/wp-content/uploads/2018/09/Lecture10.pdf · Sequences Summations Countable Sets Uncountable Sets. Sequences](https://reader033.vdocument.in/reader033/viewer/2022052310/5f0c5aea7e708231d434fd91/html5/thumbnails/21.jpg)
Lecture 10
21
Given a series {an}, the summation of {an} from j
to k is written and defined as follows:
Here, i is called the index of summation.
j: lower limit
k: upper limit
kjj
k
ji
i aaaa +++ +
=
...: 1
![Page 22: Discrete Mathematics - informationtechnology.pkinformationtechnology.pk/wp-content/uploads/2018/09/Lecture10.pdf · Sequences Summations Countable Sets Uncountable Sets. Sequences](https://reader033.vdocument.in/reader033/viewer/2022052310/5f0c5aea7e708231d434fd91/html5/thumbnails/22.jpg)
Express the sum of the first 100 terms of
the sequence {an }, where an = 1 / n for n
= 1 , 2, 3 , . . . .
Lecture 10
22
=
100
1
1
j j
![Page 23: Discrete Mathematics - informationtechnology.pkinformationtechnology.pk/wp-content/uploads/2018/09/Lecture10.pdf · Sequences Summations Countable Sets Uncountable Sets. Sequences](https://reader033.vdocument.in/reader033/viewer/2022052310/5f0c5aea7e708231d434fd91/html5/thumbnails/23.jpg)
Example
What is the value of
Lecture 10
23
=
5
1
2
j
j
![Page 24: Discrete Mathematics - informationtechnology.pkinformationtechnology.pk/wp-content/uploads/2018/09/Lecture10.pdf · Sequences Summations Countable Sets Uncountable Sets. Sequences](https://reader033.vdocument.in/reader033/viewer/2022052310/5f0c5aea7e708231d434fd91/html5/thumbnails/24.jpg)
Example
What is the value of
Lecture 10
24
=
−8
4
)1(k
k
![Page 25: Discrete Mathematics - informationtechnology.pkinformationtechnology.pk/wp-content/uploads/2018/09/Lecture10.pdf · Sequences Summations Countable Sets Uncountable Sets. Sequences](https://reader033.vdocument.in/reader033/viewer/2022052310/5f0c5aea7e708231d434fd91/html5/thumbnails/25.jpg)
Shifting Index of Summation:
Sometimes it is useful to shift the index of
summation in a sum. This is often done when
two sums need to be added but their indices of
summation do not match. When shifting an index
of summation, it is important to make the
appropriate changes in the corresponding
summand.
Lecture 10
25
![Page 26: Discrete Mathematics - informationtechnology.pkinformationtechnology.pk/wp-content/uploads/2018/09/Lecture10.pdf · Sequences Summations Countable Sets Uncountable Sets. Sequences](https://reader033.vdocument.in/reader033/viewer/2022052310/5f0c5aea7e708231d434fd91/html5/thumbnails/26.jpg)
Example
Lecture 10
26
=
5
1
2
j
j
Suppose we have the sum
But want the index of summation to run between 0 and 4 rather than from 1 to 5 . To do this, we let k= j - 1 . Then the new summationindex runs from 0 to 4,and the term j2 becomes (k + 1)2 . Hence
==
+=4
0
25
1
2 )1(kj
kj
![Page 27: Discrete Mathematics - informationtechnology.pkinformationtechnology.pk/wp-content/uploads/2018/09/Lecture10.pdf · Sequences Summations Countable Sets Uncountable Sets. Sequences](https://reader033.vdocument.in/reader033/viewer/2022052310/5f0c5aea7e708231d434fd91/html5/thumbnails/27.jpg)
Theorem 1 (Geometric Series)
If a and r are real numbers and r≠0, then
Lecture 10
27
=+
−
−=
+
=
1 r if 1
1r if 1
1
0 )a(nr
aarar
nn
j
j
![Page 28: Discrete Mathematics - informationtechnology.pkinformationtechnology.pk/wp-content/uploads/2018/09/Lecture10.pdf · Sequences Summations Countable Sets Uncountable Sets. Sequences](https://reader033.vdocument.in/reader033/viewer/2022052310/5f0c5aea7e708231d434fd91/html5/thumbnails/28.jpg)
Double Summation:
Double summations arise in many contexts (as in the analysis of
nested loops in computer programs). An example of a double
summation is
To evaluate the double sum, first expand the inner summation and
then continue by computing the outer summation:
Lecture 10
28
![Page 29: Discrete Mathematics - informationtechnology.pkinformationtechnology.pk/wp-content/uploads/2018/09/Lecture10.pdf · Sequences Summations Countable Sets Uncountable Sets. Sequences](https://reader033.vdocument.in/reader033/viewer/2022052310/5f0c5aea7e708231d434fd91/html5/thumbnails/29.jpg)
Double Summation:
Lecture 10
29
![Page 30: Discrete Mathematics - informationtechnology.pkinformationtechnology.pk/wp-content/uploads/2018/09/Lecture10.pdf · Sequences Summations Countable Sets Uncountable Sets. Sequences](https://reader033.vdocument.in/reader033/viewer/2022052310/5f0c5aea7e708231d434fd91/html5/thumbnails/30.jpg)
Summation over Sets
We can also use summation notation to add
all values of a function, or terms of an
indexed set, where the index of summation
runs over all values in a set. That is, we
write
to represent the sum of the values f(s), for all
members s of S. Lecture 10
30
![Page 31: Discrete Mathematics - informationtechnology.pkinformationtechnology.pk/wp-content/uploads/2018/09/Lecture10.pdf · Sequences Summations Countable Sets Uncountable Sets. Sequences](https://reader033.vdocument.in/reader033/viewer/2022052310/5f0c5aea7e708231d434fd91/html5/thumbnails/31.jpg)
Example
Lecture 10
31
![Page 32: Discrete Mathematics - informationtechnology.pkinformationtechnology.pk/wp-content/uploads/2018/09/Lecture10.pdf · Sequences Summations Countable Sets Uncountable Sets. Sequences](https://reader033.vdocument.in/reader033/viewer/2022052310/5f0c5aea7e708231d434fd91/html5/thumbnails/32.jpg)
Summation Formulae
Certain sums arise repeatedly
throughout discrete mathematics.
Having a collection of formulae for
such sums can be useful; Table 2
provides a small table of formulae
for commonly occurring sums.
Lecture 10
32
![Page 33: Discrete Mathematics - informationtechnology.pkinformationtechnology.pk/wp-content/uploads/2018/09/Lecture10.pdf · Sequences Summations Countable Sets Uncountable Sets. Sequences](https://reader033.vdocument.in/reader033/viewer/2022052310/5f0c5aea7e708231d434fd91/html5/thumbnails/33.jpg)
Lecture 10
33
![Page 34: Discrete Mathematics - informationtechnology.pkinformationtechnology.pk/wp-content/uploads/2018/09/Lecture10.pdf · Sequences Summations Countable Sets Uncountable Sets. Sequences](https://reader033.vdocument.in/reader033/viewer/2022052310/5f0c5aea7e708231d434fd91/html5/thumbnails/34.jpg)
Cardinality
We defined the cardinality of a finite set to be the number
of elements in the set.
The cardinality of a finite set tells us when two finite sets
are the same size, or when one is bigger than the other.
There is a one-to-one correspondence between any two
finite sets with the same number of elements.
This observation lets us extend the concept of cardinality to
all sets, both finite and infinite,
Lecture 10
34
![Page 35: Discrete Mathematics - informationtechnology.pkinformationtechnology.pk/wp-content/uploads/2018/09/Lecture10.pdf · Sequences Summations Countable Sets Uncountable Sets. Sequences](https://reader033.vdocument.in/reader033/viewer/2022052310/5f0c5aea7e708231d434fd91/html5/thumbnails/35.jpg)
Same Cardinality:
The sets A and B have the same cardinality if and
only if there is a one-to-one correspondence from
A to B .
We will now split infinite sets into two groups,
those with the same cardinality as the set of
natural numbers and those with different
cardinality.
Lecture 10
35
![Page 36: Discrete Mathematics - informationtechnology.pkinformationtechnology.pk/wp-content/uploads/2018/09/Lecture10.pdf · Sequences Summations Countable Sets Uncountable Sets. Sequences](https://reader033.vdocument.in/reader033/viewer/2022052310/5f0c5aea7e708231d434fd91/html5/thumbnails/36.jpg)
Countable Sets
A set that is either finite or has the same
cardinality as the set of positive integers
is called countable.
When an infinite set S is countable,
|S|=0א (“aleph null”)
Lecture 10
36
![Page 37: Discrete Mathematics - informationtechnology.pkinformationtechnology.pk/wp-content/uploads/2018/09/Lecture10.pdf · Sequences Summations Countable Sets Uncountable Sets. Sequences](https://reader033.vdocument.in/reader033/viewer/2022052310/5f0c5aea7e708231d434fd91/html5/thumbnails/37.jpg)
Uncountable Sets
A set that is not countable is called
uncountable
Lecture 10
37