You are on page 1of 2

Math 347 Worksheet: CardinalitySolutions A.J.

Hildebrand
Practice Problems: Countable and Uncountable Sets Solutions
The following problems are intended to develop a feel for countable and uncountable sets. In each case, determine if the
set is countable or uncountable and justify your answer. Here are some ways to establish countability or uncountability:
Establish a bijection to a known countable or uncountable set, such as N, Q, or R, or a set from an earlier problem.
Many of the sets below have natural bijection between themselves; try to uncover these bjections!
Establish a bijection to a subset of a known countable set (to prove countability) or a superset of a known
uncountable set (to prove uncountability).
Build up the set from sets with known cardinality, using unions and cartesian products, and use the above results
on countability of unions and cartesian products.
1. The set of all points in the plane with rational coordinates.
Solution: COUNTABLE. Proof: The given set is Q Q. Since Q is countable and the cartesian product of
nitely many countable sets is countable, QQ is countable.
2. The set of all nite sequences of integers.
Solution: COUNTABLE. Proof: The given set can be epressed as a union

k=1
A
k
, where A
k
denotes the set
of integer sequences of length k. Since a countable union of countable sets is countable, the claim will follow if
we can show that, for each k, the set A
k
is countable. Now A
k
can be written as A
k
= {(n
1
, . . . , n
k
) : n
i
Z} =
Z Z, i.e., a k-fold cartesian product of the countable set Z with itself, and therefore is countable.
3. The set of all words (dened as nite strings of letters in the alphabet).
Solution: COUNTABLE: Proof: The set of all words can be expressed as a union

k=1
W
k
, where W
k
denotes
the set of words of length k. Since each W
k
is nite (more precisely, assuming 26 letters in the alphabet, there
are 26
k
words of length k), the claim follows from the fact that a countable union of nite or countable sets is
countable.
4. The set of all computer programs in a given programming language (dened as a nite sequence of legal words
and symbols in that language, such as if, for, {, ==, etc.).
Solution: COUNTABLE. Proof: Use the same argument as for words, with the alphabet being the (nite)
set of all legal words or symbols.
5. The set of all nite subsets of N.
Solution: COUNTABLE. Proof: Identifying a k-element subset of N with the sequence of its elements in
increasing order gives a one-to-one correspondence between the set of all nite subsets of N and a subset of the
set of all nite sequences of positive integers (namely those of the form () (a
1
, . . . , a
k
) with a
1
< < a
k
).
Since the set of all nite integer sequences is countable (as shown above), it follows that the set of such sequences
of the form (), and hence the given set, is also countable.
6. The set of all innite sequences of integers.
Solution: UNCOUNTABLE. The set of all innite integer sequences is a superset of the set of all innite
binary (i.e., 01) sequences, which we have seen is uncountable (see above).
7. The set of all outcomes (i.e., head/tail sequences) in an innite sequence of coin tosses.
Solution: UNCOUNTABLE: Proof: The set of all innite head/tail sequences is in an obvious one-to-one
correspondence with the set of all innite binary sequences, which we know is uncountable.
8. The set of all subsets of N.
Solution: UNCOUNTABLE. Proof: Given a subset A N, dene a binary sequence (a
1
, a
2
, . . . ) by a
i
= 1 if
i A and a
i
= 0 if i A. This yields a bijection between the set of all subsets of N and the set of all innite
binary sequences. Since the latter set is uncountable (by the above Lemma), so is the given set.
1
Math 347 Worksheet: CardinalitySolutions A.J. Hildebrand
9. The set of all functions f : N {0, 1}.
Solution: UNCOUNTABLE. Proof: Mapping a function f : N {0, 1} to the sequence (a
1
, a
2
, . . . ) dened by
a
i
= f(i) for each i yields a bijection between functions of the given type and innite binary sequences. Since
the latter set is uncountable, so is the given set of all functions f : N {0, 1}.
10. The set of all functions f : {0, 1} N.
Solution: COUNTABLE. Proof. The functions f : {0, 1} N are in one-to-one correspondence with N N
(map f to the tuple (a
1
, a
2
) with a
1
= f(1), a
2
= f(2)). Since the latter set is countable, as a Cartesian product
of countable sets, the given set is countable as well.
11. The set of all real numbers that are roots of polynomials with integer coecients (i.e., solutions to an equation of
the form a
k
x
k
+ + a
1
x + a
0
= 0 with a
i
Z). (Such numbers are called algebraic. For example, the golden
ratio, (

5 + 1)/2, is algebraic since it is a root of the polynomial x


2
x 1; by contrast, a famous result states
that is not algebraic.)
Solution: COUNTABLE. Proof: Note that a polynomial of the given form is determined uniquely by the
sequence of its coecients (a
0
, a
1
, . . . , a
k
), which is a nite integer sequence. Since the set of nite integer
sequences is countable (as shown above), the set of polynomials of the given form is also countable. Moreover,
since a polynomial has only nitely many roots, only nitely many algebraic numbers are roots of a given
polynomial. Hence the set of all algebraic numbers can be expressed as a countable union (corresponding to the
countably many polynomials with integer coecients) of nite sets (corresponding to the roots of a given such
polynomial).
2

You might also like