Hilbert's Hotel Paradox

Explore Hilbert's Hotel Paradox with this interactive calculator. Choose from three scenarios -- finitely many new guests, infinitely many new guests, or infinitely many buses -- and see how the infinite hotel accommodates everyone.

Calculate

About This Calculator

Hilbert's Hotel Paradox is a famous thought experiment conceived by mathematician David Hilbert in 1924 to illustrate the counterintuitive nature of infinite sets. The paradox imagines a hotel with countably infinite rooms (numbered 1, 2, 3, ...), all of which are occupied. When new guests arrive, the manager can always find room by strategically reshuffling the existing guests. This interactive calculator lets you play the role of the hotel manager and explore three increasingly complex scenarios.

For a finite number of new guests, the solution is straightforward: every existing guest moves up by N rooms, freeing the first N rooms. For infinitely many new guests arriving on a single bus, the manager doubles every guest's room number (n -> 2n), freeing all odd-numbered rooms for the newcomers via the formula (2 x seat) - 1. The most complex scenario -- infinitely many buses each carrying infinitely many passengers -- uses the prime power method: current guests move to powers of 2 (n -> 2ⁿ), bus k is assigned the k-th prime number, and a passenger in seat s on bus k gets room (prime_k)^s. The fundamental theorem of arithmetic guarantees this mapping is bijective (one-to-one and onto).

Hilbert's Hotel was instrumental in popularizing Georg Cantor's theory of transfinite numbers, which had been met with skepticism by many mathematicians at the turn of the 20th century. By presenting a concrete (if imaginary) scenario, Hilbert made the abstract concept of different sizes of infinity accessible to a broader audience. The paradox demonstrates that a countably infinite set has the same cardinality as certain proper subsets of itself -- a property that can never hold for finite sets.

To use this calculator, select your scenario from the dropdown, enter the room numbers and guest counts, then click Calculate. The results will show the new room assignments for both existing and arriving guests, along with an explanation of the mathematical principle being applied.

Frequently Asked Questions

What is Hilbert's Hotel Paradox?

Hilbert's Hotel Paradox is a thought experiment by mathematician David Hilbert that illustrates the counterintuitive properties of infinite sets. Imagine a hotel with infinitely many rooms numbered 1, 2, 3, and so on. Even when the hotel is completely full (every room occupied), it can still accommodate any number of new guests -- finite or infinite -- by shifting existing guests to different rooms. This paradox demonstrates that infinite sets can be put into a one-to-one correspondence with proper subsets of themselves, a key concept in set theory and transfinite mathematics.

How can a full hotel accommodate more guests?

For a finite number of new guests, the hotel manager shifts every existing guest to a room number increased by the number of new guests. For example, with 5 new guests, the guest in room 1 moves to room 6, room 2 to room 7, and so on. The new guests then occupy the emptied rooms 1 through 5. For infinitely many new guests, the manager moves each existing guest to double their current room number (room n -> room 2n), freeing the odd-numbered rooms for new guests.

What formula is used for infinitely many new guests?

When one bus of infinitely many new guests arrives, each existing guest in room n moves to room 2n (doubling). The new guests are assigned odd-numbered rooms: a guest with seat number s gets room (2 x s) - 1. Since even and odd numbers are both countably infinite, this one-to-one mapping accommodates everyone without overlapping rooms.

What is the prime power method for infinitely many buses?

For infinitely many buses each carrying infinitely many passengers, the manager uses the prime power method. Current guests move to powers of 2 (room n -> 2ⁿ). The k-th bus is assigned the k-th prime number (2, 3, 5, 7, 11, ...). A passenger with seat s on bus k gets room (prime_k)^s. Because prime powers are unique (by the fundamental theorem of arithmetic), no two guests ever get the same room number, guaranteeing a perfect one-to-one correspondence.

What does Hilbert's Hotel prove about infinity?

Hilbert's Hotel demonstrates that a countably infinite set (the hotel rooms) has the same cardinality as a proper subset of itself (e.g., the even-numbered rooms or the odd-numbered rooms). This means that the concept of 'size' for infinite sets behaves differently than for finite sets. It was a key contribution to Georg Cantor's theory of transfinite numbers, showing that all countably infinite sets have the same cardinality, denoted ℵ0 (aleph-null).

Can Hilbert's Hotel accommodate uncountably infinite guests?

No, the classic Hilbert's Hotel can only accommodate countably infinite guests (guests that can be numbered 1, 2, 3, ...). This is because the hotel itself has countably infinite rooms. An uncountably infinite number of guests (like the real numbers) cannot be fit into countably infinite rooms, as proven by Cantor's diagonal argument. However, the hotel can handle any number of countably infinite layers, such as infinitely many buses each carrying infinitely many passengers.

How is Hilbert's Hotel related to Galileo's Paradox?

Both paradoxes challenge our finite intuition about size and quantity. Galileo's Paradox (1638) noted that natural numbers and perfect squares can be paired one-to-one despite squares appearing less numerous. Hilbert's Hotel (1924) generalizes this idea by showing that a fully occupied infinite hotel can still accommodate new guests, demonstrating that infinite sets can be placed in a bijection with proper subsets of themselves -- a defining property of infinite sets.

How do I use the Hilbert's Hotel Paradox calculator?

Select a scenario from the dropdown menu. For 'Finitely Many New Guests', enter the current guest's room number and the number of new guests to find their new room. For 'Infinitely Many New Guests', enter the current guest's room and optionally a new guest's seat number to see both room assignments. For 'Infinitely Many Buses', enter the current guest's room, a bus number, and a seat number to calculate room assignments using the prime power method.