• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 15:27
CET 21:27
KST 05:27
  • 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 Season 3 - RO16 Groups C & D Preview0RSL Season 3 - RO16 Groups A & B Preview2TL.net Map Contest #21: Winners12Intel X Team Liquid Seoul event: Showmatches and Meet the Pros10[ASL20] Finals Preview: Arrival13
Community News
[TLMC] Fall/Winter 2025 Ladder Map Rotation12Weekly Cups (Nov 3-9): Clem Conquers in Canada4SC: Evo Complete - Ranked Ladder OPEN ALPHA8StarCraft, SC2, HotS, WC3, Returning to Blizzcon!45$5,000+ WardiTV 2025 Championship7
StarCraft 2
General
Mech is the composition that needs teleportation t RotterdaM "Serral is the GOAT, and it's not close" RSL Season 3 - RO16 Groups C & D Preview [TLMC] Fall/Winter 2025 Ladder Map Rotation TL.net Map Contest #21: Winners
Tourneys
RSL Revival: Season 3 Sparkling Tuna Cup - Weekly Open Tournament Constellation Cup - Main Event - Stellar Fest Tenacious Turtle Tussle Master Swan Open (Global Bronze-Master 2)
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 499 Chilling Adaptation Mutation # 498 Wheel of Misfortune|Cradle of Death Mutation # 497 Battle Haredened Mutation # 496 Endless Infection
Brood War
General
FlaSh on: Biggest Problem With SnOw's Playstyle What happened to TvZ on Retro? SnOw's ASL S20 Finals Review BW General Discussion Brood War web app to calculate unit interactions
Tourneys
[Megathread] Daily Proleagues Small VOD Thread 2.0 [BSL21] RO32 Group D - Sunday 21:00 CET [BSL21] RO32 Group C - Saturday 21:00 CET
Strategy
PvZ map balance Current Meta Simple Questions, Simple Answers How to stay on top of macro?
Other Games
General Games
Path of Exile Stormgate/Frost Giant Megathread Nintendo Switch Thread Clair Obscur - Expedition 33 Beyond All Reason
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
TL Mafia Community Thread SPIRED by.ASL Mafia {211640}
Community
General
Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread US Politics Mega-thread Artificial Intelligence Thread Canadian Politics Mega-thread
Fan Clubs
White-Ra Fan Club The herO Fan Club!
Media & Entertainment
Movie Discussion! [Manga] One Piece Anime Discussion Thread Korean Music Discussion Series you have seen recently...
Sports
2024 - 2026 Football Thread Formula 1 Discussion NBA General Discussion MLB/Baseball 2023 TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
SC2 Client Relocalization [Change SC2 Language] Linksys AE2500 USB WIFI keeps disconnecting Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List
Blogs
Dyadica Gospel – a Pulp No…
Hildegard
Coffee x Performance in Espo…
TrAiDoS
Saturation point
Uldridge
DnB/metal remix FFO Mick Go…
ImbaTosS
Reality "theory" prov…
perfectspheres
Customize Sidebar...

Website Feedback

Closed Threads



Active: 2028 users

Math Puzzle - 100 Guards

Blogs > Slithe
Post a Reply
1 2 Next All
Slithe
Profile Blog Joined February 2007
United States985 Posts
October 08 2010 08:41 GMT
#1
I have another puzzle to hopefully satisfy the intellectual appetite of the Team Liquid community. There are actually two versions of this puzzle, the easier one and the harder one. You could jump to the harder one if you don't want any hints, but for most people I think solving the easier one first is better.

+ Show Spoiler [Easier Version] +

There are 2 prisoners who have both been sentenced to life in prison. They are each going to be placed in solitary confinement(separate cells, they cannot communicate or see each other at all).

There are 100 guards working at this prison. Every day, each cell is guarded by one of the guards. If possible, both cells must be guarded. Also, a guard would prefer not to guard the same cell on consecutive days.

Lucky for the prisoners, there is a way for them to be released from prison.

Each prison cell's walls are painted either white or black. If either prisoner can successfully guess the color of the other prisoner's cell, then both will be freed. If either guesses wrong, they both die.

