• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 13:29
CEST 19:29
KST 02:29
  • 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
Code S Season 1 - RO12 Group A: Rogue, Percival, Solar, Zoun10[ASL21] Ro8 Preview Pt1: Inheritors16[ASL21] Ro16 Preview Pt2: All Star10Team Liquid Map Contest #22 - The Finalists21[ASL21] Ro16 Preview Pt1: Fresh Flow9
Community News
2026 GSL Season 1 Qualifiers25Maestros of the Game 2 announced92026 GSL Tour plans announced15Weekly Cups (April 6-12): herO doubles, "Villains" prevail1MaNa leaves Team Liquid25
StarCraft 2
General
Code S Season 1 - RO12 Group A: Rogue, Percival, Solar, Zoun Team Liquid Map Contest #22 - The Finalists Blizzard Classic Cup @ BlizzCon 2026 - $100k prize pool MaNa leaves Team Liquid Maestros of the Game 2 announced
Tourneys
SC2 INu's Battles#15 <BO.9 2Matches> GSL Code S Season 1 (2026) WardiTV Spring Cup RSL Revival: Season 5 - Qualifiers and Main Event SEL Masters #6 - Solar vs Classic (SC: Evo)
Strategy
Custom Maps
[D]RTS in all its shapes and glory <3 [A] Nemrods 1/4 players [M] (2) Frigid Storage
External Content
The PondCast: SC2 News & Results Mutation # 523 Firewall Mutation # 522 Flip My Base Mutation # 521 Memorable Boss
Brood War
General
Pros React To: Leta vs Tulbo (ASL S21, Ro.8) ASL21 General Discussion [TOOL] Starcraft Chat Translator JaeDong's ASL S21 Ro16 Post-Review Missed out on ASL tickets - what are my options?
Tourneys
[ASL21] Ro8 Day 1 [ASL21] Ro16 Group D Small VOD Thread 2.0 [ASL21] Ro8 Day 2
Strategy
Fighting Spirit mining rates Simple Questions, Simple Answers What's the deal with APM & what's its true value Any training maps people recommend?
Other Games
General Games
Stormgate/Frost Giant Megathread Daigo vs Menard Best of 10 Nintendo Switch Thread Dawn of War IV Diablo IV
Dota 2
The Story of Wings Gaming
League of Legends
G2 just beat GenG in First stand
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
Vanilla Mini Mafia Mafia Game Mode Feedback/Ideas TL Mafia Community Thread Five o'clock TL Mafia
Community
General
US Politics Mega-thread European Politico-economics QA Mega-thread Russo-Ukrainian War Thread 3D technology/software discussion Canadian Politics Mega-thread
Fan Clubs
The IdrA Fan Club
Media & Entertainment
[Manga] One Piece Anime Discussion Thread [Req][Books] Good Fantasy/SciFi books Movie Discussion!
Sports
2024 - 2026 Football Thread Formula 1 Discussion McBoner: A hockey love story
World Cup 2022
Tech Support
streaming software Strange computer issues (software) [G] How to Block Livestream Ads
TL Community
The Automated Ban List
Blogs
Sexual Health Of Gamers
TrAiDoS
lurker extra damage testi…
StaticNine
Broowar part 2
qwaykee
Funny Nicknames
LUCKY_NOOB
Iranian anarchists: organize…
XenOsky
Customize Sidebar...

Website Feedback

Closed Threads



Active: 2753 users

New Math Puzzle

Blogs > Slithe
Post a Reply
1 2 Next All
Slithe
Profile Blog Joined February 2007
United States985 Posts
March 12 2008 08:03 GMT
#1
The prisoners are back for more puzzles! And this time there's a light bulb in the mix.

There are 100 prisoners, each in their own isolated rooms. There's another special room with a light bulb and a switch, and nothing else. The light bulb is initially off.

