• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 10:28
CET 16:28
KST 00:28
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
RSL Revival - 2025 Season Finals Preview8RSL Season 3 - Playoffs Preview0RSL Season 3 - RO16 Groups C & D Preview0RSL Season 3 - RO16 Groups A & B Preview2TL.net Map Contest #21: Winners12
Community News
Weekly Cups (Dec 1-7): Clem doubles, Solar gets over the hump1Weekly Cups (Nov 24-30): MaxPax, Clem, herO win2BGE Stara Zagora 2026 announced15[BSL21] Ro.16 Group Stage (C->B->A->D)4Weekly Cups (Nov 17-23): Solar, MaxPax, Clem win3
StarCraft 2
General
RSL Revival - 2025 Season Finals Preview Weekly Cups (Dec 1-7): Clem doubles, Solar gets over the hump Chinese SC2 server to reopen; live all-star event in Hangzhou Maestros of the Game: Live Finals Preview (RO4) BGE Stara Zagora 2026 announced
Tourneys
StarCraft2.fi 15th Anniversary Cup RSL Offline Finals Info - Dec 13 and 14! Tenacious Turtle Tussle 2025 RSL Offline Finals Dates + Ticket Sales! Sparkling Tuna Cup - Weekly Open Tournament
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 504 Retribution Mutation # 503 Fowl Play Mutation # 502 Negative Reinforcement Mutation # 501 Price of Progress
Brood War
General
FlaSh on: Biggest Problem With SnOw's Playstyle How Rain Became ProGamer in Just 3 Months [BSL21] RO8 Bracket & Prediction Contest BGH Auto Balance -> http://bghmmr.eu/ BW General Discussion
Tourneys
[ASL20] Grand Finals [BSL21] RO8 - Day 2 - Sunday 21:00 CET [BSL21] RO8 - Day 1 - Saturday 21:00 CET Small VOD Thread 2.0
Strategy
Simple Questions, Simple Answers Game Theory for Starcraft Fighting Spirit mining rates Current Meta
Other Games
General Games
ZeroSpace Megathread Stormgate/Frost Giant Megathread Dawn of War IV The 2048 Game Path of Exile
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
Mafia Game Mode Feedback/Ideas Survivor II: The Amazon Sengoku Mafia TL Mafia Community Thread
Community
General
Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread US Politics Mega-thread YouTube Thread European Politico-economics QA Mega-thread
Fan Clubs
White-Ra Fan Club
Media & Entertainment
Anime Discussion Thread [Manga] One Piece Movie Discussion!
Sports
2024 - 2026 Football Thread Formula 1 Discussion
World Cup 2022
Tech Support
VFFS Machine: An Efficient Solution for Modern Pac Computer Build, Upgrade & Buying Resource Thread
TL Community
TL+ Announced Where to ask questions and add stream?
Blogs
How Sleep Deprivation Affect…
TrAiDoS
I decided to write a webnov…
DjKniteX
James Bond movies ranking - pa…
Topin
Thanks for the RSL
Hildegard
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1706 users

Hotel Infinity

Blogs > Slithe
Post a Reply
Slithe
Profile Blog Joined February 2007
United States985 Posts
January 27 2008 11:40 GMT
#1
The math buffs out there have probably read some variation of this story before. It's a story that somewhat explains the nature of infinity as it is defined by mathematics.

So there exists this place called the Hotel Infinity. It's a hotel that has an infinite number of rooms. However, currently all the rooms are full. A man comes in and asks the desk manager, "Do you have any rooms available for me?" The desk manager replies, “All our rooms are full, but I'll see what I can do."

The manager thinks for a while, and then grabs the intercom and makes the announcement to all the guests, "Attention, if you are currently in room N, please move to room N+1." So the guest in room 1 moved to room 2, the guest in room 2 moved to room 3, etc. After the shift, the manager moved the man into the newly vacant room 1.

The next day, another man comes in and asks the desk manager, "Do you have any room for me and my infinite friends outside?" The desk manager once again replies, "All our rooms are full, but I'll see what I can do."

So the manager again thinks for a while and then makes an announcement to the guests, "Attention, if you are currently in room N, please move to room 2*N." So the guest in room 1 moves to room 2, the guest in room 2 moves to room 4, etc. After the shift, all the odd numbered rooms became vacant, and the manager was able to accommodate all of the man's friends.

On the third day, another man comes in and tells the desk manager, "Outside, I have an infinite number of buses, each with an infinite number of people. Do you have any rooms for us?" The desk manager once again replies, "All our rooms are full, but I'll see what I can do."

So once again after some thought, the manager announces to the hotel, "Attention, if you are currently in room N, please move to room 2^N." So the guest in room 1 moves to room 2, the guest in room 2 moves to room 4, etc. The manager then proceeds to label each of the infinite buses with a different prime number, starting from 3 and going up. Because there are infinite prime numbers, every bus can get a number. The people inside each bus are also counted off starting from 1 and going up. The manager then tells all the people to go to room B^N, where B is their bus's number, and N is their personal number. Once again, the manager was able to accommodate all of the guests.

So the moral of the story is, infinity is pretty awesome.

There was another variation of the third example I heard that, instead of using prime numbers, uses the fact that the 1-dimensional integer plane and the 2-dimensional integer plane are of the same cardinality.

Basically, you can just enumerate all the buses using natural numbers, and enumerate the people in each bus using natural numbers as well. The bus number is the x-coordinate and the person number is the y-coordinate. You then map the corresponding (x,y) pair to some room number and you're done. The interesting part of course is, how you map 2-d to 1-d?

*****
Lemonwalrus
Profile Blog Joined August 2006
United States5465 Posts
Last Edited: 2008-01-27 14:34:51
January 27 2008 14:23 GMT
#2
I consider myself a smart man, or at least above average, and I am in a major that involves a lot of math, and still to this day cannot wrap my head around the concept of infinity.

Edit: Cool story though, thanks for sharing.
Zortch
Profile Blog Joined January 2008
Canada635 Posts
January 27 2008 16:03 GMT
#3
Cool story, that deals with countable infinities, like the natural or even rational numbers.
What gets really cool is the uncountable sets like the real numbers.
Stuff like...there are as many real numbers in the interval [0,1] as there are in the whole real line.

Math ftw ^^
If someone showed up with uncountable many people the hotel would be in trouble xD
Respect is everything. ~ARchon
decafchicken
Profile Blog Joined January 2005
United States20088 Posts
January 27 2008 16:32 GMT
#4
infinity and chemistry are the only things that make my brain hurt
infinity is infinitely cooler than chemistry though.
how reasonable is it to eat off wood instead of your tummy?
Slithe
Profile Blog Joined February 2007
United States985 Posts
January 27 2008 18:45 GMT
#5
Oh yeah Zortch I totally agree that the uncountable sets are very cool. Things like Cantor's DIagonal Argument are just so simple, yet so genius, I'm just left in awe at it's beauty.
Luddite
Profile Blog Joined April 2007
United States2315 Posts
January 27 2008 18:53 GMT
#6
I've heard this story before, although in a slightly different form. I still think it's cool though.

I don't get why you have to number the busses with prime numbers, though. Why can't you just use integers, since those are infinite too.
Can't believe I'm still here playing this same game
Lemonwalrus
Profile Blog Joined August 2006
United States5465 Posts
January 27 2008 19:03 GMT
#7
If integers were used, several (read: infinite) rooms would have more than one person residing in them.
For instance person 4 on bus 2, and person 2 on bus 4, or 2^4=16 and 4^2=16, would both be in room 16. Not to mention they would be in a room already occupied by someone that was already in the hotel to begin with. Using the prime numbers, however, avoids this, due to what makes a prime number a prime number, namely, indivisibility. (One of you math whizzes please confirm or deny this answer, as I am not absolutely sure that I am right.)
Slithe
Profile Blog Joined February 2007
United States985 Posts
Last Edited: 2008-01-27 19:50:46
January 27 2008 19:47 GMT
#8
Prime numbers were used in this case because their properties are very useful for what we're trying to do. Lemonwalrus is correct that we cannot just start taking integers to the power, because we will have overlapping values. However, there is a way using just integers, which I'll explain after describing the reasoning for using primes.

The idea behind using prime numbers is that any two prime numbers taken to some positive power will never be equal, because of the fact that they're prime numbers. so 3^x and 5^y will never be equal for any x and y. Now this is very useful, because you know that no people from two separate buses will have the same room. And since there are infinite prime numbers, and each bus is given a different prime number, we are assured that there is no overlap.

Now, to explain the method that uses integers. First, we can think of the room numbers as a 1-dimensional coordinate system or a line, that just has all the positive integers from 1 to infinity. Then, we think of each bus having a positive integer value, and each person in the bus having a positive integer value. We can imagine this as being a 2-dimensional coordinate system or a plane.

Now we don't take the bus number to the power of the person's number like in the prime solution, because that will definitely have overlap. We use a different mechanism that kind of looks like a spiral. Hopefully this next part makes sense.

[image loading]

If you look at this picture, you can see that we have a 2-d coordinate system, and I've labeled the points of the coordinate system with numbers in a spiral type pattern. Point (0,0) has value of 0, point (1,0) has a value of 1, point (1,1) has a value of 2, point (0,1) has a value of 3, etc. Now this construction shows that we can map the infinite 2d plane to an infinite 1d line, and vice versa. What this means for the hotel manager is that he takes the bus number as the x-value, the person number as the y-value, and puts him in the room that the spiral indicates. So for example, Bus number 3, person number 1 corresponds to the coordinate (3,1), which means that his room number is 11. Now there is the issue of the current guests of the hotel. This is dealt with by pretending that they are all part of a Bus with a Bus number of 0.

This construction also shows that the set of rational numbers is also a countable set, and is equivalent to the set of natural numbers. By definition, any rational number can be represented as a fraction, with an integer numerator and denominator. Thus, if we just use the x-axis as the numerator and the y-axis as the denominator, we can map rational numbers to natural numbers.
B1nary
Profile Blog Joined January 2008
Canada1267 Posts
January 27 2008 23:47 GMT
#9
I ran across a similar problem in computer science class. The goal was to construct a stream to display all elements of an infinite matrix. I can't exactly remember the solution though =(... something about recursively interweaving the rows of the matrix.
BottleAbuser
Profile Blog Joined December 2007
Korea (South)1888 Posts
January 28 2008 04:15 GMT
#10
Slithe, you are awesome. More!
Compilers are like boyfriends, you miss a period and they go crazy on you.
Please log in or register to reply.
Live Events Refresh
Wardi Open
12:00
#65
MaxPax vs ByuNLIVE!
WardiTV1118
OGKoka 416
Harstem319
IntoTheiNu 12
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Lowko431
OGKoka 416
Harstem 319
ProTech130
LamboSC2 94
StarCraft: Brood War
Calm 5668
Rain 1860
Bisu 1415
GuemChi 1176
Larva 999
Light 968
Stork 783
firebathero 675
Jaedong 601
Hyuk 554
[ Show more ]
Mini 532
EffOrt 416
Hyun 389
Sharp 321
ZerO 295
Pusan 284
ggaemo 282
Shuttle 265
Snow 259
actioN 246
hero 154
Rush 150
BeSt 127
Zeus 82
Sea.KH 67
Movie 44
Free 25
JYJ 25
Bale 24
Rock 23
soO 19
Shinee 19
Mong 18
910 16
Terrorterran 16
Shine 8
Dota 2
Gorgc6516
singsing4044
qojqva1955
Dendi532
syndereN178
XcaliburYe103
Counter-Strike
byalli619
Heroes of the Storm
Khaldor194
Other Games
B2W.Neo1330
Hui .397
crisheroes348
Happy229
RotterdaM125
XaKoH 108
Liquid`VortiX103
Mew2King91
QueenE59
ZerO(Twitch)19
Organizations
StarCraft: Brood War
Kim Chul Min (afreeca) 10
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 12 non-featured ]
StarCraft 2
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• WagamamaTV399
League of Legends
• Jankos3760
Upcoming Events
Monday Night Weeklies
1h 33m
Sparkling Tuna Cup
18h 33m
WardiTV 2025
20h 33m
PiGosaur Cup
1d 9h
WardiTV 2025
1d 20h
OSC
1d 23h
YoungYakov vs Mixu
ForJumy vs TBD
Percival vs TBD
Shameless vs TBD
The PondCast
2 days
WardiTV 2025
2 days
WardiTV 2025
3 days
OSC
3 days
[ Show More ]
CranKy Ducklings
4 days
SC Evo League
4 days
BSL 21
5 days
Sparkling Tuna Cup
5 days
BSL 21
6 days
Replay Cast
6 days
Liquipedia Results

Completed

Acropolis #4 - TS3
RSL Offline Finals
Kuram Kup

Ongoing

C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
YSL S2
BSL Season 21
Slon Tour Season 2
WardiTV 2025
META Madness #9
SL Budapest Major 2025
ESL Impact League Season 8
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22

Upcoming

CSL 2025 WINTER (S19)
BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
Bellum Gens Elite Stara Zagora 2026
HSC XXVIII
Big Gabe Cup #3
ESL Pro League Season 23
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter Qual
eXTREMESLAND 2025
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2025 TLnet. All Rights Reserved.