• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 22:12
CET 04:12
KST 12:12
  • 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
TL.net Map Contest #21: Winners10Intel X Team Liquid Seoul event: Showmatches and Meet the Pros10[ASL20] Finals Preview: Arrival13TL.net Map Contest #21: Voting12[ASL20] Ro4 Preview: Descent11
Community News
StarCraft, SC2, HotS, WC3, Returning to Blizzcon!45$5,000+ WardiTV 2025 Championship7[BSL21] RO32 Group Stage4Weekly Cups (Oct 26-Nov 2): Liquid, Clem, Solar win; LAN in Philly2Weekly Cups (Oct 20-26): MaxPax, Clem, Creator win10
StarCraft 2
General
Mech is the composition that needs teleportation t StarCraft, SC2, HotS, WC3, Returning to Blizzcon! RotterdaM "Serral is the GOAT, and it's not close" TL.net Map Contest #21: Winners Weekly Cups (Oct 20-26): MaxPax, Clem, Creator win
Tourneys
Constellation Cup - Main Event - Stellar Fest Sparkling Tuna Cup - Weekly Open Tournament $5,000+ WardiTV 2025 Championship Merivale 8 Open - LAN - Stellar Fest Sea Duckling Open (Global, Bronze-Diamond)
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 [ASL20] Ask the mapmakers — Drop your questions BW General Discussion BGH Auto Balance -> http://bghmmr.eu/ Where's CardinalAllin/Jukado the mapmaker?
Tourneys
[ASL20] Grand Finals [BSL21] RO32 Group A - Saturday 21:00 CET [Megathread] Daily Proleagues [BSL21] RO32 Group B - Sunday 21:00 CET
Strategy
PvZ map balance Current Meta How to stay on top of macro? Soma's 9 hatch build from ASL Game 2
Other Games
General Games
Stormgate/Frost Giant Megathread Nintendo Switch Thread Path of Exile Should offensive tower rushing be viable in RTS games? Dawn of War IV
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
US Politics Mega-thread Things Aren’t Peaceful in Palestine The Games Industry And ATVI Russo-Ukrainian War Thread YouTube Thread
Fan Clubs
White-Ra Fan Club The herO Fan Club!
Media & Entertainment
[Manga] One Piece Anime Discussion Thread Movie Discussion! Korean Music Discussion Series you have seen recently...
Sports
Formula 1 Discussion 2024 - 2026 Football Thread 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 Recent Gifted Posts
Blogs
Learning my new SC2 hotkey…
Hildegard
Coffee x Performance in Espo…
TrAiDoS
Saturation point
Uldridge
DnB/metal remix FFO Mick Go…
ImbaTosS
Reality "theory" prov…
perfectspheres
Our Last Hope in th…
KrillinFromwales
Customize Sidebar...

Website Feedback

Closed Threads



Active: 2100 users

Math Puzzle - 7 Hats - Page 2

Blogs > Slithe
Post a Reply
Prev 1 2 3 4 5 6 7 Next All
LeoTheLion
Profile Blog Joined July 2006
China958 Posts
Last Edited: 2010-09-09 21:11:28
September 09 2010 21:10 GMT
#21
On September 10 2010 06:07 0nega wrote:
Hello!

lurked at this site for some time and couldn't resist EDIT but didn't have the solution... EDIT



+ Show Spoiler +
i don't think they get to pick which hat they take. the hats are placed on the prisoners' heads
Communism is not love. Communism is a hammer which we use to crush the enemy. -Chairman Mao
Aesop
Profile Joined October 2007
Hungary11304 Posts
September 09 2010 21:10 GMT
#22
kk, I get it, thanks for the explanations.
ModeratorNon veritas sed auctoritas facit legem. | Liquipedia: Don't ask me, I'm retired.
jiabung
Profile Blog Joined December 2007
United States720 Posts
September 09 2010 21:11 GMT
#23
On September 10 2010 06:05 Aesop wrote:
I wonder how the prisoners have a chance of 66% by guessing randomly. If they pick 1 / 7 (given they know the seven available colors), they have a 14% chance of getting it right. Doing it 7 times is 100%, so statistically one should get it right.

Or am I missing something?

