
Hilbert's Hotel
Hilbert's hotel is a thought experiment about a fully occupied hotel with infinitely many rooms. It shows why infinite collections do not behave like finite ones.
以下正文同步自 Hacker News 最新,版权归原站所有,已转换为易读排版。
Hilbert's hotel is a thought experiment about a fully occupied hotel with infinitely many rooms. It shows why infinite collections do not behave like finite ones.
Imagine a hotel with infinitely many rooms, numbered:
There is one room for every positive integer, so the corridor never ends and there is no last room. The hotel is full. Room 1 has a guest, room 2 has a guest, room 3 has a guest, and so on forever.
In an ordinary finite hotel, “full” means no vacancy. If every room is occupied, there is nowhere to put anyone else. Hilbert’s hotel breaks that intuition. The manager simply asks every existing guest to move one room up:
The guest in room 1 moves to room 2, the guest in room 2 moves to room 3, the guest in room 3 moves to room 4, and so on. Nobody is thrown out, because every positive integer (n) has a next room (n + 1).
After the move, room 1 is empty. The new guest checks in.
The hotel is usually attributed to David Hilbert, who used it in his 1924-25 lectures at Gottingen to explain the strange arithmetic of infinite sets. The story became widely known through George Gamow’s popular science book One Two Three… Infinity, first published in the 1940s. The Institute for Advanced Study has a short historical note on the lecture setting, and Helge Kragh’s paper The True (?) Story of Hilbert’s Infinite Hotel traces how the example moved from Hilbert’s lectures into popular mathematics.
The single-guest version is already enough to show the main idea. A finite set cannot be put into one-to-one correspondence with itself after removing one element. If a 10-room hotel is full and every guest moves from room (n) to room (n + 1), the guest in room 10 has nowhere to go.
Try the mappings in the demo below. It only draws a finite window of rooms, but the rule continues past the edge of the screen.
The key move is not that infinity is “very large.” The key move is that countable infinity has a self-similar structure. If the rooms are indexed by positive integers, then the list:
That pairing is a bijection. Every original guest gets exactly one new room, and every room except room 1 receives exactly one original guest.
If 5 new guests arrive, the manager does not need to repeat the one-room shift five times. Everyone can move 5 rooms up at once:
The new guests take those rooms. More generally, for any finite number (k) of new guests:
This makes the first (k) rooms available. Again, nobody is displaced outside the hotel, because there is no final occupied room that falls off the end.
Now suppose infinitely many new guests arrive, one for each positive integer. The one-room shift is not enough. It opens only room 1.
Instead, the manager asks every current guest to move to double their room number:
The guest in room 1 moves to room 2. The guest in room 2 moves to room 4. The guest in room 3 moves to room 6. Every old guest lands in an even-numbered room.
That leaves all odd-numbered rooms empty:
The infinitely many new guests can now be assigned to those odd rooms. If the new guests are numbered (1, 2, 3, \ldots), guest (m) goes to:
Hilbert’s hotel is a story about cardinality: the size of a set. Two sets have the same cardinality when their elements can be paired by a bijection.
The hotel rooms are indexed by (\mathbb{N}^{+}). The occupied rooms before the new guest arrives also correspond to (\mathbb{N}^{+}).
For one new guest, the old guests move by:
This is a bijection from (\mathbb{N}^{+}) to:
The original guests now occupy a proper subset of the rooms, but there are just as many original guests as rooms in that subset.
For infinitely many new guests, split the rooms into odds and evens. The old guests use:
Both the even numbers and the odd numbers are countably infinite. The set of rooms has been partitioned into two countably infinite parts:
The cardinality of (\mathbb{N}^{+}) is written (\aleph_0) (aleph-null), the smallest infinite cardinal. Every countably infinite set has this size, so the odds, the evens, and the whole hotel all have size (\aleph_0).
That equation is not ordinary finite arithmetic. It is cardinal arithmetic. It says that two countably infinite collections, interleaved carefully, still form a countably infinite collection.
The hotel feels impossible because finite words are doing infinite work.
When we say “move every guest one room up,” we describe infinitely many moves with one rule. There is no final guest to move, no last instruction to execute, and no moment in the story where the manager walks to the end of the hallway. The thought experiment treats the hotel as a mathematical object, not as a building with time, labor, elevators, confused guests, and fire regulations.
That distinction matters. Hilbert’s hotel is not a blueprint for an impossible business. It is a way to make one property of infinite sets vivid:
Finite sets cannot do that. Infinite sets can.
If you enjoyed this post or found the content helpful, I’d greatly appreciate your support! You can contribute via GitHub Sponsors to help me continue creating tutorials, demos, and open-source experiments. Every contribution, no matter the size, makes a difference and helps keep projects like this alive. Thank you!
正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。