Problem #90 MEDIUM
The Hotel With Infinite Rooms — All Full, Always Accommodating
Paradox Infinity Cantor Math
Problem Statement
A hotel has infinitely many rooms numbered 1, 2, 3, ... and every room is occupied. A bus arrives with infinitely many passengers — one for each positive integer. The hotel manager accommodates all of them without evicting anyone. Then a second bus arrives — with as many passengers as there are pairs of positive integers. The manager accommodates them too. Then someone points out that the number of rational numbers is the same as the number of natural numbers. How? And can the hotel accommodate one guest for every rational number?
Answer & Quick Explanation
Think you've got it? Click below to check your answer.
Yes — the hotel accommodates the rational-number bus. Rationals are countably infinite (same cardinality as naturals) via Cantor's diagonal grid bijection. Move current guests to even rooms; new passengers fill odd rooms using the diagonal listing of rationals. Real numbers (uncountable) cannot be accommodated.
WOW Moment:
- There are infinitely many even numbers. There are infinitely many natural numbers. These two infinities are EXACTLY THE SAME SIZE.
- There are infinitely many fractions between 0 and 1 alone. Yet the total count of ALL rational numbers is the same as the count of natural numbers.
- The number of points on a line segment 1 cm long equals the number of points on a line segment 1 km long. Also equals the number of points in all of infinite 3D space.
- Some infinities are bigger than others. The infinity of real numbers is strictly larger than the infinity of natural numbers. Cantor proved this — and it nearly drove him mad.
Detailed Editorial Solution
Want to see the step-by-step breakdown? Click below to reveal the editorial.
This problem explores Cantor's groundbreaking work on the sizes of infinity (cardinality). In finite arithmetic, a part is always smaller than the whole. In infinite arithmetic, a subset can have the exact same size as the parent set.
How the hotel accommodates the guests:
1. One infinite bus (countably infinite passengers: P1, P2, P3, ...):
The manager tells the guest in room n to move to room 2n. This moves all current guests to the even-numbered rooms (2, 4, 6, ...), which are infinite.
This leaves all odd-numbered rooms (1, 3, 5, ...) vacant. The manager places passenger Pk from the bus into room 2k - 1. Everyone is accommodated!
2. A bus of pairs of positive integers (each passenger represented by a pair (a, b)):
This is equivalent to showing that the set of all pairs of positive integers is countable. We can arrange all pairs in a two-dimensional grid:
(1,1) (1,2) (1,3) ...
(2,1) (2,2) (2,3) ...
(3,1) (3,2) (3,3) ...
If we try to list them row-by-row, we will get stuck on the first infinite row and never reach the second. Instead, we list them diagonally:
Diagonal 1 (sum = 2): (1,1)
Diagonal 2 (sum = 3): (1,2), (2,1)
Diagonal 3 (sum = 4): (1,3), (2,2), (3,1)
This diagonal path covers every single pair in the grid in a definite, ordered sequence: 1st, 2nd, 3rd, ... Since we can list them as a sequence, they are countably infinite (size aleph-null). The manager can map this sequence to the vacant odd rooms.
3. The rational numbers:
Every rational number can be written as a fraction p/q, where p and q are integers (q ≠ 0). Since the set of all pairs of integers is countable (by the diagonal argument above), the set of all rational numbers must also be countable. We simply list the fractions using the diagonal path, skipping any duplicates (like 1/2 and 2/4).
To explain the WOW part:
This leads to the mind-boggling conclusion that there are exactly as many fractions in the universe as there are whole numbers. You can match every single fraction (even though there are infinitely many between 0 and 1) to a unique positive integer.
However, this does not work for the real numbers (which include irrationals like √2 and π). Cantor's diagonal argument proves that the real numbers are uncountably infinite — a fundamentally larger size of infinity. If a bus of real numbers arrived, the manager would have to turn them away.