0% found this document useful (0 votes)
48 views23 pages

CS210 Slides 09 03 Cardinality Countability

The document discusses cardinality of finite and infinite sets. It begins by defining that two finite sets have the same cardinality if there exists a bijection between them. It then discusses countable and uncountable infinite sets. A set is countable if it can be mapped to the natural numbers in a one-to-one correspondence. Several examples of countable sets are given, such as integers and rational numbers. The document introduces Cantor's diagonalization method to prove that the set of real numbers between 0 and 1 is uncountable, despite being infinite. It constructs a table listing the real numbers, and then modifies the numbers on the diagonal to create a new number not in the list, contradicting the assumption that

Uploaded by

Syed Ahmed
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)
48 views23 pages

CS210 Slides 09 03 Cardinality Countability

The document discusses cardinality of finite and infinite sets. It begins by defining that two finite sets have the same cardinality if there exists a bijection between them. It then discusses countable and uncountable infinite sets. A set is countable if it can be mapped to the natural numbers in a one-to-one correspondence. Several examples of countable sets are given, such as integers and rational numbers. The document introduces Cantor's diagonalization method to prove that the set of real numbers between 0 and 1 is uncountable, despite being infinite. It constructs a table listing the real numbers, and then modifies the numbers on the diagonal to create a new number not in the list, contradicting the assumption that

Uploaded by

Syed Ahmed
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/ 23

Discrete Mathematics

Cardinality

List Representation of Functions and Cardinality of Finite Sets


Properties of Functions as Lists

Cardinality of Infinite Sets


Countable and Uncountable Infinite Sets
Diagonalization

Imdad ullah Khan and Malik Jahan Khan

Imdad ullah Khan (LUMS) Cardinality 1 / 23


Cardinality of finite sets
Georg Cantor (1874) defined the equivalence of cardinalities of infinite sets

For finite sets X and Y , |X | = |Y | iff there is a bijection f : X → Y

For finite sets X and Y , |X | = |Y | iff there is a bijection f : X 7→ Y

|X | = |Y |, if X and Y can be placed in a one-to-one correspondence

Imdad ullah Khan (LUMS) Cardinality 2 / 23


Countability

A set S is countable if it is either finite or has the same cardinality as N

S is countable if it can be placed in a one-to-one correspondence with N

S is countable in the following sense


If we count (write, print, list) one element of S per ‘second’, then any
particular element of S will be counted after a finite time

This means we can list element of S like

a1 , a2 , a3 , a4 , a5 , · · ·

Note: We do not say that the whole set will be printed

Imdad ullah Khan (LUMS) Cardinality 3 / 23


Countability

A set S is countable if it is either finite or has the same cardinality as N

Are the following sets countable (countably infinite)?

ICP 9-15 Z

ICP 9-16 O and E, odd and even integers

ICP 9-17 Integer powers of 2

ICP 9-18 Integer powers of other integers

ICP 9-19 Squares, cubes and any power of integers

Imdad ullah Khan (LUMS) Cardinality 4 / 23


Countability

A set S is countable if it is either finite or has the same cardinality as N

We showed that powers of 2, powers of integers, Z etc. are countable

How about Q+ , the set of +ve rational numbers

Rational numbers are very dense

Theorem
Between any two rational numbers there is another rational number

Imdad ullah Khan (LUMS) Cardinality 5 / 23


Countability
Arrange the positive rational numbers (p/q) in a table, such that row q
contains all rationals with denominator q

1 2 3 4 5 6
1 1 1 1 1 1
···

1 2 3 4 5 6
2 2 2 2 2 2
···

1 2 3 4 5 6
3 3 3 3 3 3
···

1 2 3 4 5 6
4 4 4 4 4 4
···

1 2 3 4 5 6
5 5 5 5 5 5
···
.. .. .. .. .. ..
. . . . . .

Imdad ullah Khan (LUMS) Cardinality 6 / 23


Countability
Counting them row-wise or column wise does not yield countability
For instance the number 4/3 is never counted (printed)

1 2 3 4 5 6
1 1 1 1 1 1
···

1 2 3 4 5 6
2 2 2 2 2 2
···

1 2 3 4 5 6
3 3 3 3 3 3
···

1 2 3 4 5 6
4 4 4 4 4 4
···

1 2 3 4 5 6
5 5 5 5 5 5
···
.. .. .. .. .. ..
. . . . . .

Imdad ullah Khan (LUMS) Cardinality 7 / 23


Countability
Counting them row-wise or column wise does not yield countability
For instance the number 4/3 is never counted (printed)

1 2 3 4 5 6
1 1 1 1 1 1
···

1 2 3 4 5 6
2 2 2 2 2 2
···

