Sets and Cardinality Notes For 620-111: C. F. Miller Semester 1, 2000
Sets and Cardinality Notes For 620-111: C. F. Miller Semester 1, 2000
Sets and Cardinality Notes For 620-111: C. F. Miller Semester 1, 2000
for
620-111
C. F. Miller
Semester 1, 2000
Abstract
2 Cardinality 11
0
Chapter 1
- the real numbers R (it is a bit more difficult to define the real numbers
precisely, but one can think of them as either the points on the real
line or as infinite decimal expansions);
- the half open interval (1, 3] = {x ∈ R | 1 ≤ x ≤ 3};
- the English alphabet {a, b, c, . . . , x, y, z} which is a set of symbols as
listed;
1
2 CHAPTER 1. SETS AND FUNCTIONS
- the complement of a set A denote Ac is defined only when all sets being
considered are subsets of one fixed larger set U called the universe.
Then Ac is defined as
Ac = U \ A = { x | x ∈ U but x ∈
/ A}.
Two sets A and B are said to be disjoint if they have no elements in common,
that is if A ∩ B = ∅.
Assuming all sets are contained in a fixed universe U the following laws
hold for the algebra of sets with these operations:
called the method of Venn diagrams and can be quite helpful for intuitive
purposes. Here the entire plane represents the universe U in which all sets
under consideration are contained. The reader may wish to check the above
laws using such diagrams.
If A is a set we denote the set consisting of all subsets of A by P ow(A),
called the power set of A. Thus, for example if A = {3, 4, 5} then
P ow(A) = {∅, {3}, {4}, {5}, {3, 4}, {3, 5}, {4, 5}, {3, 4, 5}}.
Note that the empty set and the set A itself are both members of P ow(A).
The reader should be warned that a more customary notation for P ow(A)
is 2A . The reason for this notation will be explained in a later section, but
meanwhile we agree to use either form.
If the set A has only finitely many elements, the number of elements of A
is denoted card(A), the cardinality of A. If A is infinite it is also possible to
discuss its size and this will be done in a subsequent section on cardinality.
For the moment we content ourselves with discussing the size of certain finite
sets. The following is a result easily proved using mathematical induction:
Let A and B be two sets. Then for each a ∈ A and b ∈ B we can form
the ordered pair (a, b). The order here is important and a is the first element
and b is the second element of the ordered pair. Equality between ordered
pairs (a1 , b1 ) = (a2 , b2 ) means that both a1 = a2 and b1 = b2 . The Cartesian
product or simply the product of A and B, written A × B, is the collection of
all such ordered pairs. Thus
If A = B in this construction then one writes A2 for A×A. Thus, for example
R2 is the set of all ordered pairs of real numbers which can be identified with
the Euclidean plane in the usual way.
Suppose A and B are finite sets. If we fix a ∈ A there are card(B) ordered
pairs of the form (a, b) with b ∈ B having that fixed a as first element. Since
there are card(A) ways to choose a from A we conclude the following:
1.2 Functions
Let A and B be two sets. We want to define the notion of a mapping or
function f : A −→ B from A to B. Usually functions are given to us by a
rule or formula which enable us to compute them. Thus a function f from
A to B assigns to each element a ∈ A a unique element denoted f (a) in the
set B. The element f (a) in B is called the value of f at a or the image of a
under f .
Unfortunately this is not a precise definition because the meaning of “as-
signs to” is vague. We will see shortly how to fix this up, but for now we
recall some of the usual terminology.
If f : A −→ B is a function, the set A is called the domain of f, denoted
dom(f ). The domain of f is just the set on which the function is defined.
6 CHAPTER 1. SETS AND FUNCTIONS
The set B in which the function’s values lie is the codomain of f. The set of
all images under f of elements of A is called the image of f and is denoted
There are a few special types of functions that one should be familiar with.
If A is a set then the identity function denoted 1A or idA is the function that
maps every element of A to itself, that is 1A (a) = a for all a ∈ A. A function
f : A −→ B is a constant function if it has the same value for every a ∈ A,
that is for some fixed b0 ∈ B we have f (a) = b0 for all a ∈ A.
If A is a subset of the universe U of discourse then the characteristic
function of A is the function χA : U −→ {0, 1} defined by
½
1 for x ∈ A
χA (x) =
0 for x ∈ U \ A
f −1 (T ) = {x ∈ A | f (x) ∈ T }.
1.2. FUNCTIONS 7
(a) {n ∈ N | n is divisible by 5}
(b) P ow({1, 2, 3, 4, 5})
(c) {n ∈ N | n + 1 is a prime }
(d) {2n | n ∈ N}
8 CHAPTER 1. SETS AND FUNCTIONS
1.2. Determine which of the following sets are nonempty and list their ele-
ments:
(a) {n ∈ N | n2 = 3}
(b) {n ∈ Z | 3 < |n| < 7}
(c) {x ∈ R | x < 1 and x ≥ 2}
(d) {3n + 1 | n ∈ N and n ≤ 6}
(e) {n ∈ N | n is a prime and n ≤ 15}
A = {n ∈ N | n is odd }
B = {n ∈ N | n is a prime }
C = {4n + 3 | n ∈ N}
D = {x ∈ R | x2 − 8x + 15 = 0}
A = {n ∈ N | n ≤ 11}
B = {n ∈ N | n is even and n ≤ 20}
E = {n ∈ N | n is even}
(a) A ∩ B = A ∩ C implies B = C.
(b) A ∪ B = A ∪ C implies B = C.
(c) A ∩ B = A ∩ C and A ∪ B = A ∪ C imply B = C.
1.2. FUNCTIONS 9
(d) A ∪ B ⊆ A ∩ B implies A = B.
(e) A + B = A + C implies B = C.
(a) {(m, n) ∈ N2 | − 1 ≤ m − n ≤ 1}
(b) {(m, n) ∈ N2 | m − n ≤ 2}
(c) {(x, y) ∈ R2 | x = y 2 }
(d) {(x, y) ∈ R2 | x ≤ y 2 }
(e) {(x, y) ∈ R2 | x ≥ 0, y ≥ 0, x + y = 1}
(f) {(x, y) ∈ R2 | x ≥ 0, y ≥ 0, x + y ≤ 1}
1.10. Let S = {1, 2, 3, 4, 5} and T = {a, b, c, d}. For each question below:
if the answer is “yes” give an example; if the answer is “no” explain
briefly.
(a) Write each of these functions as sets of ordered pairs, that is, list
the elements in their graphs.
10 CHAPTER 1. SETS AND FUNCTIONS
Cardinality
Definition 2.1 Two sets are said to be equipotent or to have the same num-
ber of elements or to have the same cardinality if there is a one-one corre-
spondence (bijection) between them. If X and Y are equipotent we write
X ' Y.
We also want to be able compare the size of two sets. For instance a subset
of a set should be no larger than the set itself. The following definition is
convenient.
11
12 CHAPTER 2. CARDINALITY
Y = Y0 ⊃ Y1 ⊃ . . . ⊃ Yn ⊃ . . .
Y = Y 0 ⊃ Y1 ⊃ . . . ⊃ Y n ⊃ . . .
Y = {a0 , a1 , a2 , . . . , an , . . .}
Lemma 2.4 The set N<∞ of all finite sequences of natural numbers is count-
able. Hence, in particular, the sets Nk of all k-tuples of natural numbers, the
set Z of integers and the set Q of rational numbers are all countable.
Proof: From number theory we know that every natural number greater than
1 can be uniquely expressed as a product of powers of prime numbers and
that there are infinitely many prime numbers. Let p0 = 2, p1 = 3, . . . be the
prime numbers in increasing order. (The primes are clearly a countable set).
Define a function f : N<∞ −→ N as follows: if < b0 , b1 , . . . , bn > is a finite
sequence of natural numbers, then define
For example, f (< 17, 0, 3, 1988 >) = 218 · 31 · 54 · 71989 . By the uniqueness of
factorization, f is a one-one function and hence defines a one-one correspon-
dence between N<∞ and its image in N. Hence N<∞ is countable. Each of
the other sets mentioned is either a subset or is easily put in one-one corre-
spondence with a subset of N<∞ and hence is also countable. This completes
the proof.
Naively one might have thought that all infinite sets are of the same size.
Thus one can ask whether or not all sets are countable. The next result due
to Cantor asserts that the real numbers are uncountable. As usual we think
of a real number as a decimal expansion
n.b0 b1 . . . bk . . .
Theorem 2.5 The real numbers R are uncountable. Indeed the real numbers
in the interval (0, 1) are uncountable.
15
Proof: (diagonal argument) Suppose on the contrary that the real numbers
in (0, 1) were countable, say (0, 1) = {a0 , a1 , a2 , . . .}. If we list these vertically
in decimal expansion form we get a sort of table of digits:
Here each bij is one of the digits 0, . . . , 9. We view these bij as an infinite
array and consider the sequence down the long diagonal:
a0 = .7316 . . .
a1 = .1423 . . .
a2 = .3251 . . .
then c would begin c = .454 . . . . Note that the digits ci of c are constructed
so that, for all i, ci 6= bii . Clearly the real number c defined by this decimal
expansion lies in the interval (0, 1) and so by our previous assumption that
(0, 1) = {a0 , a1 , a2 , . . .} for some k we must have c = ak . Therefore the k-th
digit ck in the decimal expansion of c is just bkk , that is ck = bkk . But by
construction ci 6= bii for all i which is a contradiction. Thus (0, 1) could not
have been countable and the theorem is proved.
Definition 2.4 If X and Y are sets, then Y X denotes the set of all functions
from X to Y. The set of all subsets of X is denoted P ow(X), called the power
set of X.
to think of 2 = {0, 1}. Thus 2X is the set of all functions from X to the set
consisting of two elements 2 = {0, 1}. Now if f ∈ 2X then f determines a
subset Z f ⊆ X by the rule Z f = {a ∈ X|f (a) = 1}. Thus we have associated
to each f ∈ 2X an element Z f ∈ P ow(X). In fact the association f −→ Z f
is a one-one correspondence. To see this observe that to a subset W ⊆ X
one can associate its characteristic function χW ∈ 2X defined by the rule
½
1 if a ∈ W
χW (a) =
0 if a ∈
/W
One can now check that Z (χW ) = W and that χ(Z f ) = f so that both of these
associations are one-one correspondences.
It is clear that for any set X, X ¹ P ow(X) for the function f : X −→
P ow(X) defined by f (a) = {a} is one-one. However, the following result
again due to Cantor says that P ow(X) 6¹ X.
Theorem 2.6 For any set X, the sets X and P ow(X) are not equipotent.
Exercises on cardinality
2.1. Construct an explicit bijection between the natural numbers N and the
integers Z.
2.2. Construct an explicit bijection between [0, 1] and (2, 3)
2.3. Let a < b be real numbers. Find an explicit bijection between the open
interval (a, b) and the interval (0, 1). Use this and a suitable function
from the calculus or trigonometry to construct an explicit bijection
from (0, 1) onto all of the real numbers R.
2.4. Consider a countable sequence of sets A0 , A1 , A2 , . . . of sets each of
which is countable. Show that their union
[
A∞ = Ai
i∈N
is also a countable set. (Hint: The sets Ai may not be disjoint. Replace
the Ai by a disjoint sequence Bi still having A∞ as it’s union.)
2.5. Consider the infinite binary branching tree T rooted at the vertex v,
the initial portion of which is illustrated below. A branch of T is an
infinite reduced path beginning at v. Show that T has uncountably
many branches.
.. .. .. .. .. .. .. ..
. . . . . . . .
u u u u u u u u
@u @u @u @u
@ @
@u @u
HH
HH
u
v
[Hint: there is a unique reduced path from v to any vertex. Such a path
is determined by a sequence of left versus right branching decisions
at lower vertices. Thus one can associate to any branch an infinite
sequence of l’s and r’s which specify the path completely.]
2.6. Let C be the subset of the unit interval (0, 1) consisting of those num-
bers whose decimal representation contains the digit 4. Show that
C ' (0, 1). Show further that for any 0 ≤ a < b ≤ 1 the interval (a, b)
contains a subinterval (c, d) ⊆ (a, b) such that (c, d) ⊆ C. Hence the
complement (0, 1) \ C does not contain any open interval of the form
(a, b). Show that the complement (0, 1) \ C is uncountable.