Hilbert’s Hotel Reassignment Calculator

Stephanie Ben-Joseph headshot Stephanie Ben-Joseph

Hilbert’s Hotel (Infinite Hotel) — Reassignment Explained

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.

How to use this calculator

The reassignment rule (the “doubling trick”)

The key idea is a one-to-one mapping (a bijection) from the original occupied rooms to a proper subset of rooms.

Existing guests

If an existing guest is currently in room n, move them to: newRoom = 2n

New arrivals

The j-th new guest (where j starts at 1) is assigned to the odd room: newRoom = 2j − 1

Formulas (with MathML)

Here are the rules in standard mathematical form:

Existing guest reassignment

n \mapsto 2 n

New guest room assignment

j \mapsto 2 j 1

Conceptually, this illustrates the cardinal arithmetic fact that adding finitely many elements to a countably infinite set does not change its size: 0 + k = 0 (for any finite k).

Why this works (interpreting the output)

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.

Worked example (matches the default inputs)

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.

Comparison table: Before vs. after reassignment

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

About the “infinite bus” extension (important scope note)

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.

Assumptions & limitations

Takeaway

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.

Enter a positive integer. New guests will be assigned to odd rooms (1, 3, 5, …).
The hotel has infinitely many existing guests; this controls how many “Old Guest n” rows are shown.
Enter arrival details to generate the reassignment table.

Embed this calculator

Copy and paste the HTML below to add the Hilbert’s Hotel Reassignment Calculator (Infinite Hotel Room Shift) to your website.