1 2 3 4 5 6
3 3 3 3 3 3
···

1 2 3 4 5 6
4 4 4 4 4 4
···

1 2 3 4 5 6
5 5 5 5 5 5
···
.. .. .. .. .. ..
. . . . . .

Imdad ullah Khan (LUMS) Cardinality 8 / 23


Countability
Counting them in the dove-tailing fashion shows countability
Any number p/q is counted after ’finite’ ? steps

1 2 3 4 5 6
1 1 1 1 1 1
···

1 2 3 4 5 6
2 2 2 2 2 2
···

1 2 3 4 5 6
3 3 3 3 3 3
···

1 2 3 4 5 6
4 4 4 4 4 4
···

1 2 3 4 5 6
5 5 5 5 5 5
···
.. .. .. .. .. ..
. . . . . .
Imdad ullah Khan (LUMS) Cardinality 9 / 23
Countability

Are all infinite sets of the same size (countable)?

No

Cantor invented a very important technique,

DIAGNOLIZATION

to show how to find bigger infinity

Imdad ullah Khan (LUMS) Cardinality 10 / 23


Uncountable set

The set I of real numbers between 0 and 1 is not countable

We prove it by contradiction and draw contradiction using ’diagnolization’

Assume that I = [0, 1] is countable

Then by definition there exists a bijection f : N 7→ I


and we can list the elements of I

List element of I in a table form as follows:

Imdad ullah Khan (LUMS) Cardinality 11 / 23


Diagnolization
The set I of real numbers between 0 and 1 is not countable

Assume that I = [0, 1] is countable

Then there exists a bijection f : N 7→ I ▷ and we can list/count I

List elements of I in a table form as follows:

f (1) = r1 = 0. d11 d12 d13 d14 d15 . . .


f (2) = r2 = 0. d21 d22 d23 d24 d25 . . .
f (3) = r3 = 0. d31 d32 d33 d34 d35 . . .
f (4) = r4 = 0. d41 d42 d43 d44 d45 . . .
f (5) = r5 = 0. d51 d52 d53 d54 d55 . . .
..
.

Imdad ullah Khan (LUMS) Cardinality 12 / 23


Diagnolization
L 1 2 3 4 5 ···
r1 d11 d12 d13 d14 d15 ...
r2 d21 d22 d23 d24 d25 ...
r3 d31 d32 d33 d34 d35 ...
r4 d41 d42 d43 d44 d45 ...
r5 d51 d52 d53 d54 d55 ...

Imdad ullah Khan (LUMS) Cardinality 13 / 23


Diagnolization
L 1 2 3 4 5 ···
r1 d11 d12 d13 d14 d15 ...
r2 d21 d22 d23 d24 d25 ...
r3 d31 d32 d33 d34 d35 ...
r4 d41 d42 d43 d44 d45 ...
r5 d51 d52 d53 d54 d55 ...

Imdad ullah Khan (LUMS) Cardinality 14 / 23


Diagnolization
L 1 2 3 4 5 ···
r1 d11 ...
r2 d22 ...
r3 d33 ...
r4 d44 ...
r5 d55 ...

Construct a new number SL ∈ I = [0, 1], SL = 0. C1 , C2 , C3 , C4 , C5 , . . .


