Hilbert’s Hotel is a classic thought experiment from set theory that highlights why infinite collections behave differently from finite ones. Imagine a hotel with rooms numbered 1, 2, 3, … and assume every room is occupied (one guest per room). In an ordinary hotel, “full” means no new guests can be admitted. In a hotel with countably infinite rooms, however, it’s possible to create vacancies using a systematic reassignment rule.
This calculator models the most common “make room” strategy for a finite
number of arriving guests k: move each existing guest from room n to room 2n.
That shift opens every odd-numbered room (1, 3, 5, …), which can then be assigned to the new arrivals.
The key idea is a one-to-one mapping (a bijection) from the original occupied rooms to a proper subset of rooms.
If an existing guest is currently in room n, move them to: newRoom = 2n
The j-th new guest (where j starts at 1) is assigned to the odd room: newRoom = 2j − 1
Here are the rules in standard mathematical form:
Existing guest reassignment
New guest room assignment
Conceptually, this illustrates the cardinal arithmetic fact that adding finitely many elements to a countably infinite set does not change its size: (for any finite k).
After reassignment:
No two guests collide because no number is both odd and even, and every existing guest’s destination (2n) is unique. In other words, this reassignment is deterministic and conflict-free.
Suppose k = 5 new guests arrive, and you choose to display the first N = 10 existing guests. The calculator will show:
Notice the structure: every original room number shows up again as an even room, while the new guests
neatly fill the odd room numbers up to 2k − 1.
The table below summarizes what changes and what stays the same.
| Aspect | Before | After using n→2n and assigning odd rooms |
|---|---|---|
| Which rooms are occupied by existing guests? | All positive integers (1, 2, 3, …) | All even rooms (2, 4, 6, …) |
| Which rooms are available for newcomers? | None (hotel appears “full”) | Odd rooms (1, 3, 5, …) are free |
| Collision risk (two guests assigned same room) | N/A | None: evens and odds are disjoint; mapping 2n is one-to-one |
| What the calculator can display | Not applicable | A finite preview of the first N existing guests plus k new guests |
| Big idea illustrated | “Full” implies no space (finite intuition) | Countable infinity allows a bijection to a proper subset |
Many explanations of Hilbert’s Hotel go further and discuss admitting countably infinite new arrivals (an infinite bus). The same even/odd strategy can be described conceptually: existing guests move to even rooms and bus passengers take odd rooms.
This page’s calculator, however, accepts a finite input k and generates a finite table preview.
The infinite-bus scenario is mentioned only as context and is not computed here.
n → 2n; newcomers are assigned 2j − 1.
The reassignment isn’t “magic”—it’s a precise mapping that reorganizes an infinite list without losing anyone.
By exploring different values of k and different display sizes, you can see how a simple rule creates space
even when the hotel starts out fully occupied.