What is infinity? Is the number of grains of sand on a beach infinite, or the number of stars in the sky? David Hilbert, a great German mathematician, explained the concept of infinity using a hotel with an infinite number of rooms, which various numbers of guests arrive at. Could such a hotel ever be full? Welcome to Hilbert's Grand Hotel.

The great German mathematician David Hilbert was born in Königsberg (East Prussia) and is recognized worldwide as one of the most influential mathematicians of the 19th and early 20th centuries. He contributed to mathematics through concepts such as invariant theory, the axiomatization of geometry, and the notion of Hilbert space, a foundation of functional analysis. He made significant contributions to the mathematical infrastructure needed for quantum mechanics and general relativity, and some historians even claim he discovered the correct equations for general relativity before Einstein, though this has never been proven. In 1900 he presented a set of 23 mathematical problems that set the course for much of 20th-century mathematical research. Part of his work related to set theory and Cantor's transfinite numbers, explaining some of the paradoxes of infinity that Galileo had already noticed.

Hilbert's Infinite Hotel

To explain concepts related to infinity, Hilbert often used the example of a very special hotel, one with an infinite number of rooms. Hilbert imagined a hotel with infinite rooms numbered 1, 2, 3, 4, and so on to infinity. The first thing to remember is that 'infinity' does not mean 'a large number'. If it did, we could always find a slightly larger number ('a large number' + 1) that surpasses it. With that clarified, we can try to understand the paradoxes of Hilbert's Grand Hotel.

Hilbert's Infinite Hotel
David Hilbert

Infinity plus one

Imagine that one stormy night, a traveler arrives at the infinite hotel with clear intentions to stay, but finds a sign at the door saying it is full. Nevertheless, he decides to enter and see if there is any chance to spend the night sheltered from the rain. Quickly, the receptionist — possibly a consummate mathematician — finds a solution: she asks the guest in room 1 to move to room 2, the guest in room 2 to move to room 3, and so on. When all guests have moved, the first room is available for the newcomer. One might wonder what happened to the guest in the last room, since in a conventional hotel he would have been left without a place. However, in Hilbert's Grand Hotel there is no such thing as a 'last room', so that problem does not exist. Infinity always allows 'one more place' at the end.

This mechanism of moving guests to higher-numbered rooms can be applied as many times as needed to accommodate any extra number of guests. If 10, 20, or 256,345 guests arrived, it would suffice to shift each lodged person by that many rooms, and problem solved. But what would happen if, with the hotel already full, an infinite number of additional guests arrived?

Infinite hotel, infinite guests

Hilbert recounted that one day, with his hotel full of infinite guests, a representative of a travel agency arrived with a problem. He had an excursion composed of infinite tourists who needed lodging that night, and he presented this to the clever receptionist. She could not resort to the previous trick, since the guests to be moved would never finish traversing the infinitely long hallways to reach their new rooms. However, she was able to solve the problem. Simply, she asked all guests to move to the room corresponding to the result of multiplying their current room number by 2. In that way, all guests moved to an even-numbered room, and the infinite odd-numbered rooms were left free. Thus, the infinite tourists could be accommodated without problems. Isn't that amazing?

Hilbert's Infinite Hotel
Infinite Hotel

Infinite hotel and infinite passengers on infinite buses

Presented this way, it would seem that the hotel can never be filled. Let us imagine for a moment that infinite buses arrived at the Grand Hotel, each with infinite passengers. Could we accommodate them in a hotel that 'only' had infinite rooms? The problem required the intelligent receptionist to take a couple of seconds to find a solution. She adjusted her glasses, leaned toward the intercom, and asked all passengers in a room whose number was prime (numbers only divisible by themselves or by one) or any power of such a prime, to calculate the result of raising 2 to the power of their room number and move to that room. This caused some commotion among the passengers, but eventually all involved in the change reached their new room.

Having done this, the receptionist smiled with an air of superiority and assigned each bus a prime number (other than 1), and each tourist in each excursion an odd number. She had each of the new passengers calculate their room number by raising the prime corresponding to their bus to the odd number they were assigned. Since there is an infinite number of primes and an infinite number of odd numbers, an infinite number of infinite guests were accommodated in a hotel that 'only' has an infinite number of rooms.

Hilbert's Infinite Hotel
Mathematics department in Göttingen, where Hilbert worked in 1930.

Transfinite numbers

The above tale might lead one to think that there cannot be an infinity greater than another. But that is not so. Georg Cantor, another German mathematician, discovered that infinite sets do not always have the same size — or, mathematically speaking, the same cardinality. For example, the set of rationals is countable, that is, the same size as the set of naturals, while that of reals is not. Therefore, there are several infinities, each larger than the other. Among these infinities, there are even some so large that they have no correspondence in the real world.

These infinities compose the 'terrible dynasty' — as the Argentine writer Jorge Luis Borges called it — of transfinite numbers. Cantor designated these 'infinite degrees of infinity' with the Hebrew letter aleph (hence the title of Borges's famous story) and corresponding subscripts. Aleph-null (or aleph-0) is the simple infinity of natural numbers, which Hilbert used as the basis for his Grand Hotel paradoxes. Aleph-1 is the infinity of real numbers, which includes irrationals and transcendentals like pi, and is uncountable. There exist infinite 'Alephs', and they constitute a concept whose comprehension usually demands a few hours of meditation on the part of mere mortals.

Hilbert's Infinite Hotel
Hilbert's Infinite Hotel

David Hilbert died on February 14, 1943, in Göttingen, Germany, and they say his spirit often appears at night in one of the infinite rooms of his Grand Hotel.

See David Hilbert on Wikipedia.