(
8 if dii = 7
Ci =
7 if dii ̸= 7

Imdad ullah Khan (LUMS) Cardinality 15 / 23


Diagnolization
L 1 2 3 4 5 ···
r1 d11 ̸ C1
= C2 C3 C4 C5 ...
r2 d22 ...
r3 d33 ...
r4 d44 ...
r5 d55 ...

Construct a new number SL ∈ I = [0, 1], SL = 0. C1 , C2 , C3 , C4 , C5 , . . .


(
8 if dii = 7
Ci =
7 if dii ̸= 7

SL ̸= r1 , ∵ by design C1 ̸= d11 ▷ different than r1 in at least 1st digit

Imdad ullah Khan (LUMS) Cardinality 16 / 23


Diagnolization
L 1 2 3 4 5 ···
r1 d11 ...
r2 C1 d22 ̸= C2 C3 C4 C5 ...
r3 d33 ...
r4 d44 ...
r5 d55 ...

Construct a new number SL ∈ I = [0, 1], SL = 0. C1 , C2 , C3 , C4 , C5 , . . .


(
8 if dii = 7
Ci =
7 if dii ̸= 7

SL ̸= r2 , ∵ by design C2 ̸= d22 ▷ different than r2 in at least 2nd digit

Imdad ullah Khan (LUMS) Cardinality 17 / 23


Diagnolization
L 1 2 3 4 5 ···
r1 d11 ...
r2 d22 ...
r3 C1 C2 d33 ̸= C3 C4 C5 ...
r4 d44 ...
r5 d55 ...

Construct a new number SL ∈ I = [0, 1], SL = 0. C1 , C2 , C3 , C4 , C5 , . . .


(
8 if dii = 7
Ci =
7 if dii ̸= 7

SL ̸= r3 , ∵ by design C3 ̸= d33 ▷ different than r3 in at least 3rd digit

Imdad ullah Khan (LUMS) Cardinality 18 / 23


Diagnolization
L 1 2 3 4 5 ···
r1 d11 ...
r2 d22 ...
r3 d33 ...
r4 C1 C2 C3 d44 ̸= C4 C5 ...
r5 d55 ...

Construct a new number SL ∈ I = [0, 1], SL = 0. C1 , C2 , C3 , C4 , C5 , . . .


(
8 if dii = 7
Ci =
7 if dii ̸= 7

SL ̸= r4 , ∵ by design C4 ̸= d44 ▷ different than r4 in at least 4th digit

Imdad ullah Khan (LUMS) Cardinality 19 / 23


Diagnolization
L 1 2 3 4 5 ···
r1 d11 ...
r2 d22 ...
r3 d33 ...
r4 d44 ...
r5 C1 C2 C3 C4 d55 ̸= C5 ...

Construct a new number SL ∈ I = [0, 1], SL = 0. C1 , C2 , C3 , C4 , C5 , . . .


(
8 if dii = 7
Ci =
7 if dii ̸= 7

SL ̸= r5 , ∵ by design C5 ̸= d55 ▷ different than r5 in at least 5th digit

Imdad ullah Khan (LUMS) Cardinality 20 / 23


Diagnolization
L 1 2 3 4 5 ···
r1 d11 ...
r2 d22 ...
r3 d33 ...
r4 d44 ...
r5 C1 C2 C3 C4 d55 ̸= C5 ...

Construct a new number SL ∈ I = [0, 1], SL = 0. C1 , C2 , C3 , C4 , C5 , . . .


(
8 if dii = 7
Ci =
7 if dii ̸= 7

SL ̸= ri , ∵ by design Ci ̸= dii ▷ different than ri in at least ith digit

The list L is incomplete and the assumed function is not a bijection


Imdad ullah Khan (LUMS) Cardinality 21 / 23
Diagnolization
The set I of real numbers between 0 and 1 is not countable

r1 = 0 · 4 6 5 3 3 6 5 9 7 3 2 3 0 8 4 7 · · ·
Assume that I = [0, 1] is countable
r2 = 0 · 2 2 8 3 6 9 1 7 5 8 1 6 0 0 8 5 · · ·
r3 = 0 · 2 4 7 0 7 0 9 4 5 1 8 4 1 8 5 5 · · ·
Then there exists a bijection r4 = 0 · 7 9 7 4 7 6 0 1 4 9 5 8 9 1 4 2 · · ·
f : N 7→ I r5 = 0 · 7 0 4 2 1 0 7 9 5 1 4 3 5 4 4 7 · · ·
r6 = 0 · 3 0 0 4 7 7 5 2 4 1 5 2 5 6 1 9 · · ·
and we can list/count I r7 = 0 · 5 3 3 7 3 9 0 0 6 2 3 2 6 1 0 7 · · ·
r8 = 0 · 1 8 3 1 8 2 2 0 5 9 4 1 1 4 6 1 · · ·
r9 = 0 · 0 6 9 0 8 8 2 7 4 3 9 7 0 6 2 7 · · ·
r10 = 0 · 7 5 4 0 9 5 2 0 8 7 6 9 8 2 6 6 · · ·
r11 = 0 · 6 9 8 6 6 9 6 1 4 8 7 4 5 5 9 8 · · ·
r12 = 0 · 6 4 8 6 2 3 1 1 0 1 4 8 0 4 9 9 · · ·
r13 = 0 · 1 9 2 7 2 6 5 7 0 1 3 3 0 2 3 1 · · ·
r14 = 0 · 6 3 0 2 2 5 5 1 1 7 7 2 6 7 5 7 · · ·
r15 = 0 · 1 9 7 0 3 7 8 5 5 5 7 2 5 7 6 6 · · ·
r16 = 0 · 3 8 7 1 4 2 8 8 4 5 4 3 8 7 9 5 · · ·
SL = 0 · 7 7 8 7 7 8 7 7 7 8 8 7 7 8 7 7 · · ·
Imdad ullah Khan (LUMS) Cardinality 22 / 23
Uncountable Set

The set I of real numbers between 0 and 1 is not countable

Thus all infinite sets are not of the same cardinality

There are more than one type of infinities

Imdad ullah Khan (LUMS) Cardinality 23 / 23

You might also like