Lecture 9: An infinity of infinities
Julia Collins
20th November 2013
Hilbert’s Hotel
David Hilbert made up some little puzzles to help people think about the rules for using
infinity as a number.
Hilbert’s hotel is a hotel which has infinitely many rooms: there is a door for each of the
numbers 1, 2, 3, 4, . . . . The hotel is so popular that every room is full.
Scenario 1: Another guest arrives asking for a room. Can we fit them in?
Answer: Yes! Ask all of the current guests to move up one room, i.e. if a guest is in
the room numbered n, they should move to room n + 1. There is always a next number, so
this is possible. Now room 1 is free, so put the new guest in there.
This shows us that 1 + ∞ = ∞. In fact n + ∞ = ∞ for any finite number n.
Scenario 2: A bus pulls up outside with infinitely many new people who each
want a room. What can we do?
Answer: The first thing to notice is that we can’t just keep moving the current guests
up one door at a time. No matter how far up we move them, we will have only created
finitely many spaces for the bus-load of people to go into.
What we need is to find two infinite collections of numbers inside the whole numbers:
the first set for the current guests and the second set for the bus guests. One possibility is
to use the even numbers and the odd numbers.
Ask the current guests to move into the room which is double the one they are currently
in, i.e. if they are in room n then they will move to room 2n. So the person in room 1 goes
to room 2; the person in room 2 goes to room 4; the person in room 3 goes to room 6, etc
etc. This leaves all the odd-numbered rooms empty for the infinite bus-load of new guests
to move into.
This shows us that 2 × ∞ = ∞, or in other words ∞ + ∞ = ∞. In fact, n × ∞ = ∞ for
any finite number n. (Puzzle: how would you fit in 5 bus-loads of people?)
1
Scenario 3: Infinitely many buses pull up, each containing infinitely many
people. Can we possibly find room for all of them?
Answer: This time we need to find infinitely many infinitely-sized collections of numbers
inside the set of whole numbers. The key to this one is the prime numbers. We need to
remember two things: firstly, that there are infinitely many prime numbers (a theorem of
the ancient Greek mathematician Euclid), and secondly that every number can be written
uniquely as a product of prime numbers. For example, 63 = 7×9 = 32 ×7 and 30 = 2×3×5.
In particular, this means that the powers of the primes are completely distinct from one
another. A number like 37 can never be equal to any power of 5 or 7.
Here’s what we do then. Step 1: move all the current guests to the even-numbered rooms
like we did in Scenario 2. Step 2: Send all the guests from bus 1 into the rooms numbered
by powers of 3, i.e. 3, 9, 27, 81, . . . . Step 3: Send all the guests from bus 2 into the rooms
numbered by powers of 5, i.e. 5, 25, 125, 625, . . . . Continue in this way, sending the guests
from bus n into the rooms numbered by powers of the nth odd prime.
Amazingly, not only have we fitted all the guests in, but we still have infinitely many
rooms still empty!
Challenge: find a different solution!
This shows that ∞ × ∞ = ∞. In fact, ∞n = ∞ for any finite number n.
[For any clever clogs who might be thinking this, it is not true that ∞∞ = ∞ - at least,
this infinity is not the same size infinity as the one you started with!]
Cantor’s diagonal argument
In the lecture we used Cantor’s diagonal argument to show that the infinity of the decimal
numbers was bigger than the infinity of the whole numbers. In case that was a bit confusing,
here is a slightly simpler version of the argument using Hilbert’s Hotel again. (Credit for
this story goes to ‘Madge’ on the website xkcd.)
Hilbert’s Hotel is hosting the Annual Bus Drivers Convention.
The theme of this year’s convention is ”seating arrangements and gender”. All bus drivers
have very strong opinions on how their infinitely many passengers must be organised down
the bus. They have a code at the front of the bus telling passengers how they have to sit.
One bus driver’s code says ”fmfmfmfmfm...” meaning that every odd seat must be occupied by a female, and every even seat must be occupied by a male. Another code says
”mmmmmmmm...” meaning that all passengers must be male. Other codes included ”fffmmmmm...”, ”mmffmmf...”, ”mmfmfmfffff...” and any other code you can think of.
To ensure a wide spread of opinion, the convention has decided that for every possible
seating code, they will invite exactly one bus driver who uses that code. In other words, for
2
any (countably) infinite sequence of f and m, there exists a bus driver who endorses that as
their preferred seating code.
Each bus driver turned up at the hotel with a bus full of passengers, each seated according
to the appropriate code. The passengers don’t need rooms at the hotel, they sleep in their
seats.
Suppose every bus driver gets a room in the hotel.
One of the bus drivers, named Bob, was not invited to the convention. Bob has the bizarre
hobby of enforcing arranged, heterosexual marriages between his passengers and passengers
of other buses. He came up with a plan for a new seating code. No-one changed buses while
the following was going on.
Bob wed one of his passengers to the first passenger of the bus driver in the first room
of the hotel. The confused and newly married passenger sat in the front seat of Bob’s bus.
Their spouse remained in their original bus.
Another passenger married the second passenger of the bus driver in the second room,
and then sat down in the second seat of Bob’s bus. Again Bob’s passenger’s spouse remained
in the bus whose driver was in the second room.
A third passenger married the third passenger of the bus driver in the third room, and
then sat down in the third seat of Bob’s bus.
This went on until all of Bob’s passengers were married and seated. Then Bob wrote
down his new code to reflect the way his passengers were seated.
Bob walked right up to the manager at Hilbert’s Hotel and said
“I have a seating code that noone else at this convention uses. I demand to attend this
convention.”
“Impossible! I made sure that every possible code has a representative bus driver in one
of our rooms!” the manager replied.
“My code is different from the bus whose driver is in the first room, because my first
passenger is married to his first passenger, so they are opposite genders. For every n, my
code is different to the bus driver in the n’th room, because my n’th passenger is married to
that driver’s n’th passenger, so they are different genders! My code is proven to be unique!”
In this argument, instead of using decimal numbers, we used infinite sequences of ‘f’ and
‘m’. This is equivalent to writing a number in binary, where there are only two choices for
each place value instead of 10. In both this argument and in the original diagonal argument,
we reach a contradiction which shows that it was impossible to list all possible sequences (or
all possible decimals), proving that we have found a bigger infinity.
3
Creating bigger infinities
In the lecture I mentioned that Cantor created infinitely many infinities, each bigger than
the last. The way he did this was by using power sets.
Let’s do an example with the set containing the numbers 1, 2 and 3. We write this as
{1, 2, 3}. The power set of a set X is the set of all subsets of X. A subset is simply any
collection of the objects in the set you first started with. If you’re thinking of a set as a
box of stuff, then you create a subset by taking out some of the elements of the first box
and putting them into another box. What are all the different ways we can do this with our
example set? They are
{}, {1}, {2}, {3}, {1, 2}, {1, 3}, {2, 3}, {1, 2, 3}
In particular, we have to count the subset where we don’t pick any objects (called the
empty set) and the subset where we pick all the objects (which is the original set again).
The important thing that Cantor noticed was that the power set of any set X is always
bigger than X. In our example, {1, 2, 3} has 3 objects but the set of all subsets has got 8
objects. This seems fairly obvious for finite sets, but it turns out that it is true for infinite
sets as well. Thus we can construct ever bigger infinities by just taking more and more power
sets of an infinite set like the whole numbers.
The power set of the whole (natural) numbers is actually the size of the decimal (real)
numbers, giving another reason why there are ‘more’ real numbers than natural numbers.
Russell’s paradox
In the lecture, we discussed the barber’s paradox:
“On an island of men, every man can decide whether or not to shave himself. There is a
barber whose job it is to shave every man who does not shave himself. But who shaves the
barber? ”
If the barber shaves himself, then by definition he ought not to, whilst if he doesn’t shave
himself then he must!
It was Bertrand Russell in 1901 who managed to turn this paradox into one about sets,
whence it it called Russell’s paradox. His formulation was
“Create the set of all sets which do not contain themselves. Is this set a member of itself ? ”
4
Again we have that if the answer is yes then it should be no, and if the answer is no then
it has to be yes!
It’s quite difficult to imagine sets which do not contain themselves, so let us look at one
more analogy.
Every library in the country is ordered to make a catalogue of its books. Some of the
libraries include the catalogue itself as one of their books, while others decide not to. The
catalogues are all sent to the National Library, where they are examined by the head librarian.
He compiles two new catalogues: the first lists all the catalogues which list themselves, whilst
the second catalogue lists all those catalogues which do not list themselves. But should this
second catalogue list itself? If it does, then this contradicts the definition of the catalogue,
whilst if it doesn’t then it needs to in order to be consistent!
With this formulation of Russell’s paradox, the edifice of Set Theory was really in danger of tumbling down. Mathematicians worked hard to make a collection of axioms and
definitions for sets so that such paradoxes and contradictions could not appear. The resolution that most mathematicians work with nowadays is called ‘Zermelo-Fraenkel Set Theory’,
which prohibits some types of collections of objects from being a set.
Gödel’s Incompleteness Theorem
How did Gödel prove his incompleteness theorem? At the heart of the matter lies a very
simple concept: the paradox inherent in the following statement.
This statement cannot be proved to be true.
If the statement is false, then it can be proved to be true, which is a contradiction.
Therefore the statement must be true. But then we know that it cannot be proved!
Gödel’s genius lay in being able to translate this sentence into logical symbols and numbers, so that it was a contradiction that we could not get out of by playing with the English
phrasing of the sentence.
Homework problem
In Hilbert’s hotel there are infinitely many janitors to attend to the rooms. The first janitor
goes along the corridor turning on the light of every room. The second janitor goes down
the corridor and turns the lights off in every second room. The third janitor goes down
the corridor flicking the light switch of every third room. And so it continues, with the nth
janitor flicking the light switch of every nth room.
5
Question: Which lights are left on at the end, and why?
Second homework problem (unrelated to the first question!): Find a method for listing
every fraction, in such a way that no fraction is listed twice. For example, if 1/2
is already in the list, then equivalent fractions such as 3/6 or 10/20 should not also appear
in the list. In the traditional proof that the fractions are countable, each fraction actually
appears in the list infinitely many times!
6
Homework solution (lightbulbs)
First, here is an 11-minute video which goes through the problem and its solution slowly:
https://www.khanacademy.org/math/recreational-math/brain-teasers
/v/light-bulb-switching-brain-teaser.
I suggest that before reading the answer, you work through the problem for the first 10
lightbulbs and see if you can spot what’s going on.
The key to solving this puzzle is to notice that the number of times a lightbulb switches
states depends on how many factors it has. For example, take the number 6. It has four
factors: 1,2,3, and 6. So on the first pass, the bulb comes on. On the second pass, the bulb
goes off. On the third pass, the bulb comes on again. Nothing happens on the 4th and 5th
passes, and then the bulb goes off again on the 6th pass.
Having noticed this, it is clear that if a lightbulb is to remain on, it must have an odd
number of factors.
But most numbers have an even number of factors, because they come in pairs. E.g.
28 = 1 × 28 = 2 × 14 = 4 × 7, so its factors are 1,2,4,7,14,28.
The numbers which have an odd number of factors are those where a factor is repeated:
e.g. 9 = 1 × 9 = 3 × 3, so its factors are 1,3,9. Such numbers are all the square numbers.
Which is a rather unexpected and lovely answer. :-)
7
© Copyright 2026 Paperzz