1.2.3 Cardinality: Countable and Uncountable Sets
Here we need to talk about cardinality of a set, which is basically the size of the set. The cardinality of a set is denoted by . We first discuss cardinality for finite sets and then talk about infinite sets.
Finite Sets:
Consider a set . If has only a finite number of elements, its cardinality is simply the number of elements in . For example, if , then . Before discussing infinite sets, which is the main discussion of this section, we would like to talk about a very useful rule: the inclusion-exclusion principle. For two finite sets and , we have
Inclusion-exclusion principle:
,
.
Generally, for finite sets , we can write
Example
In a party,
- there are $10$ people with white shirts and $8$ people with red shirts;
- $4$ people have black shoes and white shirts;
- $3$ people have black shoes and red shirts;
- the total number of people with white or red shirts or black shoes is $21$.
How many people have black shoes?
- Solution
Let , , and , be the number of people with white shirts, red shirts, and black shoes respectively. Then, here is the summary of the available information:
Also, it is reasonable to assume that and are disjoint, . Thus by applying the inclusion-exclusion principle we obtain$ = 21$ . Thus
Note that another way to solve this problem is using a Venn diagram as shown in Figure 1.11.

Fig.1.11 - Inclusion-exclusion Venn diagram.
Infinite Sets:
What if is an infinite set? It turns out we need to distinguish between two types of infinite sets, where one type is significantly "larger" than the other. In particular, one type is called countable, while the other is called uncountable. Sets such as and are called countable, but "bigger" sets such as are called uncountable. The difference between the two types is that you can list the elements of a countable set , i.e., you can write , but you cannot list the elements in an uncountable set. For example, you can write
- ,
- .
The fact that you can list the elements of a countably infinite set means that the set can be put in one-to-one correspondence with natural numbers . On the other hand, you cannot list the elements in , so it is an uncountable set. To be precise, here is the definition.
Definition
Set is called countable if one of the following is true
- if it is a finite set, ; or
- it can be put in one-to-one correspondence with natural numbers , in which case the set is said to be countably infinite. A set is called uncountable if it is not countable.
Here is a simple guideline for deciding whether a set is countable or not. As far as applied probability is concerned, this guideline should be sufficient for most cases.
- , and any of their subsets are countable.
- Any set containing an interval on the real line such as or , where is uncountable.
The above rule is usually sufficient for the purpose of this book. However, to make the argument more concrete, here we provide some useful results that help us prove if a set is countable or not. If you are less interested in proofs, you may decide to skip them.
Theorem
Any subset of a countable set is countable. Any superset of an uncountable set is uncountable.
Proof
The intuition behind this theorem is the following: If a set is countable, then any "smaller" set should also be countable, so a subset of a countable set should be countable as well. To provide a proof, we can argue in the following way.
Let be a countable set and . If is a finite set, then , thus is countable. If is countably infinite, then we can list the elements in , then by removing the elements in the list that are not in , we can obtain a list for , thus is countable.
The second part of the theorem can be proved using the first part. Assume is uncountable. If and is countable, by the first part of the theorem is also a countable set which is a contradiction.
Theorem
If is a list of countable sets, then the set is also countable.
Proof
It suffices to create a list of elements in . Since each is countable we can list its elements: . Thus, we have
- ,
- ,
- ,
- ...
Now we need to make a list that contains all the above lists. This can be done in different ways. One way to do this is to use the ordering shown in Figure 1.12 to make a list. Here, we can write

Fig.1.12 - Ordering to make a list.
We have been able to create a list that contains all the elements in , so this set is countable.
Theorem
If and are countable, then is also countable.
Proof
The proof of this theorem is very similar to the previous theorem. Since and are countable, we can write

Fig.1.13 - Ordering to make a list.
The above arguments can be repeated for any set in the form of
The above theorems confirm that sets such as and their subsets are countable. However, as we mentioned, intervals in are uncountable. Thus, you can never provide a list in the form of that contains all the elements in, say, . This fact can be proved using a so-called diagonal argument, and we omit the proof here as it is not instrumental for the rest of the book.
