Mehran Sahami
Handout #5
CS103B
January 9, 2009
Infinite Sets and Countability
Thanks to Maggie Johnson for some portions of this handout.
Infinite Sets
In a
finite
set, we can always designate one element as the first member, another as the second
member, etc.
If there are k elements in the set, then these can be listed in the order we have
selected:
s
1
,
s
2
,
...,
s
k
Therefore, a finite set is one that can be enumerated by the positive integers from 1 up to some
integer k.
More precisely, set A is finite if there is a positive integer k such that there is a one-to-
one correspondence (bijection) between A and the set of all natural numbers less than k.
As we
defined it when discussing functions, a
one-to-one correspondence
between the elements of a set
P and the elements of a set Q means that it is possible to pair off the elements of P and Q such
that every element of P is paired off with a distinct element of Q.
If a set is infinite, we may still be able to select a first element s
1
, and a second element s
2
, but we
have no limit k.
So the list of chosen elements may look like this:
s
1
,
s
2
,
s
3
, .
..
Such an infinite set is called
denumerable
.
Both finite and denumerable sets are
countable
sets
because we can count, or enumerate the elements in the set.
Being countable, however, does not
always mean that we can give a value for the total number of elements in the set; it just means we
can say "Here is a first one, here is a second one, etc.".
More formally, a denumerable set is one
where we can define a one-to-one correspondence between the elements in the set and the set of
positive
integers, denoted
Z
+
.
Thus, the set
Z
+
is, in a sense, the most basic of all infinite sets.
The reason for this is that the
one-to-one correspondence can be used to "count" the elements of an infinite set.
If f is a one-to-
one and onto function from
Z
+
to some infinite set A, then f(1) can be designated as the first
element of A, f(2), the second, and so forth.
Because f is one-to-one, no element is ever counted
twice; and because f is onto, every element of A is counted eventually.
To prove denumerability, we need only exhibit a counting scheme (i.e., if starting from a
particular element, we can sequentially list all the elements in the list), because such a listing will
yield a one-to-one correspondence between the elements in the set and
Z
+
.
The counting scheme
is the function that maps
Z
+
to some other infinite set.