# Infinite Hotel Solution

A while ago now, Veritasium released a video about Hilbert's paradox of the Grand Hotel. As he presents it, it's a mathematical thought experiment about how a hotel with infinite rooms could run out of vacancies.

(Youtube) How An Infinite Hotel Ran Out Of Room

(Wikipedia) Hilbert's paradox of the Grand Hotel

I think I saw the video on the day of release. The solution seemed kind of obvious to me at the time. I wrote up a comment explaining my answer, but I never posted it because I was too lazy to make a Youtube account for it.

This was before I realized what a shill Veritasium is. The video misrepresents infinity. It was created as setup for follow-up video clickbait.

It would be irresponsible to link a Veritasium video without also linking the Tom Nicholas video. It highlights a trend I was beginning to see in Veritasium's videos soon after the one above, once I started really watching him. His willingness to avoid applying critical thinking to selective topics. (I stopped watching after the video where he gives a platform to a conspiracy theorist selling a book by "interviewing" them with no challenging questions. It was so transparent.) I was so glad to see someone else had also taken notice. It happens in way more than the one video, but the focused deep dive is really worth the look to understand how corporate propaganda manifests in the media you consume.

(Youtube) Veritasium: A Story of YouTube Propaganda

I figured I'd archive my response to Veritasium's video here anyways. I am not the first to attempt a solution, which I found out by taking one look at Wikipedia after I wrote it up. This should have been apparent to Veritasium if he researched the problem, instead of suddenly claiming that "no, it's impossible because non sequitur." That wouldn't have fit the narrative of his next video claiming that math is "broken".

---

Here's my attempt at a solution.

It seems that the issue is not that the hotel has run out of rooms (there are infinite rooms), but that we don't have a way to keep track of how an infinite number of guests fit into those rooms. Otherwise, when we discover a new name, we could just have everyone move down one room like before and add them to the front.

There are some predictable factors. We know the names are always an infinite string of characters with either A or B in their name, and we can assume that no names repeat.

There are not more combinations of letters than there are more combinations of numbers, but we can simplify this by treating A and B as numbers. Since there's only ever the two values, we can treat these names as binary, where A = 0 and B = 1. Now everyone's name is an infinitely long string of 0 and 1, which are numbers of infinite size.

Next, we can change the labels on the doors from base 10 to binary as well.

Door 1 = 1

Door 2 = 10

Door 3 = 11

Door 4 = 100

...and so on, for infinity.

Since we know there are an infinite number of doors, we also know that there is a door to match every possible combination of 0 and 1. When we need a longer string, we simply move further down the hall until we've found that door of the right length. With an infinitely long hall, we can do this forever.

Now that both the guests and the rooms are counted using the same method, we can assign a room to each guest by giving them a room with a number matching their name.

Our friend "ABBA..." then would find room 0110... (simplified to 110...), then keep going to match each digit. Since their name is infinite in length, it will take them infinite time to find their room, but that's okay. We now know with infinite rooms, there will be a room number matching their name.

Now let's assume it is possible for these infinite names to repeat. We can't have two people share the same room. We may not know where the name ends, but we always know where it starts. So when a repeat name occurs, we can add a counter to the front of their name.

We will always assume that the first person to use a name has an implied 0 in front of their name (or infinite number of 0, to be pedantic), which is ignored for convenience. This infinitely sized buffer can then be incremented by 1. This allows for two ABBAs as "0"0110... and "1"0110....

What if someone already has the name of 10110...? Then that's a duplicate name, and we increment the counter by one more. ("10"0110...) We can't run out of space doing this, because numbers are infinite.

And it gets better. We don't even need to use binary. We can use the same number assignment system using our standard base 10. We know that in base 10, if we keep counting long enough, we encounter 1 (2 3 4 5 6 7 8 9) 10 11... 100... and so on. The binary sequence also exists in the base 10 sequence. And since this is an infinite number sequence, we know the pattern will repeat eternally. It even has exponentially increasing gaps between each room, showing that we have infinitely more rooms than we have infinite guests.

Now that we're in base 10, this means we can accommodate people with names with up to 10 unique characters in their name. Because just like in binary, we can substitute those letters into numbers and assign them their room based on that. But why stop there? Let's use base 12. Or base 26. How about base 62? 256? There's no limit. Let's try base infinity.

Now the hotel can accommodate guests with names that have an arbitrarily complex naming convention and length, and we will always know exactly which room they went into. No longer is the hotel out of space.

/gemlog/