]> Cardinality

## 6. Cardinality

#### Definitions and Preliminary Examples

Suppose that $S$ is a non-empty collection of sets. We define a relation  on $S$ by $A B$ if and only if there exists a one-to-one function $f$ from $A$ onto $B$ (sometimes called a bijection). That is, $A$ and $B$ are in one-to-one correspondence.

Show that  is an equivalence relation on $S$.

Two sets that are in one-to-one correspondence are said to have the same cardinality. Thus, the equivalence classes under this equivalence relation capture the notion of having the same number of elements.

For $k$, let $k 0 1 k 1$. Technically, a set $A$ is finite if $A k$ for some $k$, in which case $k$ is the cardinality of $A$, and we write $A k$. Think of $k$ as a reference set with $k$ elements; any other set with $k$ elements must be equivalent to this one. Appropriately enough, a set is infinite if it's not finite. We will study the cardinality of finite sets in the next two sections on Counting Measure and Combinatorial Structures. In this section, we will concentrate primarily on infinite sets.

Let $S$ be a set. Recall that $S$ denotes the power set of $S$ (the set of all subsets of $S$), and $0 1 S$ denotes the set of functions from $S$ into $0 1$. Show that $S 0 1 S$. The mapping that takes a set $A$ into its indcator function $A$ is a bijection.

A set that is equivalent to the set of natural numbers  is said to be countably infinite. A set that is either finite or countably infinite is said to be countable. Countable sets play a very important role in probability theory, as in many other branches of mathematics. Appropriately enough, a set that is not countable is said to be uncountable. We will soon see that there are such sets.

Show that the set of even natural numbers $E 0 2 4$ is countable infinite, and the set of integers  is countable infinite.

1. A one-to-one mapping from  onto $E$ can be constructed by mapping $n$ to $2 n$
2. A one-to-one mapping from  onto  can be constructed by mapping the even natural numbers one-to-one onto the natural numbers, and the odd natural numbers one-to-one onto the negative integers.

Suppose that $A$ is a set with at least two elements, and let $S A$, the set of all functions from  into $A$. Thus, the elements of $S$ are infinite sequences indexed by  and taking values in $A$. Show that $S$ is uncountable. The proof is by contradiction, and uses a nice trick known as the diagonalization method:

1. Suppose that $S$ is countably infinite (it's clearly not finite), so that the elements of $S$ can be enumerated: $S f 0 f 1 f 2$
2. Now construct a new function $g$ that differs from every function in the list. Specifically, suppose that $a$ and $b$ are distinct elements of $A$. Define $g A$ by $g n b$ if $f n n a$ and $g n a$ if $f n n a$
3. Show that $g f n$ for each $n$, which contradicts the fact that $S$ is the set of all functions from  into $A$.

#### Subsets of Infinite Sets

Surely a set must be as least as large as any of its subsets, in terms of cardinality. On the other hand, it might also seem that the set of even natural numbers is only half the size of the set of all natural numbers, and that the set of integers is twice the size of the set of natural numbers. However, by a Exercise 3, the three sets have exactly the same size, in terms of cardinality. In this subsection, we will explore some interesting and somewhat paradoxical results that relate to subsets of infinite sets. Along the way, we will see that the countable infinity is the smallest of the infinities.

Suppose that $S$ is an infinite set. Show that $S$ has a countable infinite subset.

1. Select $a 0 S$. It's possible to do this since $S$ is nonempty.
2. Inductively, having chosen $a 0 a 1 a k 1 S$, select $a k S a 0 a 1 a k 1$. Again, it's possible to do this since $S$ is not finite.
3. Manifestly, $a 0 a 1 a 2$ is a countably infinite subset of $S$.

Show that a set $S$ is infinite if and only if $S$ is equivalent to a proper subset of $S$

1. If $S$ is finite, then $S$ is not equivalent to a proper subset by the pigeonhole principle
2. If $S$ is infinite, then $S$ has countably infinite subset $a 0 a 1 a 2$ by the previous exercise. Show that $S$ is equivalent to $S a 1 a 3 a 5$. Construct the bijection as follows:
3. Map $a 0 a 1 a 2$ one-to-one onto $a 0 a 2 a 4$. This can be done in essentially the same way that the natural numbers were mapped one-to-one onto the even natural numbers in Exercise 3.
4. For every other element $x S a 0 a 2 a 4$, map $x$ to $x$.

When $S$ was infinite in the previous exercise, not only did we map $S$ one-to-one onto a proper subset, we actually threw away a countably infinite subset and still maintained equivalence. Similarly, we can add a countably infinite set to an infinite set $S$ without changing the cardinality $S$.

Show that if $S$ is an infinite set and $B$ is a countable set, then $S S B$

1. Consider the most extreme case where $B$ is countably infinite and disjoint from $S$.
2. $S$ has a countably infinite subset $A a 0 a 1 a 2$, and $B b 0 b 1 b 2$. Construct the bijection as follows:
3. Map the even order terms of $A$ one-to-one onto $A$, and map the odd order terms of $A$ one-to-one onto $B$.
4. For every element $x S A$, map $x$ to $x$

In particular, if $S$ is uncountable and $B$ is countable then $S B$ and $S B$ have the same cardinality as $S$, and in particular are uncountable.

In terms of the dichotomies finite-infinite and countable-uncountable, a set is indeed at least as large as a subset. First we need a preliminary result.

Show that if $S$ is countably infinite and $A$ is an infinite subset of $S$, then $A$ is countably infinite.

1. Since $S$ is countably, it can be enumerated: $S x 0 x 1 x 2$
2. Let $n i$ be the $i$ smallest index such that $x n i A$
3. Argue that $A x n 0 x n 1 x n 2$ and hence is countably infinite.

Suppose that $A B$. Prove the following results.

1. If $B$ is finite then $A$ is finite.
2. If $A$ is infinite then $B$ is infinite.
3. If $B$ is countable then $A$ is countable.
4. If $A$ is uncountable then $B$ is uncountable.

Hint: Note that (b) is the contrapositive of (a), and (d) is the contrapositive of (c).

#### Comparisons by one-to-one and onto functions

We will look deeper at the general question of when one set is at least as big than another, in the sense of cardinality. Not surprisingly, this will eventually lead to a partial order on the cardinality equivalence classes

First note that if there exists a function that maps a set $A$ one-to-one into a set $B$, then, in a sense, there is a copy of $A$ contained in $B$. Hence $B$ should be at least as large as $A$.

Suppose that $f A B$ is one-to-one. Show that

1. If $B$ is finite then $A$ is finite.
2. If $A$ is infinite then $B$ is infinite.
3. If $B$ is countable then $A$ is countable.
4. If $A$ is uncountable then $B$ is uncountable.

Hint: Note that $f$ maps $A$ one-to-one onto $f A$, and $f A B$. Now use the Exercise 9.

On the other hand, if there exists a function that maps a set $A$ onto a set $B$, then, in a sense, there is a copy of $B$ contained in $A$. Hence $A$ should be at least as large as $B$.

Suppose that $f A B$ is onto. Show that

1. If $A$ is finite then $B$ is finite.
2. If $B$ is infinite then $A$ is infinite.
3. If $A$ is countable then $B$ is countable.
4. If $B$ is uncountable then $A$ is uncountable.

Hint: For each $y B$, select a specific $x A$ with $f x y$ (if you are persnickety, you may need to invoke the axiom of choice). Let $C$ be the set of chosen points. Argue that $f$ maps $C$ one-to-one onto $B$, and $C A$. Now use the Exercise 10.

The previous exercise also could be proved from the one before, since if there exists a function $f$ mapping $A$ onto $B$, then there exists a function $g$ mapping $B$ one-to-one into $A$. This duality is proven in the discussion of the axiom of choice. A simple and useful corollary of the previous two theorems is that if $B$ is a given countably infinite set, then a set $A$ is countable if and only if there exists a one-to-one function $f$ from $A$ into $B$, if and only if there exists a function $g$ from $B$ onto $A$.

Show that if $A i$ is a countable set for each $i$ in a countable index set $I$, then $i I A i$ is countable.

1. Consider the most extreme case in which the index set $I$ is countably infinite.
2. There exists a function $f i$ that maps  onto $A i$ for each $i$.
3. Let $M 2 i 3 j i j$. Note that $M$ is countably infinite.
4. Define $f M i I A i$ by $f 2 i 3 j f i j$. Show that $f$ is well-defined and is onto.

Show that if $A$ and $B$ are countable then $A B$ is countable.

1. There exists a function $f$ that maps  onto $A$, and there exists a function $g$ that maps  onto $B$.
2. Again, let $M 2 i 3 j i j$. Note that $M$ is countably infinite.
3. Define $h M A B$ by $h 2 i 3 j f i g j$. Show that $h$ is well-defined and is onto.

The last result could also be proven from the one before, by noting that

$A B a A a B$

Both proofs work because the set $M$ is essentially a copy of , embedded inside of . The last theorem generalizes to the statement that a finite product of countable sets is still countable. But, from Exercise 4, a product of infinitely many sets (with at least 2 elements each) will be uncountable.

Show that the set of rational numbers  is countably infinite.

1. The sets  and  are countably infinite.
2. The set  is countably infinite.
3. The function $f$ given by $f m n m n$ is onto.

A real number is algebraic if it is the root of a polynomial function (of degree 1 or more) with integer coefficients. Rational numbers are algebraic, as are rational roots of rational numbers (when defined). Moreover, the algebraic numbers are closed under addition, multiplication, and division. A real number is transcendental if it's not algebraic. The numbers  and  are transcendental, but we don't know very many other transcendental numbers by name. However, as we will see, most (in the sense of cardinality) real numbers are transcendental.

Show that the set of algebraic numbers  is countably infinite.

1. Let $0 0$ and let $n n 1 0$ for $n$. The set $n$ is countably infinite for each $n$.
2. Let $C n 1 n$. Think of $C$ as the set of coefficients; $C$ is countably infinite.
3. Let $P$ denote the set of polynomials of degree 1 or more, with integer coefficients. The function $a 0 a 1 a n a 0 a 1 x a n x n$ maps $C$ onto $P$.
4. A polynomial of degree $n$ in $P$ has at most $n$ roots, by the fundamental theorem of algebra.

Now let's look at some uncountable sets.

Show that the interval $0 10$ is uncountable.

1. Let $S$ denote the set of all functions from  into $0 1 2 9$, thought of as infinite sequences. The set $S$ is uncountable.
2. Let $N$ denote the set of all sequences in $S$ that eventually end in all 9's. The set $N$ is countably infinite.
3. The set $D S N$ has the same cardinality as $S$, and in particular is uncountable.
4. The mapping $f$ that takes a sequence in $D$ and returns the corresponding decimal expansion $f x x 0 . x 1 x 2 x 3$ is a bijection from $D$ onto $0 10$.

Show that the following sets have the same cardinality, and in particular all are uncountable:

1. , the set of real numbers.
2. Any interval $I$ of , as long as the interval is not empty or a single point.
3. , the set of irrational numbers.
4. , the set of transcendental numbers.
5. , the power set of .

Hints: You can find a linear function that maps an interval one-to-one onto another interval, as long as the two intervals are of the same type--that is, both bounded or unbounded, and both with the same type of closure. A closed (or half-closed) interval differs from its open counterpart by two (or one) points. The natural log function maps the interval $0$ one-to-one onto . The tangent function maps the interval $2 2$ one-to-one onto . The irrational numbers can be obtained from the real numbers by removing the rational numbers (a countably infinite set), and similarly, the transcendental numbers can be obtained from the real numbers by removing the algebraic numbers (again a countably infinite set).

#### The Cardinality Partial Order

Suppose that $S$ is a nonempty collection of sets. We define the relation  on $S$ by $A B$ if and only if there exists a one-to-one function $f$ from $A$ into $B$, if and only if there exists a function $g$ from $B$ onto $A$. In light of the previous subsection, $A B$ should capture the notion that $B$ is at least as big as $A$, in the sense of cardinality.

Show that  is reflexive and transitive.

Thus, we can use the construction in the section on on Equivalence Relations to first define an equivalence relation on $S$, and then extend  to a true partial order on the collection of equivalence classes. The only question that remains is whether the equivalence relation we obtain in this way is the same as the one that we have been using in our study of cardinality. Rephrased, the question is this: If there exists a one-to-one function from $A$ into $B$ and a one-to-one function from $B$ into $A$, does there necessarily exist a one-to-one function from $A$ onto $B$? Fortunately, the answer is yes; the result is known as the Schröder-Bernstein Theorem, named for Ernst Schröder and Sergi Bernstein.

Show that if $A B$ and $B A$ then $A B$.

1. Set inclusion  is a partial order on $A$ (the power set of $A$) with the property that every subcollection of $A$ has a supremum (namely the union of the subcollection).
2. Suppose that $f$ maps $A$ one-to-one into $B$ and $g$ maps $B$ one-to-one into $A$. Define the function $h A A$ by $h U A g B f U$ for $U A$.
3. Show that $h$ is increasing: if $U V$ then $h U h V$
4. Use the fixed point theorem for partially ordered sets to conclude that there exists $U A$. such that $h U U$.
5. Conclude that $g B f U A U$.
6. Now define $F A B$ by $F x f x$ if $x U$ and $F x g x$ if $x A U$. Show that $F$ is one-to-one and onto.

We will write $A B$ if $A B$, but $A$ and $B$ are not equivalent. That is, there exists a one-to-one function from $A$ into $B$, but there does not exist a function from $A$ onto $B$. Note that  would have its usual meaning if applied to the equivalence classes. That is, $A B$ if and only if $A B$ but $A B$. Intuitively, of course, $A B$ means that $B$ is strictly larger than $A$, in the sense of cardinality.

Show that $A B$ in each of the following cases:

1. $A$ and $B$ are finite and $A B$
2. $A$ is finite and $B$ is countably infinite.
3. $A$ is countably infinte and $B$ is uncountable.

We close our discussion with the observation that for any set, there is always a larger set.

Let $S$ be a set. Show that $S S$.

1. First, it's trivial to map $S$ one-to-one into $S$; just map $x$ to $x$.
2. Suppose that $f$ maps $S$ onto $S$ and let $R x S x f x$. Since $f$ is onto, there exists $t S$ with $f t R$.
3. Show that $t f t$ if and only if $t f t$.

The proof that a set cannot be mapped onto its power set is similar to the Russell paradox, named for Bertrand Russell.

The continuum hypothesis is the statement that there is no set of real numbers whose cardinality is between between that of  and . The continuum hypothesis actually started out as the continuum conjecture, until it was shown to be consistent with the usual axioms of the real number system (by Kurt Gödel in 1940), and independet of those axioms (by Paul Cohen in 1963).