One at a time, a prisoner is chosen at random to go into the special room. The prisoner can choose to either flip the switch or not. The prisoner will then leave the room and a guard will ask him whether he he thinks all 100 prisoners have been in the room at least once. The prisoner can either answer "yes" or "don't know".

If he answers yes and he's correct, all the prisoners go free.
If he answers yes and he's wrong, all the prisoners are killed.
If he answers don't know, then the prisoner goes back to his room and the process continues.

Before the prisoners are put in their rooms, they get to decide beforehand on a strategy. What strategy should the prisoners use to assure the survival of the prisoners?

Key Point: The prisoners can go into the room multiple times, and the order is random. For example, prisoner 1 could potentially go into the room 10 times before prisoner 5 goes in even once.

EmeraldSparks
Profile Blog Joined January 2008
United States1451 Posts
March 12 2008 08:12 GMT
#2
+ Show Spoiler +
If it is your first time in the room, flip the switch. Wait until you have been brought in for the hundred thousanth time and all you have seen is an off light-bulb. On the hundred thousanth time, declare that all the prisoners have been there. The laws of chance say that it's just a little bit unlikely that somebody would be chosen a hundred thousand times before somebody else was chose once.

Better make that a million.
But why?
leejas
Profile Blog Joined August 2007
United States440 Posts
March 12 2008 08:23 GMT
#3
Thats laws of odds though, still a small chance you could get shot in the face.
leejas
Profile Blog Joined August 2007
United States440 Posts
Last Edited: 2008-03-12 08:43:22
March 12 2008 08:32 GMT
#4
+ Show Spoiler +
One solution I managed to come up with...it's safe too.

Before 100 days, leave the switch off if it's your first time in. Then if someone comes in two times, they turn it on. The next person to come in flicks the switch off. He now knows that the number of days before him is the number of unique people that have been in the room. After that, you use a new rule. Leave the light on if you've been in the room. Turn it off if it's your first time. Now, whoever has been in the room two times knows that he has the remainder to count. So he counts off each time he goes in the room if the light is off, until it's been 100 times.

GG? Takes too long I think. Should be another solution.


Cascade
Profile Blog Joined March 2006
Australia5405 Posts
Last Edited: 2008-03-12 08:43:45
March 12 2008 08:37 GMT
#5
Isn't this very similar to the other prisoner problem with the thingy they turned up and down, but then it was more complicated, because they had that stupid king that could mess with them?

The same solution would work, right?

I dont know what to say about the recuring apearance of prisoners and light bulbs either. :o

edit: leejas:

+ Show Spoiler +
So the "yes" condition would be that you had seen the light being switched 100 times? But if two prisoners is in the room between two of your visits, you will not see their switches, and you will never get to 100. You want a solution that always works. And I dont think "but this will take a lot of time" is a flaw. These prisoners in general have A LOT of time on their hands...
NarutO
Profile Blog Joined December 2006
Germany18839 Posts
Last Edited: 2008-03-12 08:46:08
March 12 2008 08:43 GMT
#6
On March 12 2008 17:12 EmeraldSparks wrote:
+ Show Spoiler +
If it is your first time in the room, flip the switch. Wait until you have been brought in for the hundred thousanth time and all you have seen is an off light-bulb. On the hundred thousanth time, declare that all the prisoners have been there. The laws of chance say that it's just a little bit unlikely that somebody would be chosen a hundred thousand times before somebody else was chose once.

Better make that a million.



+ Show Spoiler +


The riddle is not correct. The prisoners may communicate and discuss a plan beforehand. Your solution is not possible, because you will just have 1 prisoner / day which means you would have to wait 100000 days with your solution or even 1000000 which is equal to 273 years (100000) or 2739 years (1000000).

Given the fact that they may discuss beforehand, one person is chosen as the counter. If the light switch is on, no prisoner will touch it. If it is off, and a prisoner who has never flicked the switch enters, then he flicks the switch on. It stays like that until the counter returns. The counter never flicks it up, only flicks it down. Once he notices that it's been flicked up 99 times, he says that 100 prisoners have visited, and they go free.

