A finite set is one that has n members, for some natural number n;
this definition seems to do just fine. But what about infinite sets?
How can they be defined? This is not an easy question. One possible
answer, given to us by the late, great mathematician Dedekind, is to say that an
infinite set is one that can be ``paired off" with a proper subset of itself.
For example, consider N. A proper subset of this set is the set E
of even natural numbers {0, 2, 4, 6,...}. The natural numbers,
N, can be paired off with E:
We now prove a theorem related to countability that will prove useful later
on. This theorem pertains to alphabets, which are simply sets of
symbols. For example, {0, 1} is an alphabet, as is {a, b, c,
,
z}, which is an alphabet speakers and readers of English will be rather
familiar with. The length of the alphabet {0, 1} is 2; the length
of the second example just given is of course 26.
Proof. The elements of
can be listed in
lexicographic order, in which first the strings of length 1 are
listed, then the strings of length 2, and so on. Within the sub-listing of
strings of length m, we proceed in ``dictionary" fashion, taking advantage
of the fact that in
ai precedes aj iff i < j. Here is how
the list looks (where e is the empty string):
What if the alphabet in question is not finite, but countably infinite? Is the set of all strings over such an alphabet itself countably infinite? We now show in graphical fashion that the answer is ``Yes." That is, we show:
Proof. To start, note that it can be established that the
set of strings of length 1 over
is countably infinite, that the set of strings of length 2 over
is countably infinte, and, generalizing, that the set of strings of
length n over
is countably infinite.
(These lemmas are left to the reader as
exercises.) Suppose that these results are represented in the form of the
appropriate lists, that is, a list of strings of length 1, a list of strings
of length 2, of length 3,
of length n. Arrange these lists as
rows in an array:
We can weave through this array in a ``triangular" pattern that
produces a list which ``hits" every element of
.
Here is the
start of this list:
At this point you may wonder: Are all infinite sets countably infinite? Cantor proved that the answer is ``No." Here is his famous proof.
Proof.
Notice that all countably infinite sets can be listed in a sequence that starts
with the first element of the set, then passes to the second, and then the
third, and so on; we can thus say that such a set is enumerable.
Now, suppose, for contradiction, that the set in question is enumerable.
Then there is an infinite list enumerating all of
P*: