67Maths

Hilbert’s hotel

A hotel with a room for every counting number is full, and a new guest arrives. Make room, fit a bus with infinitely many seats, count the fractions and see why one infinity cannot be counted.

Lobby

A hotel with no last room

Picture a hotel with a room for every counting number: room 1, room 2, room 3, and so on for ever. Tonight every room is full. A new guest arrives. Is there a room?

There is, and finding it shows how infinity behaves. Four floors to try. Move everyone along to fit one more guest. Fit a whole bus with infinitely many seats. Count the fractions. Then see why one kind of infinity cannot be counted at all. Without a script each floor shows one picture or table.

First floor

One more guest

The hotel is full, but it has no last room. So the manager asks each guest to move one door along: the guest in room 1 goes to room 2, the guest in room 2 goes to room 3, and in general the guest in room n goes to room n plus 1. Nobody is left without a room, because there is always a next room. Room 1 is now empty.

Slide the number of new guests. For k new guests, everyone moves k doors along and rooms 1 to k are free. For a finite hotel this trick fails, because the last guest would have nowhere to go. That is the difference.

1new213243546576879810911101211and so on, with no last room
Where a guest goes when one new guest arrives
Guest in roomMoves to room
12
23
100101
1,000,0001,000,001

One new guest arrives. Everyone moves one door along, so the guest in room 1 goes to room 2, and room 1 is free.

Second floor

A bus with infinitely many seats

Now a bus arrives with a passenger for every counting number, seat 1, seat 2, seat 3 and on. Moving everyone one door along does not help. So the manager asks each guest to double their room number: the guest in room n moves to room 2n. Every guest still has a room, and now only the even rooms are taken. All the odd rooms are free.

Passenger m on the bus takes room 2m minus 1, so seat 1 gets room 1, seat 2 gets room 3, seat 3 gets room 5. Everyone fits. Pick a step, and type a number to see where that guest or passenger ends up.

1B1213B2425B3637B4849B510511B6126and so on, with no last room
Where a guest and a bus passenger with the same number go
NumberGuest goes to roomPassenger goes to room
121
243
365
1,0002,0001,999

Guest 5 moves to room 10. Passenger 5 takes room 9.

Third floor

Counting the fractions

Between any two fractions there is another one, so it seems there are far too many to count. But they can be lined up. Write the fractions p over q in a staircase, where p plus q is 2 in the first row, 3 in the next, and so on. Walk along the rows in order, and skip any fraction that is not in lowest terms, such as 2 over 4, because it is the same number as 1 over 2. Every positive fraction gets a place on the list, exactly once.

Slide to walk the list, or ask for the place of a fraction. Counting this way, the fractions fit in the hotel as well. The same walk, with p and q read as a room and a floor, shows that infinitely many buses of infinitely many seats would fit too.

1/11/22/11/32/23/11/42/33/24/11/52/43/34/25/11/62/53/44/35/26/11/72/63/54/45/36/27/11/82/73/64/55/46/37/28/1
The first places of the list of fractions
PlaceFraction
11/1
21/2
32/1
41/3
53/1
61/4
72/3
83/2

Every fraction in lowest terms gets one place. The first is 1/1, the second is 1/2 and the third is 2/1.

Fourth floor

A list that always misses

Not every infinite collection fits in the hotel. Take all the endless strings of 0 and 1. Suppose someone writes them in a list, line 1, line 2, line 3, and claims it has them all. Make a new string like this: at place 1 write the opposite of line 1’s first digit, at place 2 the opposite of line 2’s second digit, and so on down the diagonal. The new string differs from line 1 at place 1, from line 2 at place 2, and from every line k at place k. So it is on no line. Any list misses something.

This is Cantor’s diagonal argument. The picture shows only eight lines of eight digits, so it is a small copy of the idea. The real argument has endless lines and endless digits. Click a digit to flip it, or make a new list. The new string always escapes.

A list of eight strings of eight digits and a ninth string that differs from line k at place k
Line 100111000
Line 211001100
Line 301010100
Line 400110111
Line 511111000
Line 600010001
Line 711000010
Line 801001111
New10100100

The new string is 10100100. It differs from line 1 at place 1, from line 2 at place 2 and so on, so it is not on the list.

Key takeaways

  1. A hotel with a room for every counting number can take one more guest: everyone moves one door along.
  2. It can take a bus with infinitely many seats too: everyone doubles their room number, and the odd rooms are free.
  3. The positive fractions can be listed one after another, so they can be counted as well.
  4. The endless strings of 0 and 1 cannot be listed. For any list, the diagonal gives a string that is missing from it.
  5. So some infinities are bigger than others. This is Cantor’s result, and the hotel is a way to feel the difference.

Sources

Some of these sites could not be opened while this page was written, so some facts were checked through search results that quote them. The hotel with a room for each counting number, the shift by one door, the doubling to even rooms with odd rooms for the bus, Hilbert telling it in a lecture of January 1924 that he did not publish, Gamow popularising it in 1947, the zigzag count of the fractions skipping those not in lowest terms, Cantor’s first proof of 1874 that the real numbers cannot be counted and the diagonal argument of 1891, Galileo’s squares of 1638 and Dedekind’s definition of 1888 each appeared in at least two places. Sources differ a little on the date of the lecture and of Cantor’s proofs, and the page gives the dates most of them agree on. The page does not use the name aleph-null, which the sources checked did not give. The drawing of the list is only eight by eight, so it is a small copy of the endless argument. Every sum is computed on the page.