Every single day, the prisoners can do one of three things:
1) Talk to the guard. If the prisoner does this, the guard will be very offended and will never guard this prisoner's cell again.
2) Tell the guard what he thinks the color of the other prisoner's cell is. If the prisoner guesses correct, they both go free. Otherwise, they both die.
3) Do nothing.

As is usual with these kinds of problems, the prisoners have time beforehand to discuss their strategy. Can you think of a strategy that the prisoners can use to guarantee their freedom?

Clarifications
1) The priority of rules for the guards is as follows (first being highest priority):
----If a guard has been talked to, he will never guard that cell again
----If there is no other guard available to guard a cell, he will guard it.
----If the guard has guarded that cell the day before, he will not guard it today.
2) It is possible for a prisoner's cell to be completely unguarded on a day. For example, if the prisoner has talked to all 100 guards, then there will be no more guards left who are willing to guard him. This also means that the prisoner can no longer guess because there are no guards available to listen to him.


+ Show Spoiler [Harder Version] +

There are 2 prisoners who have both been sentenced to life in prison. They are each going to be placed in solitary confinement(separate cells, they cannot communicate or see each other at all).

There are 100 guards working at this prison. Every day, each cell is guarded by one of the guards. If possible, both cells must be guarded. Also, a guard would prefer not to guard the same cell on consecutive days.

Lucky for the prisoners, there is a way for them to be released from prison.

Each guard has an astrological sign (there are 12 astrological signs). If either prisoner can successfully guess the sign of the guard that is currently guarding them, then both will be freed. If either guesses wrong, they both die.

Every single day, the prisoners can do one of three things:
1) Ask the guard what his sign is. If the prisoner does this, the guard will tell you, but will also become very offended and will never guard this prisoner's cell again.
2) Guess the guard's astrological sign. If the prisoner guesses correct, they both go free. Otherwise, they both die.
3) Do nothing.

As is usual with these kinds of problems, the prisoners have time beforehand to discuss their strategy. Can you think of a strategy that the prisoners can use to guarantee their freedom?

Clarifications
1) The priority of rules for the guards is as follows (first being highest priority):
----If a guard has been asked his sign by a prisoner, he will never guard that prisoner's cell again.
----If there is no other guard available to guard a cell, he will guard it.
----If the guard has guarded that cell the day before, he will not guard it today.
2) It is possible for a prisoner's cell to be completely unguarded on a day. For example, if the prisoner has talked to all 100 guards, then there will be no more guards left who are willing to guard him. This also means that the prisoner can no longer guess because there are no guards available to listen to him.
3) A prisoner is only allowed to guess the sign of the guard that is currently guarding him.


*****
Crawler
Profile Blog Joined April 2010
Estonia248 Posts
October 08 2010 09:04 GMT
#2
<3 puzzles! Have to skip sc2 for a bit now tho ;(
Vinnesta
Profile Blog Joined April 2010
Singapore285 Posts
Last Edited: 2010-10-08 09:09:27
October 08 2010 09:07 GMT
#3
I am assuming the prisoners can differentiate between the different guards?

+ Show Spoiler [Easier version] +
Both prisoners talk to the guards for 49 days, thus chasing away 98 of the guards and leaving 2 of them.

On the 50th day, prisoner A will talk to the guard if his wall is white, but not talk if his wall is black. Prisoner B will do nothing.

On the 51st day, if prisoner B has no guard, he knows that A's wall is white, since A's guard on the 50th day will have ran off, and B's guard will go to A. If the guards changed, prisoner A's wall is black and B will know, thus freeing them.

If A's wall is white, B will tell the guard on the 52nd day.
Same difference is not an oxymoron!
madnessman
Profile Blog Joined May 2009
United States1581 Posts
October 08 2010 09:08 GMT
#4
Harder version is so difficult. I think I'm going to have to try working out the easier version first.
Slithe
Profile Blog Joined February 2007
United States985 Posts
Last Edited: 2010-10-08 09:12:10
October 08 2010 09:10 GMT
#5
On October 08 2010 18:07 Vinnesta wrote:
I am assuming the prisoners can differentiate between the different guards?

+ Show Spoiler [Easier version] +
Both prisoners talk to the guards for 49 days, thus chasing away 98 of the guards and leaving 2 of them. On the 50th day, prisoner A will talk to the guard if his wall is white, but not talk if his wall is black. Prisoner B will do nothing. On the 51st day, if prisoner B has no guard, he knows that A's wall is white, since A's guard on the 50th day will have ran off, and B's guard will go to A. If the guards changed, prisoner A's wall is black, and B will know.

If A's wall is white, B will tell the guard on the 52nd day.


If a prisoner talks to a guard, that guard will only stop guarding that one prisoner, not both prisoners.
Sadir
Profile Blog Joined December 2005
Vatican City State1176 Posts
October 08 2010 09:11 GMT
#6
in the hard version, under clarification 1), what do you mean with
"----If there is no other guard available to guard a cell, he will guard it."

most likely not important, but still
Abenson
Profile Blog Joined December 2009
Canada4122 Posts
Last Edited: 2010-10-08 09:12:37
October 08 2010 09:11 GMT
#7
On October 08 2010 18:07 Vinnesta wrote:
I am assuming the prisoners can differentiate between the different guards?

+ Show Spoiler [Easier version] +
Both prisoners talk to the guards for 49 days, thus chasing away 98 of the guards and leaving 2 of them.

On the 50th day, prisoner A will talk to the guard if his wall is white, but not talk if his wall is black. Prisoner B will do nothing.

On the 51st day, if prisoner B has no guard, he knows that A's wall is white, since A's guard on the 50th day will have ran off, and B's guard will go to A. If the guards changed, prisoner A's wall is black and B will know, thus freeing them.

If A's wall is white, B will tell the guard on the 52nd day.


But I thought the prisoner's can't talk to each other?
+ Show Spoiler +
If I was the prisoner, I'll just randomly guess the other guy's colour because I really can't find a solution.
50% chance of being freed! :D

Edit: Nevermind, didn't really read the questions carefully XD
I think the dude go it though
Slithe
Profile Blog Joined February 2007
United States985 Posts
October 08 2010 09:14 GMT
#8
On October 08 2010 18:11 Sadir wrote:
in the hard version, under clarification 1), what do you mean with
"----If there is no other guard available to guard a cell, he will guard it."

most likely not important, but still


Suppose there's only 1 guard willing to guard prisoner A, while there are plenty of guards willing to guard prisoner B. In this scenario, the same guard will keep guarding prisoner A, even though he would prefer to switch.
Bill Murray
Profile Blog Joined October 2009
United States9292 Posts
October 08 2010 09:17 GMT
#9
+ Show Spoiler +
so he could do nothing until he noticed a guard missing
one if by land (white!)
two if by sea (black!)
if he noticed two missing from his rotation, it's black
if he noticed one missing from his rotation, it's white
University of Kentucky Basketball #1
Bill Murray
Profile Blog Joined October 2009
United States9292 Posts
October 08 2010 09:17 GMT
#10
no idea on the harder version whatsoever
please dont keep me up for hours
University of Kentucky Basketball #1
Bill Murray
Profile Blog Joined October 2009
United States9292 Posts
October 08 2010 09:18 GMT
#11
On October 08 2010 18:07 Vinnesta wrote:
I am assuming the prisoners can differentiate between the different guards?

+ Show Spoiler [Easier version] +
Both prisoners talk to the guards for 49 days, thus chasing away 98 of the guards and leaving 2 of them.

On the 50th day, prisoner A will talk to the guard if his wall is white, but not talk if his wall is black. Prisoner B will do nothing.

On the 51st day, if prisoner B has no guard, he knows that A's wall is white, since A's guard on the 50th day will have ran off, and B's guard will go to A. If the guards changed, prisoner A's wall is black and B will know, thus freeing them.

If A's wall is white, B will tell the guard on the 52nd day.

this is assuming that they go in order
University of Kentucky Basketball #1
Ftrunkz
Profile Blog Joined April 2007
Australia2474 Posts
Last Edited: 2010-10-08 09:21:07
October 08 2010 09:19 GMT
#12
+ Show Spoiler +
easy version: the cellmates before going in (assuming they know all the rules) decide that one of them is the 'talker' whilst the other is the 'thinker'.

The talkers job is simple, he talks to 99 of the guards if his cell is white, if it is black he doesnt talk at all, the thinkers job is pretty easy too, he waits 100 days, and then talks to 99 guards.

What this accomplishes is that the 'talker' prisoner always has that 1 guard left if he's in a white room, and due to the 'rules' that one guard must always guard him despite his preferences, so after 'thinker' gets rid of his 99 after 200 days or w/e, this one guard begins swapping back and forth if 'talker' is in a white room, at which point thinker knows the colour of both rooms and gets them free.

If however 'talker' is in a black room, and has never talked, the one guard 'thinker' didnt talk to is always stationed at his room, allowing 'thinker' to realize that 'talker' must be in a black room, at which point he knows the colour of both rooms.
@NvPinder on twitter | Member of Gamecom Nv | http://www.clan-ta.com | http://www.youtube.com/user/ftrunkz | http://www.twitchtv.com/xghpinder
Bill Murray
Profile Blog Joined October 2009
United States9292 Posts
October 08 2010 09:22 GMT
#13
i was just assuming that you could 98 or 99 it and then follow by the other guy talking to all 100
your method is pretty good, i didn't think about having to get two right
University of Kentucky Basketball #1
Slithe
Profile Blog Joined February 2007
United States985 Posts
October 08 2010 09:24 GMT
#14
On October 08 2010 18:17 Bill Murray wrote:
+ Show Spoiler +
so he could do nothing until he noticed a guard missing
one if by land (white!)
two if by sea (black!)
if he noticed two missing from his rotation, it's black
if he noticed one missing from his rotation, it's white


Clarification: You cannot assume anything about the order of the guards. For example, if there are 3 guards available to guard prisoner A, he could very easily see the following:

1 2 1 2 1 2 ....
Slithe
Profile Blog Joined February 2007
United States985 Posts
October 08 2010 09:26 GMT
#15
On October 08 2010 18:19 Ftrunkz wrote:
+ Show Spoiler +
easy version: the cellmates before going in (assuming they know all the rules) decide that one of them is the 'talker' whilst the other is the 'thinker'.

The talkers job is simple, he talks to 99 of the guards if his cell is white, if it is black he doesnt talk at all, the thinkers job is pretty easy too, he waits 100 days, and then talks to 99 guards.

What this accomplishes is that the 'talker' prisoner always has that 1 guard left if he's in a white room, and due to the 'rules' that one guard must always guard him despite his preferences, so after 'thinker' gets rid of his 99 after 200 days or w/e, this one guard begins swapping back and forth if 'talker' is in a white room, at which point thinker knows the colour of both rooms and gets them free.

If however 'talker' is in a black room, and has never talked, the one guard 'thinker' didnt talk to is always stationed at his room, allowing 'thinker' to realize that 'talker' must be in a black room, at which point he knows the colour of both rooms.


Congratulations. You have solved the easy version.
Slithe
Profile Blog Joined February 2007
United States985 Posts
Last Edited: 2010-10-08 09:28:56
October 08 2010 09:28 GMT
#16
I'm going to sleep. Good luck with the hard version. I'll give clarifications when I wake up if necessary.

Edit: lol accidentally tripled posted.
Bill Murray
Profile Blog Joined October 2009
United States9292 Posts
October 08 2010 09:29 GMT
#17
i hate you
University of Kentucky Basketball #1
Ftrunkz
Profile Blog Joined April 2007
Australia2474 Posts
Last Edited: 2010-10-08 09:35:49
October 08 2010 09:32 GMT
#18
omfg at hard version, braintstorming some ideas right now and not getting very far haha.

edit 1:OMG MY 2000TH POST NOOOOOOOO.

atleast im a sexy dt now.

edit 2: joke answer: if the a guard says leo he throws his show at their face hard enough to leave a bruise, allowing the other guy to say leo when he comes around.
@NvPinder on twitter | Member of Gamecom Nv | http://www.clan-ta.com | http://www.youtube.com/user/ftrunkz | http://www.twitchtv.com/xghpinder
anch
Profile Blog Joined June 2006
United States5457 Posts
October 08 2010 09:35 GMT
#19
argggggggggggggggggghhhhhh hard version.
nuts,
seems impossible cuz its 1 out of 12, and noway of knowing the guard's sign without asking.
going to think while sleep.
Ftrunkz
Profile Blog Joined April 2007
Australia2474 Posts
Last Edited: 2010-10-08 09:45:46
October 08 2010 09:40 GMT
#20
yeah, going completely round in circles and getting nowhere on hard, this is doing my head in, not enough IQ...

edit: I give up, im getting to that "its impossible fuck it" point in my head, haha. The thinking im up to is that one guy has to stop talking to guards at some point because a guard gives a certain answer, however I'm unsure as to how that helps the other guy, but its the only way of conveying any sort of information between the 2, which is what the problems all about... I just have no idea at what point logically makes sense for him to stop talking and to have the other guy figure it out based off that.

@NvPinder on twitter | Member of Gamecom Nv | http://www.clan-ta.com | http://www.youtube.com/user/ftrunkz | http://www.twitchtv.com/xghpinder
1 2 Next All
Please log in or register to reply.
Live Events Refresh
BSL 21
20:00
ProLeague - RO32 Group C
Tarson vs Julia
Doodle vs OldBoy
eOnzErG vs WolFix
StRyKeR vs Aeternum
ZZZero.O204
LiquipediaDiscussion
OSC
19:00
Masters Cup #150: Group B
davetesta61
Liquipedia
PSISTORM Gaming Misc
15:55
FSL teamleague CNvsASH, ASHvRR
Freeedom15
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
mouzHeroMarine 257
IndyStarCraft 156
Railgan 115
BRAT_OK 37
MindelVK 30
ForJumy 16
Nathanias 14
StarCraft: Brood War
Britney 16385
Shuttle 726
ZZZero.O 188
Rock 48
Shine 36
NaDa 16
Dota 2
LuMiX0
Counter-Strike
byalli831
fl0m446
Other Games
tarik_tv6307
gofns5540
Grubby3577
DeMusliM374
Fuzer 211
Pyrionflax161
Dewaltoss5
Organizations
Other Games
EGCTV870
gamesdonequick709
StarCraft 2
angryscii 21
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 23 non-featured ]
StarCraft 2
• printf 41
• StrangeGG 18
• LaughNgamezSOOP
• AfreecaTV YouTube
• sooper7s
• intothetv
• Migwel
• Kozan
• IndyKCrew
StarCraft: Brood War
• Airneanach36
• Azhi_Dahaki20
• HerbMon 16
• 80smullet 8
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• C_a_k_e 3099
• WagamamaTV455
• Ler79
• lizZardDota233
Other Games
• imaqtpie1302
• Shiphtur245
• tFFMrPink 9
Upcoming Events
Sparkling Tuna Cup
13h 33m
RSL Revival
13h 33m
Reynor vs sOs
Maru vs Ryung
Kung Fu Cup
15h 33m
Cure vs herO
Reynor vs TBD
WardiTV Korean Royale
15h 33m
BSL 21
23h 33m
JDConan vs Semih
Dragon vs Dienmax
Tech vs NewOcean
TerrOr vs Artosis
IPSL
23h 33m
Dewalt vs WolFix
eOnzErG vs Bonyth
Replay Cast
1d 2h
Wardi Open
1d 15h
Monday Night Weeklies
1d 20h
WardiTV Korean Royale
2 days
[ Show More ]
BSL: GosuLeague
3 days
The PondCast
3 days
Replay Cast
4 days
RSL Revival
4 days
BSL: GosuLeague
5 days
RSL Revival
5 days
WardiTV Korean Royale
5 days
RSL Revival
6 days
WardiTV Korean Royale
6 days
IPSL
6 days
Julia vs Artosis
JDConan vs DragOn
Liquipedia Results

Completed

Proleague 2025-11-14
Stellar Fest: Constellation Cup
Eternal Conflict S1

Ongoing

C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
SOOP Univ League 2025
YSL S2
BSL Season 21
CSCL: Masked Kings S3
SLON Tour Season 2
RSL Revival: Season 3
META Madness #9
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025

Upcoming

BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
HSC XXVIII
RSL Offline Finals
WardiTV 2025
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter 2026: Closed Qualifier
eXTREMESLAND 2025
ESL Impact League Season 8
SL Budapest Major 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.