The Hilbert hotel paradox, AKA "Hilbert's paradox of the Grand Hotel," goes as follows:
Suppose there is a hotel with infinitely many rooms, and each of them are full. Now, some guests would like to stay at that hotel. How can you allocate rooms for them?
Well, it's doable. Confused? If not, you probably know this already.
Let there be a function f: N -> N, where N is the natural numbers starting from 1, that is:
N = {1, 2, 3, ..., x}, where x converges to infinity (note: this is the only time x is defined this way).
Let g be the inverse of function f, so g: N -> N, and g(f(x)) = x.
So, how do we allocate a room? Let's say there are n new guests, where n is a finite natural number, and n > 1. We move the guests along n rooms, so the guest in room 1 goes to room (1 + n), the guest in room 2 goes to room (2 + n), and so on. By the end of it, the rooms from 1 to n inclusive are free for the n guests staying.
Here's the math behind it:
f(x) = x + n
g(x) has to reverse this operation...
g(x) + n = x
g(x) = x - n
Yay. Now, we can feed any natural number into g(f(x)), and this happens...
g(f(x)) = g(x + n) = x + n - n = x.
Now, what happens when we feed a number from 1 to n inclusive into g(x)?
g(1) = 1 - n
If there were more than 0 guests, this would be less than 1, which is not in the set N.
Here's the next bit:
g(n) = n - n = 0
0 is not in the set N.
Now, what the hell did I just say?
- The person entering room n would have had to originally be from room 0, which does not exist, therefore the person could not exist, therefore room n would end up empty.
- Room -1 does not exist either, and same can be said for any negative integer.
- As n > 1, room 1 - n does not exist either... and so on. It turns out that there are n rooms free.
The thing with infinity is that it has this weird property, that given any real, finite number x, infinity + x = infinity (x can be negative), so f(infinity) = infinity, and g(infinity) = infinity, which just happens to be in the set N. Yay, no-one gets shoved out! Woo!
So everything is fine and dandy, until infinite guests try to stay at the hotel...
Crap.
We will need a new f: N -> N, and a new g: N -> N to be the inverse.
The trick to this is to make everyone go to the room with the number which is double the room number of the room that they were staying in. So, the guest in room 1 goes to room 2, the guest in room 2 goes to room 4, 3 to 6, and so on, going on forever.
Let's define a function! Yay! I like functions!
f(x) = 2x
And let's define g(x)...
2g(x) = x
g(x) = x/2
Now, given any number x in the set N, we get something happening like this:
g(2x - 1) = (2x - 1) / 2 = x - 1/2.
x is a natural number. When we subtract 1/2, which is not a natural number, we get a number which is not a natural number, and so it doesn't appear in N. Let's try x = 1:
2*1 - 1 = 2 - 1 = 1
g(1) = 1 - 1/2 = 1/2.
This would imply that the guest who moved into room 1 originally came from room 1/2, which does not exist, so the guest does not exist, so room 1 is empty. Seeing as x just keeps on going and going onto infinity, we can shove infinitely many people in...
Now, let's try this, which exposes another weird thing about infinity, as far as I know:
f(infinity) = 2 * infinity = infinity.
2 is not negative, so we don't end up at -infinity, just infinity.
Hey! Infinity is inside the set N! We can just keep on going, and going... and no-one gets shoved out! Brilliantastic!
Anyways, I'm kinda hoping that made sense, as infinity is really weird, but apparently you can shove infinitely many people in a hotel with infinite rooms where each of the rooms are full, and they will still fit.
EDIT: Well, apparently not all the time. Suppose there are infinitely many groups of infinitely many guests each. Apparently this system will break. I highly recommend you read this story.
Let r be the number of groups of infinite guests. Now, to move them along...
f(x) = (r + 1)x
And for our inverse, which we probably won't need...
(r + 1)g(x) = x
g(x) = x / (r + 1)
r is infinity, so:
f(x) = (infinity + 1)x = infinity * x = infinity.
So, nobody ever settles down, as everyone ends up in the same damn room.
Now let's use the inverse, just for kicks, as we've already proven that nobody can get a room:
g(x) = x / (infinity + 1) = x / infinity = infinitesimal (infinity ^ -1, or 1 / infinity). This is not part of the set. So nobody came from any room given, which is a complete cock-up.
There you have it; we just broke the hotel.
EDIT 2: If you have a hotel with infinitely many buildings, each building containing infinitely many rooms...
f: (N, N) -> (N, N)
g: (N, N) -> (N, N)
f((x, r)) = (2x, 2r)
g((x, r)) = (x/2, r/2)
g((2x - 1, 2r - 1)) = (x - 1/2, r - 1/2) which each entry is not in the set N.
Theorerically, infinity * infinity = infinity^2, as there are more dimensions to infinity. Or something like that.
Of course, you can break this hotel by sending infinitely many groups of infinitely many groups of infinitely many guests, which can be fixed by... well, you get the point.
EDIT 3: Apparently I'm kinda wrong in some respect. Hopefully this sets it right...
<@James> You can break the hotel by sending infinitely many groups of infinite guestsUh, yeah.
<@James> Just not for the reasons you stated
<@James> The way it works is that you've got your infinite number of rooms, each numbered with a natural number
<@James> And you've got an infinite number of busses, each numbered with a natural number
<@James> But the infinite number of guests have to be written as real numbers for each bus
<@James> i.e.: bus 1, guest 049349013745718234078104378314739028478025780437589205...
<@James> which would be 1.049349013745718234078104378314739028478025780437589205...
EDIT 4 (how many of these damn things do I need?!): Here's a link about this subject which was recommended by the James mentioned in that last edit.
1 comment:
Hey.
So I was going over what I said on IRC, and it looks like I was as wrong as you were. The guests are just another natural cardinality, which means you can fit an infinite number of buses each with an infinite number of guests.
The way you'd do it? The most obvious, to me, would just be to map bus number -> prime number, and put guest N for each bus in room P^N. Though I suppose that there are any number of perfectly good strategies. Proof is an exercise left to the reader.
Post a Comment