If there were 6 prisoners who had to roll a die and guess the number they were going to get beforehand, each one would have a 1/6 chance of getting it right. Doing it 6 times does not mean one of them is going to get it right. Same thing with guessing the color of a hat with 1/7 chance, since the OP specifies that the hats could be the same color.
Slithe
Profile Blog Joined February 2007
United States985 Posts
September 09 2010 21:13 GMT
#24
I wish I had a zero knowledge proof to show that this problem is possible, but I'll just wait until someone finds the solution.
LunarDestiny
Profile Blog Joined August 2008
United States4177 Posts
September 09 2010 21:13 GMT
#25
On September 10 2010 06:07 0nega wrote:
Hello!

lurked at this site for some time and couldn't resist to post the solution(hopefully)

+ Show Spoiler +
Before they get the hats, they agree, that they will all take the colour of the hat of one guy, this guy instead takes the colour which no hat he sees has

hmm...
Situation XXX:
Hat color is ROY G BLV
TEH guys is red.
Other dudes are ROY G BL.

The other dudes picks red->got owned.
TEH guys picks V-->>got owned.
saltywet
Profile Blog Joined August 2009
Hong Kong1316 Posts
Last Edited: 2010-09-09 21:15:55
September 09 2010 21:14 GMT
#26
On September 10 2010 06:08 seRapH wrote:
Show nested quote +
On September 10 2010 06:02 AcrossFiveJulys wrote:
On September 10 2010 05:57 seRapH wrote:
On September 10 2010 05:54 Nytefish wrote:
Are they allowed to agree on a timing system beforehand?

that won't help considering they don't even know what colors are in the pool of hats except whats in front of them. the classic puzzle i know of only involves n colors, and 2n people, in which case a timing system works.


i think they know the colors in the pool, otherwise in the example i brought up there's no way to win 100% when all colors are different.

even then its mathematically impossible to have a 100% correct rate PER PERSON. your hat color is not affected by anyone else's.

the only solution i can think of is if the prisoners get to talk beforehand:

The first person will write a color of a hat he sees, show it to everyone, and give it to the king. everyone else writes that same color. but this involves a form of communication, and so feels gimmicky


OP states that they cannot communicate AFTER they are seated. meaning they can come up with strategy beforehand. secondly, the sheets are directly handed to the king without possibility being shown to others

@OP

my solution is for seven people to agree on all looking at one color hat, say white or black, if someone is already looking at a white hat, look at another white hat. if there are no white hats, look at the table

say each person is labeled A,B,C,D,E,F,G
person A is responsible to look at person B's hat, person B for C, and so on

if person A sees that person B is looking at his hat, A knows he's wearing a white hat, vice versa.
Seth_
Profile Blog Joined July 2010
Belgium184 Posts
Last Edited: 2010-09-09 21:16:54
September 09 2010 21:14 GMT
#27
On September 10 2010 06:02 AcrossFiveJulys wrote:i think they know the colors in the pool, otherwise in the example i brought up there's no way to win 100% when all colors are different.

I agree.

This is complicated though:
Image you see a 2:4 distribution of colors, you might have a completely different color (so 5 possibilities) but if you try to guess, you'll need to be sure that if your guess fails someone else's guess must be right.
You could also be on the 2 team (making it 3:4) or on the 4 team (so 2:5)
If you're in 3:4 then 4 players will see a 3:3 and 2 other players will see a 2:4 like you did.
If you're in 2:5 then 2 players will see a 1:5 and 4 other players will see a 2:4 like you did.
Oh and if it's 1:2:4, then 2 players will see 1:1:5 and 4 will see 1:2:3.

This will get really complicated.

Edit: *this was answered in the OP's edit*
Can we have different rules for the different players? Like player 1 will side with the 'color 1 team' and player 2 will side with the 'color 2 team' if they see a 2:4??
The_Pacifist
Profile Blog Joined May 2010
United States540 Posts
September 09 2010 21:14 GMT
#28
2) The prisoners cannot communicate in any way to each other after being seated on the table.


So then, before they sit down and get the hats, they are able to communicate, right? If so, here is my answer:

+ Show Spoiler +
Before sitting down on the table and getting the hats, the prisoners agree to write down the color of the hat of the person sitting clockwise to them once they sit down and get the hats. Afterwards, they all pass their papers clockwise by one person and turn in the answers.


Do I get a cookie now?
AcrossFiveJulys
Profile Blog Joined September 2005
United States3612 Posts
September 09 2010 21:18 GMT
#29
On September 10 2010 06:14 saltywet wrote:
Show nested quote +
On September 10 2010 06:08 seRapH wrote:
On September 10 2010 06:02 AcrossFiveJulys wrote:
On September 10 2010 05:57 seRapH wrote:
On September 10 2010 05:54 Nytefish wrote:
Are they allowed to agree on a timing system beforehand?

that won't help considering they don't even know what colors are in the pool of hats except whats in front of them. the classic puzzle i know of only involves n colors, and 2n people, in which case a timing system works.


i think they know the colors in the pool, otherwise in the example i brought up there's no way to win 100% when all colors are different.

even then its mathematically impossible to have a 100% correct rate PER PERSON. your hat color is not affected by anyone else's.

the only solution i can think of is if the prisoners get to talk beforehand:

The first person will write a color of a hat he sees, show it to everyone, and give it to the king. everyone else writes that same color. but this involves a form of communication, and so feels gimmicky


OP states that they cannot communicate AFTER they are seated. meaning they can come up with strategy beforehand. secondly, the sheets are directly handed to the king without possibility being shown to others

@OP

my solution is for seven people to agree on all looking at one color hat, say white or black, if someone is already looking at a white hat, look at another white hat. if there are no white hats, look at the table

say each person is labeled A,B,C,D,E,F,G
person A is responsible to look at person B's hat, person B for C, and so on

if person A sees that person B is looking at his hat, A knows he's wearing a white hat, vice versa.



On September 10 2010 06:14 The_Pacifist wrote:
Show nested quote +
2) The prisoners cannot communicate in any way to each other after being seated on the table.


So then, before they sit down and get the hats, they are able to communicate, right? If so, here is my answer:

+ Show Spoiler +
Before sitting down on the table and getting the hats, the prisoners agree to write down the color of the hat of the person sitting clockwise to them once they sit down and get the hats. Afterwards, they all pass their papers clockwise by one person and turn in the answers.


Do I get a cookie now?


These both use communication after the hats are passed out, therefore should not be valid solutions.
Slithe
Profile Blog Joined February 2007
United States985 Posts
September 09 2010 21:19 GMT
#30
On September 10 2010 06:14 saltywet wrote:
Show nested quote +
On September 10 2010 06:08 seRapH wrote:
On September 10 2010 06:02 AcrossFiveJulys wrote:
On September 10 2010 05:57 seRapH wrote:
On September 10 2010 05:54 Nytefish wrote:
Are they allowed to agree on a timing system beforehand?

that won't help considering they don't even know what colors are in the pool of hats except whats in front of them. the classic puzzle i know of only involves n colors, and 2n people, in which case a timing system works.


i think they know the colors in the pool, otherwise in the example i brought up there's no way to win 100% when all colors are different.

even then its mathematically impossible to have a 100% correct rate PER PERSON. your hat color is not affected by anyone else's.

the only solution i can think of is if the prisoners get to talk beforehand:

The first person will write a color of a hat he sees, show it to everyone, and give it to the king. everyone else writes that same color. but this involves a form of communication, and so feels gimmicky


OP states that they cannot communicate AFTER they are seated. meaning they can come up with strategy beforehand. secondly, the sheets are directly handed to the king without possibility being shown to others

@OP

my solution is for seven people to agree on all looking at one color hat, say white or black, if someone is already looking at a white hat, look at another white hat. if there are no white hats, look at the table

say each person is labeled A,B,C,D,E,F,G
person A is responsible to look at person B's hat, person B for C, and so on

if person A sees that person B is looking at his hat, A knows he's wearing a white hat, vice versa.


Observing the direction that people look is a form of communication, and is not allowed. The prisoners can only see the hats for some reason.
tissue
Profile Joined April 2009
Malaysia441 Posts
September 09 2010 21:19 GMT
#31
I think that the answer is probably a gimmick, and that no player can see another person's paper.

If you could see another person's paper, answer is:
+ Show Spoiler +
First guy writes down a color he sees. Everyone copies it.

and it seems an injustice to even assume such a horrible answer.
Darby.mcg
Profile Joined May 2010
United States16 Posts
Last Edited: 2010-09-09 21:22:36
September 09 2010 21:20 GMT
#32
On September 10 2010 06:13 LunarDestiny wrote:
Show nested quote +
On September 10 2010 06:07 0nega wrote:
Hello!

lurked at this site for some time and couldn't resist to post the solution(hopefully)

+ Show Spoiler +
Before they get the hats, they agree, that they will all take the colour of the hat of one guy, this guy instead takes the colour which no hat he sees has

hmm...
Situation XXX:
Hat color is ROY G BLV
TEH guys is red.
Other dudes are ROY G BL.

The other dudes picks red->got owned.
TEH guys picks V-->>got owned.


you fail.

only one guy has to get it right.

Situation XXX:
hat colors are ROY G BIV(perhaps there's a reason you used L for Indigo, but I don't know it).
the one guys is Red.
Other guys are ROY G BI.
They choose red, R gets it right.
First guy doesn't even have to bother answering.

EDIT.
in the case that he is Violet instead(since that was the one missing from your prior example) and when they guess his they get it wrong, by choosing the one that isn't there (V) he gets it right.
Klive5ive
Profile Blog Joined January 2008
United Kingdom6056 Posts
September 09 2010 21:21 GMT
#33
On September 10 2010 06:18 AcrossFiveJulys wrote:
Show nested quote +
On September 10 2010 06:14 saltywet wrote:
On September 10 2010 06:08 seRapH wrote:
On September 10 2010 06:02 AcrossFiveJulys wrote:
On September 10 2010 05:57 seRapH wrote:
On September 10 2010 05:54 Nytefish wrote:
Are they allowed to agree on a timing system beforehand?

that won't help considering they don't even know what colors are in the pool of hats except whats in front of them. the classic puzzle i know of only involves n colors, and 2n people, in which case a timing system works.


i think they know the colors in the pool, otherwise in the example i brought up there's no way to win 100% when all colors are different.

even then its mathematically impossible to have a 100% correct rate PER PERSON. your hat color is not affected by anyone else's.

the only solution i can think of is if the prisoners get to talk beforehand:

The first person will write a color of a hat he sees, show it to everyone, and give it to the king. everyone else writes that same color. but this involves a form of communication, and so feels gimmicky


OP states that they cannot communicate AFTER they are seated. meaning they can come up with strategy beforehand. secondly, the sheets are directly handed to the king without possibility being shown to others

@OP

my solution is for seven people to agree on all looking at one color hat, say white or black, if someone is already looking at a white hat, look at another white hat. if there are no white hats, look at the table

say each person is labeled A,B,C,D,E,F,G
person A is responsible to look at person B's hat, person B for C, and so on

if person A sees that person B is looking at his hat, A knows he's wearing a white hat, vice versa.



Show nested quote +
On September 10 2010 06:14 The_Pacifist wrote:
2) The prisoners cannot communicate in any way to each other after being seated on the table.


So then, before they sit down and get the hats, they are able to communicate, right? If so, here is my answer:

+ Show Spoiler +
Before sitting down on the table and getting the hats, the prisoners agree to write down the color of the hat of the person sitting clockwise to them once they sit down and get the hats. Afterwards, they all pass their papers clockwise by one person and turn in the answers.


Do I get a cookie now?


These both use communication after the hats are passed out, therefore should not be valid solutions.

This
but the problem is impossible otherwise. As I said before there must be a trick so these answers are just as valid as the "real" answer.
Don't hate the player - Hate the game
Slithe
Profile Blog Joined February 2007
United States985 Posts
September 09 2010 21:21 GMT
#34
On September 10 2010 06:19 tissue wrote:
I think that the answer is probably a gimmick, and that no player can see another person's paper.

If you could see another person's paper, answer is:
+ Show Spoiler +
First guy writes down a color he sees. Everyone copies it.

and it seems an injustice to even assume such a horrible answer.


The answer is not a gimmick, it is a math-type problem.
revy
Profile Joined September 2009
United States1524 Posts
September 09 2010 21:21 GMT
#35
The prisoners certainly get to talk beforehand and setup a strategy but they can't show it to other prisoners.
Black Gun
Profile Blog Joined July 2009
Germany4482 Posts
Last Edited: 2010-09-09 21:24:49
September 09 2010 21:24 GMT
#36
a question for the realism of this puzzle: do the prisoners know the number of possible colors while they still can talk and discuss their strategy, ie before they are seated at the table?

so do they know that there are as many colors possible as there are prisoners?
"What am I supposed to do against this?" - "Lose!" :-]
Phant
Profile Joined August 2010
United States737 Posts
September 09 2010 21:26 GMT
#37
Everyone writes the same color?
The_Pacifist
Profile Blog Joined May 2010
United States540 Posts
Last Edited: 2010-09-09 21:28:20
September 09 2010 21:27 GMT
#38
AcrossFiveJulys believes my answer is invalid and uses communication, so I came up with option two:

+ Show Spoiler +
Prisoners meet and introduce themselves before getting the hats and sitting at the table. One person introduces himself as "Bob," and all the prisoners agree to write down the color of Bob's hat, whatever it happens to be, once they all sit down and get hats.


Cookie nao? :3

EDIT: Aww, crap. 0nega beat me, and I didn't notice. My bad. In that case, I'll go with 0nega's answer.
AcrossFiveJulys
Profile Blog Joined September 2005
United States3612 Posts
September 09 2010 21:27 GMT
#39
On September 10 2010 06:07 0nega wrote:
Hello!

lurked at this site for some time and couldn't resist to post the solution(hopefully)

+ Show Spoiler +
Before they get the hats, they agree, that they will all take the colour of the hat of one guy, this guy instead takes the colour which no hat he sees has


I think this is the solution. If all the hats are a different color the chosen guy gets it right, if there are repeats then the other guy wearing the same color as the chosen guy gets it. Well done.
getSome[703]
Profile Blog Joined December 2009
United States753 Posts
September 09 2010 21:27 GMT
#40
Here's my best guess at an answer. It works but you may or may not argue that it involves communication.

+ Show Spoiler +
All the prisoners before hand pick one guy. The six other players agree that if the designated prisoner is wearing a certain colored hat, one of them will begin write that hat color down on their paper (so one of the players will begin to write if the designated one is wearing a red hat, another will begin to write if he is wearing an orange hat, etc). The designated prisoner, seeing the person who is writing, will then know his hat color. If none of the prisoners are writing down anything, then his hat is the seventh color. He writes down his hat color and everyone goes free
Running Log! http://www.runningahead.com/logs/5081b4d7a4a94c5e8fa20b01e668dfb6/calendar
Prev 1 2 3 4 5 6 7 Next All
Please log in or register to reply.
Live Events Refresh
OSC
23:00
OSC Elite Rising Star #17
ReBellioN vs HiGhDrA
Shameless vs Demi
LetaleX vs Mute
Percival vs TBD
Liquipedia
BSL 21
20:00
ProLeague - RO32 Group B
spx vs rasowy
HBO vs KameZerg
Cross vs Razz
dxtr13 vs ZZZero
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
ProTech129
RuFF_SC2 92
Ketroc 53
StarCraft: Brood War
Artosis 782
Snow 37
Noble 32
NaDa 17
sorry 8
Icarus 6
Dota 2
monkeys_forever249
NeuroSwarm76
Super Smash Bros
hungrybox1147
Other Games
summit1g13148
fl0m543
JimRising 438
ViBE145
Maynarde143
WinterStarcraft37
Models1
Organizations
Other Games
gamesdonequick917
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 14 non-featured ]
StarCraft 2
• Hupsaiya 89
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• masondota21827
Other Games
• Scarra830
• Shiphtur540
Upcoming Events
OSC
5h 48m
Wardi Open
8h 48m
Wardi Open
12h 48m
Replay Cast
19h 48m
WardiTV Korean Royale
1d 8h
Replay Cast
2 days
Kung Fu Cup
2 days
Classic vs Solar
herO vs Cure
Reynor vs GuMiho
ByuN vs ShoWTimE
Tenacious Turtle Tussle
2 days
The PondCast
3 days
RSL Revival
3 days
Solar vs Zoun
MaxPax vs Bunny
[ Show More ]
Kung Fu Cup
3 days
WardiTV Korean Royale
3 days
Replay Cast
3 days
RSL Revival
4 days
Classic vs Creator
Cure vs TriGGeR
Kung Fu Cup
4 days
CranKy Ducklings
5 days
RSL Revival
5 days
herO vs Gerald
ByuN vs SHIN
Kung Fu Cup
5 days
BSL 21
5 days
Tarson vs Julia
Doodle vs OldBoy
eOnzErG vs WolFix
StRyKeR vs Aeternum
Sparkling Tuna Cup
6 days
RSL Revival
6 days
Reynor vs sOs
Maru vs Ryung
Kung Fu Cup
6 days
WardiTV Korean Royale
6 days
BSL 21
6 days
JDConan vs Semih
Dragon vs Dienmax
Tech vs NewOcean
TerrOr vs Artosis
Liquipedia Results

Completed

Proleague 2025-11-07
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
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
BLAST Open Fall Qual

Upcoming

SLON Tour Season 2
BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
HSC XXVIII
RSL Offline Finals
WardiTV 2025
RSL Revival: Season 3
META Madness #9
BLAST Bounty Winter 2026
BLAST Bounty Winter 2026: Closed Qualifier
eXTREMESLAND 2025
ESL Impact League Season 8
SL Budapest Major 2025
BLAST Rivals Fall 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.