Hacker News new | past | comments | ask | show | jobs | submit login

no, n+3 is also full. See? Why do you get to win that back-and-forth and not me? After all, the problem stated that all rooms are full, even N+3, 4, 5, etc. Why do you get to construct a new room without also constructing a new pre-existing occupant?



You don't have to do that. Just use following simple steps (assuming that the hotel rooms are all along one infinitely long corridor):

1. Have all guests of the hotel simultaneously pack their things and move out of their room onto the hallway.

2. Have all guests simultaneously move along the hallway to be standing in front of the room next door (in the same direction, obviously).

3. Have all guests simultaneously move into the room they are now standing in front of.

The first room is now empty, with nobody having had to leave the hotel, and every guest still has his/her own room.


Thanks. I can understand that.


[deleted]


You don't need a hallway as a holding area. Everyone in the hotel simultaneously moves one room up. Talking about it sequentially as "1 moves to 2 and 2 moves to 3 etc." is convenient for describing it, but the process does not actually happen sequentially; otherwise it would take an infinite amount of time. But since each person is capable of moving at the same time, and since their movements need not interfere with each other, the whole process can happen instantly.

If you are visualizing a traditional hotel, then this means that everyone walks out of their room into the hallway and then moves one door down. But the hallway is irrelevant. The rooms could instead be directly connected by doors, and everyone would still just simultaneously move to the next room. No holding area needed.


One more question. What if the rooms are not in an infinitely long hallway (with or without interconnecting doors), but a ring of infinite circumference? Or is there such a thing?


It depends on what you mean by "ring of infinite circumference", because you're going to have to discard some conventional ideas associated with a "ring" in order to make the definition work. If you just mean "the rooms extend infinitely in both directions", then yes, the same reasoning applies; we'll just have an arbitrary "room 0", and then "room -1" on one side and "room 1" on the other. Then you tell everyone in a negative room to move to room n-1 and everyone in a positive room to move to room n+1.

However, this definition does away with the idea of a ring meeting itself on the other side. We cannot say that "room -∞" is the same as "room ∞" for example, because there neither of those rooms actually exist.


When dealing with infinities you need to be really precise, and very careful. When you ask about "a ring of infinite circumference" I have to ask - what do you mean by that? The only thing I can think of that's related is a "circle if infinite radius", but the usual interpretation of that is a straight line. Then we're back to an infinitely long hallway.

So - what do you mean?


That's kind of my question. Is there a logically consistent concept of an infinite ring where the "first" room is moved into by the "last" occupant, therefore making the problem dependent on the configuration of the rooms? Or is such a thing inherently finite?


It's very much a case of "it depends".

Firstly, the whole point of the hotel story is to talk about addition of cardinals. You are moving off topic and to some extent "bike-shedding" - discussing something other than the real point.

In particular, if there are infinitely many rooms then you must be able to create an embedding of the counting numbers into it. Regardless of whether or not that accounts for all the rooms, you then have an infinite chain, one without a concept of a "last room".

It is possible to have infinitely many cycles, and in those cycles the "last room" is followed by the first room, but there are infinitely many of these cycles, so we can order them in a different way, and we get back again the infinite chain with no "last room".

And this matters. We say that two sets are the same size if we can create a matching between them, and we say they are of different sizes of there is no matching. Be careful. Just because your first attempt at a matching doesn't work, that doesn't mean there isn't one. So in this case of the infinite number of rooms, just because one arrangement seems not to work, that doesn't mean that no arrangement will work.

And indeed, the very definition of the number of rooms being infinite means there is a way to arrange the movements of the existing guests to ensure that there are no "last room" problems.


Thanks. Great explanation.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: