Skip to content
All apps

Hilbert's Hotel

About this app

The hotel with infinitely many rooms is full — and still admits 1, n or infinitely many new guests. Three scenarios as a 3D move.

The thought experiment

Hilbert’s hotel has countably infinitely many rooms numbered 1, 2, 3, …, and every one is occupied. A new guest can still be accommodated: every guest moves from room k to room k + 1, and room 1 becomes free. The thought experiment is attributed to David Hilbert and shows that infinite sets follow different rules from finite ones. An infinite set can be the same size as one of its proper subsets. The underlying idea is equal cardinality: two sets have the same size if there is a one-to-one correspondence between them.

The three moves

The app animates three stages in 3D. In the first, one guest arrives and everyone moves up one room. In the second, a group of n guests arrives; every guest moves from room k to room k + n, freeing rooms 1 to n. In the third, a bus with infinitely many guests arrives: every guest moves from room k to room 2k, which frees all odd-numbered rooms. The info panel describes the mapping for each case.

What to look for

Pick a scenario, set the group size between 2 and 12 for “+n guests” and start the move. Notice that no guest has to leave and everyone keeps a room of their own; the maps k → k + 1, k → k + n and k → 2k are one-to-one. This fails in a finite hotel, because the guest in the last room would have nowhere to go.

Frequently asked questions

What is Hilbert’s hotel paradox?
Hilbert’s hotel is a thought experiment about a hotel with infinitely many rooms, all of them occupied. By moving the guests around cleverly, more guests can still be accommodated, even infinitely many. It illustrates that infinite sets behave differently from finite ones.
How can a full infinite hotel fit infinitely many new guests?
Every current guest moves from room k to room 2k, an even-numbered room. That frees all odd-numbered rooms, of which there are again infinitely many. The new guests are given rooms 1, 3, 5, and so on.
What does countably infinite mean?
A set is countably infinite if its elements can be listed without gaps, meaning there is a one-to-one correspondence with the natural numbers. Examples are the even numbers, the integers and the rational numbers. The real numbers, by contrast, are uncountable.
What can I try in this app?
You pick one of three scenarios (+1 guest, +n guests, +∞ guests) and start the move as a 3D animation. For +n guests you set the group size. An info panel explains the rule by which guests change rooms in each scenario.

Subject: Visual proofs

More from Visual proofs

A VisuApp by heyprof: interactive, free in your browser, no sign-up. What is a VisuApp? · All apps