Outline1 Countability
Outline1 Countability
PROBABILITY THEORY
Outline #1 (Countability and Uncountability)
Such a function f has an inverse g such that g(f (x)) = x for all x. The
sets A and B are called equivalent: A ∼ B and B ∼ A
A set that is equivalent to {1, 2, ...n} is a finite set with n elements.
For finite sets, no set can be equivalent to a proper subset of itself, but that
is not the case for infinite sets.
Example: the set B of even positive integers is equivalent to the set A of
all positive integers. The bijection f : A −→ B that proves equivalence is
f (n) = 2n.
1
The legendary “Hilbert’s Hotel” has an infinite number of rooms, all filled.
The manager learns that because of an evacuation caused by a hurricane,
a large number of additional guests are about to arrive. She quickly moves
the guest in room 1 to room 2, the guest formerly in room 2 to room 4,
etc., thereby freeing up all the odd-numbered rooms for the new arrivals!
• The integers are countable: A bijection from the integers to the posi-
tive integers,
f : Z −→ P,
is f (n) = 2n for positive n, f (n) = 1 − 2n otherwise.
• The family of 2-element subsets of the positive integers is countably
infinite.
Proof:
Alternative 1: Arrange the sets in order of increasing sum of elements,
so the computer program produces the bijection
1: {1, 2}
2: {1, 3}
3: {2, 3}
4: {1, 4}
5: {1, 5}
6: {2, 4}
7: {1, 6}
2
8: {2, 5}
9: {3, 4}
and so on. Clearly any 2-element set will appear once and only once.
Alternative 2: Arrange the sets in order of increasing larger element,
so the computer program produces the bijection
1: {1, 2}
2: {1, 3}
3: {2, 3}
4: {1, 4}
5: {2, 4}
and so on. Clearly any 2-element set will appear once and only once
• The set of positive rational numbers is countably infinite:
Proof: Use the “sum” approach (alternative 1 above) to generate all
ordered pairs {numerator, denominator}. Omit any that lead to frac-
tions that are not in lowest terms.
1: 1/1
2: 1/2
3: 2/1
4: 1/3
5: 3/1 (note – 2/2 was omitted)
6: 1/4
7: 2/3
8: 3/2
9: 4/1
10: 1/5
11: 5/1 (note: 2/4, 3/3, and 4/2 were all omitted)
and so on.
To prove “countably infinite” you still have to rule out the possibil-
ity that the rationals are a finite set. (For example, if any fraction
where the sum of numerator and denominator exceeded 1 million were
not in lowest terms, there would only be finitely many rational num-
bers.) Fortunately, the rational numbers contain an infinite subset,
the positive integers, so they cannot be a finite set.
The Windows application enum.exe (available on the course Web site and
in class) makes this definition of “countably infinite” vivid. Any chosen 2-
or 3-element subset of the positive integers, any finite subset, or any chosen
rational number, will show up once and only once as the program runs, and
it can be predicted exactly where on the list it would appear.
3
3. Properties of countable sets, as listed on page 502 of Apostol: proofs were
left as exercises by Apostol but are included below:
A = {a1 , a2 , a3 , ...}.
Now choose the element of subset B that has the smallest index and call
it b1 . From the remaining elements of B, choose the one with the smallest
index and call it b2 . This process establishes a one-to-one correspondence
between the elements of B and the positive integers, proving that B is
countable.
If A is the set of positive integers and B is the subset of primes, then
a1 = 1, a2 = 2, a3 = 3, ....
b1 = a2 = 2, b2 = a3 = 3, b3 = a5 = 5, ....
4
5. Cartesian products
Here is the solution to exercise 5 on p. 505 of Apostol, which establishes
property (d) above.
For the Cartesian product of two countable sets A and B the most straight-
forward way to proceed is to enumerate the pairs (am , bn ) where m + n is
successively 2, 3, 4, .... A cuter approach is to point out that the func-
tion f (m, n) = 2m 3n establishes a bijection between the pairs (m, n) and a
subset of the positive integers.
The inductive proof that Apostol suggests is the simplest way to extend
the proof from the case of a Cartesian product of 2 sets to the case of a
Cartesian product of n sets. The base case, n = 2 has been proved. If
A1 , A2 , ...An+1 are all countable sets, then
6. Countable unions.
Here is the solution to exercise 6 on p. 505. This shows most of property
(c) on p. 502, namely that the union of a countable collection of disjoint
countable sets is countable. The extension to sets that are not disjoint is
easy.
Start with a countable collection of sets B1 , B2 , B3 , · · · . Now B1 , being
countable, has elements b1,1 , b2,1 , b3,1 , · · · . As long as the sets are disjoint,
there is a bijection between the countable union
[
∞
Bk
k=1
and the set of index pairs (m, n) which, being a Cartesian product of two
countable sets, is countable.
5
7. Finite subsets of a countable set: examples 3 and 4 on p. 503 of Apostol.
Here is a direct proof for a special case of 3, “The family of n-element
subsets of the positive integers is countable.” Enumerate all n-element sets
whose sum is 1, then 2, then 3, then 4, etc. This is a countable union of
finite sets, hence countable.
The proof for 4, “The collection of all FINITE subsets of a countable set is
countable”, uses property (c). This is a countable union of countable sets,
one for each value of n.
6
9. Uncountability in general: example 5 on pp. 503-504 of Apostol.
The key result is that a function from a set A to the collection of all subsets
of that set (the so-called power set of A)cannot be onto (surjective).
The way you prove this is to assume the existence of a surjective function f
and to show that this assumption leads to a contradiction. Before presenting
Apostol’s proof it is worth doing the example of a finite set, say with four
elements. In this case the result is obvious, since there are 16 different
subsets of {1,2,3,4}. To understand the proof in the general case, though,
you should ignore this easy proof and suppose instead that you ask various
people to choose f (1), f (2), f (3), and f (4).
You might end up with f (1) = {1, 2}
f (2) ={3}
f (3) = {1,2,4}
f (4) = {1,2,3,4}
Now you note that f (1) includes 1 and f (4) includes 4, but f (2) fails to
include 2 and f (3) fails to include 3. So you construct the set B = {2, 3},
which cannot be in the range of f . The fact that you can always do this
shows that no set of choices can create a surjective f . This is Apostol’s
argument, and it works for a countably infinite set as well as for a finite
set.
Here is a summary of Apostol’s argument.
The collection of ALL subsets of a countably infinite set is UNcountable.
Proof (by contradiction): Imagine (to get a contradiction)a computer pro-
gram that generates a list of all subsets of the positive integers, each with a
serial number. Sometimes the nth item in this list will include the integer
n; sometime it will not.
Let B be the set of all integers n for which the nth item in the list generated
by the program is a subset that does not include its serial number n.
7
Second, suppose that b is not an element of B. But then b satisfies the
criterion for membership in B, so if b is not an element of B then b is an
element of B. So either assumption about b leads to a contradiction.
Thus no such b can exist, and B cannot occur of the list of subsets. This
collection of subsets is therefore uncountable.
An equivalent way to look at this argument is to note that for all n, the
set B differs from the nth set in the sequence on the issue of whether the
integer n is in the set or not.