This is the solution.. ;o

NOTE: It could still take years.. or never happen if its really random

CommentatorPolt | MMA | Jjakji | BoxeR | NaDa | MVP | MKP ... truly inspiring.
leejas
Profile Blog Joined August 2007
United States440 Posts
March 12 2008 08:43 GMT
#7
Check my update.
LTT
Profile Blog Joined March 2003
Shakuras1095 Posts
Last Edited: 2008-03-12 08:52:27
March 12 2008 08:49 GMT
#8
The problem, lee, is that you don't know that this is going to be once a day. Slithe didn't specify an interval. You can only break it into two phases like that with either a set interval between iterations or if every prisoner knows what iteration they are on.

Edit: Grammar.
leejas
Profile Blog Joined August 2007
United States440 Posts
Last Edited: 2008-03-12 09:00:33
March 12 2008 08:57 GMT
#9
Sorry, it's 5am here and I'm studying for an exam :D.

Anyway, you're gonna have to do it the other way then.

Leave the light on all the time. If someone new comes in, they turn it off. If you go in, the light is off, someone new was there, thus, it's one note. After that, you have to count off how many times you've been in the room to 100. After that, everyone's been there.
Zalfor
Profile Blog Joined October 2005
United States1035 Posts
March 12 2008 08:58 GMT
#10
naruto is so correct.
555, kthxbai
spammerA
Profile Joined July 2006
China355 Posts
March 12 2008 09:28 GMT
#11
On March 12 2008 17:43 G.s)NarutO wrote:
Show nested quote +
On March 12 2008 17:12 EmeraldSparks wrote:
+ Show Spoiler +
If it is your first time in the room, flip the switch. Wait until you have been brought in for the hundred thousanth time and all you have seen is an off light-bulb. On the hundred thousanth time, declare that all the prisoners have been there. The laws of chance say that it's just a little bit unlikely that somebody would be chosen a hundred thousand times before somebody else was chose once.

Better make that a million.



+ Show Spoiler +


The riddle is not correct. The prisoners may communicate and discuss a plan beforehand. Your solution is not possible, because you will just have 1 prisoner / day which means you would have to wait 100000 days with your solution or even 1000000 which is equal to 273 years (100000) or 2739 years (1000000).

Given the fact that they may discuss beforehand, one person is chosen as the counter. If the light switch is on, no prisoner will touch it. If it is off, and a prisoner who has never flicked the switch enters, then he flicks the switch on. It stays like that until the counter returns. The counter never flicks it up, only flicks it down. Once he notices that it's been flicked up 99 times, he says that 100 prisoners have visited, and they go free.

This is the solution.. ;o

NOTE: It could still take years.. or never happen if its really random



nice one
useLess
Profile Blog Joined January 2004
United States4781 Posts
March 12 2008 09:40 GMT
#12
Man, saw this on the william wu riddle website years ago
Moonlight Shadow
betaben
Profile Blog Joined September 2007
681 Posts
March 12 2008 09:44 GMT
#13
my favourite puzzle:

http://epicycle.org/2006/04/hardest-logic-puzzle_25.html
stenole
Profile Blog Joined April 2004
Norway869 Posts
March 12 2008 11:00 GMT
#14
It feels like it's the same riddle all the time.

Prisoners are presented with a a set of rules where ultimately their behavior leads to death or freedom. They get to discuss a strategy to beat the system for their freedom. Thereafter, they are instructed not to communicate directly. The system often has a certain set of artifacts such as light switches, light bulbs and rooms which they have to interact with. Any other interaction is not allowed. Strangest of all, the system they have to beat is always beatable. But in such a situation, can the guards be trusted? Why would they make a game like this that could guarantee the prisoners freedom? Can the rules be trusted? Can the prisoners be trusted to follow the strategy? Can the prisoners be trusted not to cheat? These are all reasons why people should not be used in riddle, unless the solution is about thinking outside the box.
sundance
Profile Blog Joined May 2004
Slovakia3201 Posts
March 12 2008 13:29 GMT
#15
On March 12 2008 20:00 stenole wrote:
It feels like it's the same riddle all the time.

