# 4. Comparing cardinalities of sets

Part 1: problems, solutions.
Part 2.: problems, solutions.

### Images and preimages

Given a function , and — a subset of domain, then the set of all possible values given by on arguments from , will be called the image under and is denoted by . So:

Given a subset of the set of values , the sets of all arguments such that their values are in , is called the preimage of under and we denote it as . So:

### Examples

Let , . Then is the set of all even numbers. If is the set of even numbers, then is the set of all natural numbers divisible by . If is the set of odd numbers, then . On the other hand, is the set of even numbers.

Let now , . Then . On the other hand, , and .

Let now , . Then . And .

Let finally , . Therefore, , so it is the line . On the other hand, .

### Hilbert’s hotel

Imagine a hotel with some number, e.g. five, single rooms. Assume that all the rooms are occupied. So if a new guest arrives, receptionist has to tell him that no room is available.

But what will happen if the hotel is infinite? Infinitely many rooms numbered 0, 1, 2, etc. single rooms (we will call such a hotel Hilbert’s hotel) and all those rooms are taken, and a new guest appears. Should the receptionist tell him that there are no free rooms? Wise receptionist do not have to. But if not he has to disturb all the guests: he can ask all the guests to step out to the corridor and move to the room with a number greater by one. From 0 to 1, from 1 to 2, from 2 to 3, and so on. All the guests will get a new room and the room 0 will stay free and can be given to the new guest! So Hilbert’s hotel can actually accommodate one more guest then the number of guest that can fill the whole hotel.

And what will happen if to an empty Hibert’s hotel arrive an infinite group of men and and infinite group of women? If the receptionist accommodates the women first, they will take all the rooms, and there will be no rooms for men. Wise receptionist will accommodate women and men alternately. Women to the rooms with even numbers and men to the rooms with odd numbers and therefore all people will fit in. Therefore Hilbert’s hotel can accommodate twice as many people as can fill the whole Hilbert’s hotel!

### Sets of the same cardinality

How to check that two sets have the same number of elements? E.g. a set of some women and a set of some men. We can count elements in each of the sets. But there is also a second method. It suffices to match elements of both sets into pairs. If it is possible, the two sets have the same number of elements. This is a very nice method, since it can be also applied to infinite sets. In the language we have developed, matching elements into pairs, means finding a bijection (function onto and 1-1) between those sets.

We will say that sets and are of the same cardinality, if there exists a bijection between them. This fact will be denoted by .

### Examples

The above considerings about Hilbert’s hotel, were actually considering whether the set of rooms and the set of guests are of the same cardinality. In the first case we have actually considered the following bijection between the sets of guests (actually — the additional guest will be denoted here as ) and the set of rooms (enumerated with elements of ): .

In the second case (with women and men) we can think about a bijection between integer numbers (non-negative numbers are men, and negative — women) with set (rooms). This bijection is defined as follows:

One more example. Let us find a bijection between and . It is not very straightforward, we will need a set , which will help us construct an appropriate bijection:

### Are all infinite sets of the same cardinality?

So maybe all infinite sets are of the same cardinality and we do things without any sense? No! Not all infinite sets have the same cardinality. For example and . Let us give some arguments why real numbers, even only those in the interval , cannot be accommodated in Hilbert’s hotel, in other words there does not exist a bijection .

Assume otherwise, that such a bijection exists, so every point on the interval can be accommodated into Hilbert’s hotel, so , where . Now let us divide into three intervals . Choose this interval out of the three, which does not include . We divide the chosen interval into three parts and we choose the one that does not include . Again, we divide the chosen interval into three parts and choose those which does not include and so on. In the effect we will find a point which in not equal to , not equal to , not equal to , and so on. Therefore it is not accommodated in Hilbert’s hotel, which is a contradiction, because we have assumed that all the points are accommodated.

### Countable sets

A set of the same cardinality as the set of natural numbers will be called countable (so a set is countable if its elements can be accommodated in Hilbert’s hotel). You can think about countable sets as of class of the ,,smallest” infinite sets. In particular, every infinite subset of a countable set is countable (it is easy to see that every subset of a set which can be accommodated in Hilbert’s hotel can be accommodated in Hilbert’s hotel).

Therefore we say that a set is at most countable if it is finite or countable.

### Examples of countable sets

We have already proved that the set of integer numbers is countable.

Notice that, although it may be surprising in the beginning, that the set of pairs of natural numbers is countable. Indeed, we can enumerate them with natural numbers (or in other words we can accommodate them in Hilbert’s hotel), enumerating the subsequent pairs in order of the sum of their elements: , , , , , , , .

Secondly, notice that the set of all finite sequences of zeros and ones: is also countable. We can enumerate its elements taking them in order of their length.

Similarly the set of all finite subsets of the set of natural numbers is countable — we can enumerate them taking them in order of maximal element.

So:

### Properties of countable sets

From the above you can see that:

• infinite subset of a countable set is countable
• product of two countable sets is countable
• product of finite number of countable sets is countable
• countable sum of countable sets is countable

We can use the above facts to prove that a given set is countable.

### Functions and countability

The following theorems are relatively intuitive:

• If is onto and is countable, then also is at most countable.
• If is 1-1 and is countable, then also is at most countable.

### Comparing cardinality

We shall say that the cardinality of is not greater than the cardinality of (denoted by ) if there exists a 1-1 function .

This is actually equivalent to existence of an ,,onto” function .

E.g. , because is a function from onto .

The Theorem of Cantor-Bernstein, states that if and , then the sets and have the same cardinality (so if there exist , such that is 1–1 and is onto then there is a bijection ).

We shall write that , if , but and are not of the same cardinality. For example, we already know, that .

### Sets of different cardinality

We already know, that some sets are countable — of the same cardinality as . We will say that such sets have cardinality (aleph zero) — understanding this as the lowest possible infinite cardinal number. We know that not all sets are countable and there exist “bigger” sets, e.g. . We shall say that a set of the same cardinality as the set of real numbers is of cardinality — (continuum). Generally Cantor Theorem states, that for any set , . We see immediately that we can have an infinite sequence of sets of increasing cardinalities:

We also know that . Therefore, it makes sense to ask, whether there exists a set of cardinality in between and , or whether is the lowest possible cardinal number greater than ? In other words if we enumerate the lowest possible infinite cardinalities as: , then whether ? This question is called the Continuum Hypothesis and was enlisted by David Hilbert on the Congress of Mathematicians in Paris in 1900 r as the first of 20 most important open problems which have to be solved during next 100 years.

And it has been solved in the 60-ties. But the answer may seem very unconventional. Combining results of Kurt Goedel and Paul Cohen we know that: assuming that the axioms of mathematics are consistent it is not possible to prove the Continuum Hypothesis and it is not possible to prove its negation! It has actually been proven that it is impossible to prove. It turned out that it is possible that a sentence is independent from the axioms.

By the way, notice the assumption of consistency of the axioms. Is such consistency not obvious? Actually it is not. Kurt Goedel proved that it also cannot be proven! We will never know, that the axioms are for sure consistent. But this does not diminish our faith in mathematics. 🙂

### Sets of cardinality continuum

Returning to the ground, we have already mentioned some sets of cardinality continuum, in particular: and . It is relatively easy to prove that also the set of infinite binary sequences is also of cardinality continuum as is also the set of all infinite sequences of natural numbers . Also the product of two sets (or even countably many) sets of cardinality continuum is of cardinality continuum.

I hope it is not necessary to mention that there are sets of cardinality greater than continuum. E.g. by Cantor Theorem, .

Usually, we prove that a set is of cardinality continuum, using Cantor-Bernstein Theorem. In particular we have to find sets i , of cardinality continuum, such that we are able to show functions which prove that and .

E.g. let us prove that the set of all infinite sequences of even numbers is a set of cardinality continuum. Take the set of all sequences of natural numbers. Then , is obviously one-to-one, so . On the other hand, , let be a the function which in a given binary sequence changes all ones into twos. is again one-to-one, so . Therefore by Cantor-Bernstein Theorem .

### Diagonal method

Diagonal method is a method of proving theorems quite popular in mathematics. For example, we can use it to prove Cantor Theorem for the set of natural numbers, in other words, that , the set of all subsets of the set of natural numbers cannot be accommodated in Hilbert’s hotel.

Assume otherwise, that it is possible. Let , where is the set accommodated in the -th room. We construct new subset of natural numbers in the following way: if , then let , and if , then let . And similarly let if and only if , generally let if and only if (that is what is the motivation of the name of this method: we take or not number as an element of , depending on whether it is not, or is, an element of ).

Notice that , because only one of them contains . Similarly, because they differ on . Generally . Therefore is a subset of the set of natural numbers, which is not accommodated in any room. We have reached a contradiction, because we assumed that every subset is accommodated.