Prisoners are presented with a a set of rules where ultimately their behavior leads to death or freedom. They get to discuss a strategy to beat the system for their freedom. Thereafter, they are instructed not to communicate directly. The system often has a certain set of artifacts such as light switches, light bulbs and rooms which they have to interact with. Any other interaction is not allowed. Strangest of all, the system they have to beat is always beatable. But in such a situation, can the guards be trusted? Why would they make a game like this that could guarantee the prisoners freedom? Can the rules be trusted? Can the prisoners be trusted to follow the strategy? Can the prisoners be trusted not to cheat? These are all reasons why people should not be used in riddle, unless the solution is about thinking outside the box.


It's just a riddle not real life situation ffs.
Nick Cave & the Bad Seeds
drift0ut
Profile Blog Joined June 2004
United Kingdom691 Posts
Last Edited: 2008-03-12 14:34:19
March 12 2008 14:33 GMT
#16
I've not read all the posts but this does it:

+ Show Spoiler +

Pick one man, DAVE,

if you are not DAVE:
if it's your first time in the room: flick the on if it's off, leave it on if it's on
if you've been there before: leave it

if you're DAVE:
if it's on count:=count +1 and switch it off,
if it's off leave it
when you count to 100 (or 99 really) you are done


edit: G.s)NarutO got it first, gg
Slithe
Profile Blog Joined February 2007
United States985 Posts
March 12 2008 16:48 GMT
#17
Congratulations to Naruto, I think he got it first.

@betaben: That puzzle is a pretty good one. I've heard a very similar version with the key difference that there is no time limit, and the question is "How many days does it take for the diseased ones to kill themselves off". I dunno if I would call it "The hardest logic puzzle" though.
gwho
Profile Blog Joined January 2008
United States632 Posts
March 12 2008 17:52 GMT
#18
the strategy is this: if you flipped the switch and the gaurd asks you if you flipped it, say yes. if + Show Spoiler +
you didn't flip it say don't know -_- how easy xp
gwho
Profile Blog Joined January 2008
United States632 Posts
March 12 2008 17:52 GMT
#19
+ Show Spoiler +
the strategy is this: if you flipped the switch and the gaurd asks you if you flipped it, say yes. if you didn't flip it, don't say that you flipped the switch! -_- easy xp
gwho
Profile Blog Joined January 2008
United States632 Posts
March 12 2008 17:57 GMT
#20
On March 12 2008 20:00 stenole wrote:
It feels like it's the same riddle all the time.

Prisoners are presented with a a set of rules where ultimately their behavior leads to death or freedom. They get to discuss a strategy to beat the system for their freedom. Thereafter, they are instructed not to communicate directly. The system often has a certain set of artifacts such as light switches, light bulbs and rooms which they have to interact with. Any other interaction is not allowed. Strangest of all, the system they have to beat is always beatable. But in such a situation, can the guards be trusted? Why would they make a game like this that could guarantee the prisoners freedom? Can the rules be trusted? Can the prisoners be trusted to follow the strategy? Can the prisoners be trusted not to cheat? These are all reasons why people should not be used in riddle, unless the solution is about thinking outside the box.



idiot, it's a math riddle. the setup is similarbecause you don't want to say "x y to the squre root of 2 lbahlbahlbha, solve it." assume! assume the rules acn be trusted assume th eprisoners can follow the same strategy assume they can be trusted not to cheat geez. it's not thinking about outside the box. even my though answers always are, im just kidding. u couldn't even figure out the question itself. -_-
1 2 Next All
Please log in or register to reply.
Live Events Refresh
Next event in 15h 31m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
LamboSC2 260
TKL 159
UpATreeSC 100
BRAT_OK 62
MindelVK 16
StarCraft: Brood War
GuemChi 4736
Larva 448
HiyA 445
Hyuk 183
Movie 105
firebathero 102
Sexy 95
Backho 78
yabsab 51
Bale 29
[ Show more ]
Rock 24
soO 20
Shine 20
Sacsri 19
Counter-Strike
fl0m4514
byalli529
Heroes of the Storm
Liquid`Hasu161
Other Games
Grubby985
FrodaN901
B2W.Neo810
ceh9478
C9.Mang0136
mouzStarbuck126
KnowMe90
QueenE75
Trikslyr54
Fuzer 53
RotterdaM26
Organizations
Other Games
BasetradeTV256
Dota 2
PGL Dota 2 - Main Stream71
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
[ Show 20 non-featured ]
StarCraft 2
• musti20045 121
• Adnapsc2 9
• Shameless 7
• Kozan
• Migwel
• sooper7s
• AfreecaTV YouTube
• intothetv
• IndyKCrew
• LaughNgamezSOOP
StarCraft: Brood War
• HerbMon 27
• blackmanpl 25
• Michael_bg 8
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
League of Legends
• Nemesis1975
• TFBlade1099
Counter-Strike
• Shiphtur169
Other Games
• imaqtpie443
Upcoming Events
Replay Cast
15h 31m
Escore
16h 31m
INu's Battles
17h 31m
Classic vs ByuN
SHIN vs ByuN
OSC
19h 31m
Big Brain Bouts
22h 31m
Replay Cast
1d 6h
Replay Cast
1d 15h
RSL Revival
1d 16h
Classic vs GgMaChine
Rogue vs Maru
WardiTV Invitational
1d 17h
IPSL
1d 22h
Ret vs Art_Of_Turtle
Radley vs TBD
[ Show More ]
BSL
2 days
Replay Cast
2 days
RSL Revival
2 days
herO vs TriGGeR
NightMare vs Solar
uThermal 2v2 Circuit
2 days
BSL
3 days
IPSL
3 days
eOnzErG vs TBD
G5 vs Nesh
Patches Events
3 days
Replay Cast
3 days
Wardi Open
3 days
Afreeca Starleague
3 days
Jaedong vs Light
Monday Night Weeklies
3 days
Replay Cast
4 days
Sparkling Tuna Cup
4 days
Afreeca Starleague
4 days
Snow vs Flash
WardiTV Invitational
4 days
GSL
5 days
Classic vs Cure
Maru vs Rogue
GSL
6 days
SHIN vs Zoun
ByuN vs herO
Liquipedia Results

Completed

Proleague 2026-04-29
WardiTV TLMC #16
Nations Cup 2026

Ongoing

BSL Season 22
ASL Season 21
CSL 2026 SPRING (S20)
IPSL Spring 2026
KCM Race Survival 2026 Season 2
StarCraft2 Community Team League 2026 Spring
2026 GSL S1
BLAST Rivals Spring 2026
IEM Rio 2026
PGL Bucharest 2026
Stake Ranked Episode 1
BLAST Open Spring 2026
ESL Pro League S23 Finals
ESL Pro League S23 Stage 1&2
PGL Cluj-Napoca 2026

Upcoming

Escore Tournament S2: W5
KK 2v2 League Season 1
Acropolis #4
BSL 22 Non-Korean Championship
CSLAN 4
Kung Fu Cup 2026 Grand Finals
HSC XXIX
uThermal 2v2 2026 Main Event
Maestros of the Game 2
2026 GSL S2
RSL Revival: Season 5
XSE Pro League 2026
IEM Cologne Major 2026
Stake Ranked Episode 2
CS Asia Championships 2026
IEM Atlanta 2026
Asian Champions League 2026
PGL Astana 2026
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 © 2026 TLnet. All Rights Reserved.