• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 02:47
CET 08:47
KST 16:47
  • 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
Rongyi Cup S3 - Preview & Info3herO wins SC2 All-Star Invitational14SC2 All-Star Invitational: Tournament Preview5RSL Revival - 2025 Season Finals Preview8RSL Season 3 - Playoffs Preview0
Community News
Weekly Cups (Jan 19-25): Bunny, Trigger, MaxPax win3Weekly Cups (Jan 12-18): herO, MaxPax, Solar win0BSL Season 2025 - Full Overview and Conclusion8Weekly Cups (Jan 5-11): Clem wins big offline, Trigger upsets4$21,000 Rongyi Cup Season 3 announced (Jan 22-Feb 7)38
StarCraft 2
General
StarCraft 2 not at the Esports World Cup 2026 Weekly Cups (Jan 19-25): Bunny, Trigger, MaxPax win Oliveira Would Have Returned If EWC Continued herO wins SC2 All-Star Invitational PhD study /w SC2 - help with a survey!
Tourneys
$21,000 Rongyi Cup Season 3 announced (Jan 22-Feb 7) OSC Season 13 World Championship $70 Prize Pool Ladder Legends Academy Weekly Open! SC2 All-Star Invitational: Jan 17-18 Sparkling Tuna Cup - Weekly Open Tournament
Strategy
Simple Questions Simple Answers
Custom Maps
[A] Starcraft Sound Mod
External Content
Mutation # 510 Safety Violation Mutation # 509 Doomsday Report Mutation # 508 Violent Night Mutation # 507 Well Trained
Brood War
General
Bleak Future After Failed ProGaming Career BW General Discussion BGH Auto Balance -> http://bghmmr.eu/ [ASL21] Potential Map Candidates Gypsy to Korea
Tourneys
[Megathread] Daily Proleagues Small VOD Thread 2.0 Azhi's Colosseum - Season 2 [BSL21] Non-Korean Championship - Starts Jan 10
Strategy
Zealot bombing is no longer popular? Current Meta Simple Questions, Simple Answers Soma's 9 hatch build from ASL Game 2
Other Games
General Games
Path of Exile Battle Aces/David Kim RTS Megathread Nintendo Switch Thread Mobile Legends: Bang Bang 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
Vanilla Mini Mafia Mafia Game Mode Feedback/Ideas
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread Canadian Politics Mega-thread YouTube Thread European Politico-economics QA Mega-thread
Fan Clubs
The herO Fan Club! The IdrA Fan Club
Media & Entertainment
Anime Discussion Thread [Manga] One Piece
Sports
2024 - 2026 Football Thread
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List
Blogs
How Esports Advertising Shap…
TrAiDoS
My 2025 Magic: The Gathering…
DARKING
Life Update and thoughts.
FuDDx
How do archons sleep?
8882
James Bond movies ranking - pa…
Topin
Customize Sidebar...

Website Feedback

Closed Threads



Active: 2015 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
Hungary11305 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
Next event in 2h 13m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
SortOf 179
Nina 97
StarCraft: Brood War
Sea 3026
Mong 265
Shuttle 59
GoRush 35
Bale 33
Larva 24
ToSsGirL 24
910 15
NotJumperer 5
Hyuk 0
Dota 2
XaKoH 524
NeuroSwarm105
League of Legends
JimRising 703
C9.Mang0316
Heroes of the Storm
Khaldor92
Other Games
WinterStarcraft616
KnowMe228
Mew2King218
febbydoto25
minikerr18
Liquid`RaSZi7
Organizations
Other Games
gamesdonequick983
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 13 non-featured ]
StarCraft 2
• Berry_CruncH116
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• iopq 6
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Rush1278
Upcoming Events
The PondCast
2h 13m
HomeStory Cup
1d 4h
Korean StarCraft League
1d 19h
HomeStory Cup
2 days
Replay Cast
2 days
HomeStory Cup
3 days
Replay Cast
3 days
Replay Cast
4 days
Wardi Open
5 days
WardiTV Invitational
6 days
Liquipedia Results

Completed

Proleague 2026-01-27
OSC Championship Season 13
Underdog Cup #3

Ongoing

CSL 2025 WINTER (S19)
KCM Race Survival 2026 Season 1
Acropolis #4 - TS4
Rongyi Cup S3
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter Qual
eXTREMESLAND 2025
SL Budapest Major 2025
ESL Impact League Season 8
BLAST Rivals Fall 2025

Upcoming

Escore Tournament S1: W6
Escore Tournament S1: W7
Acropolis #4
IPSL Spring 2026
uThermal 2v2 2026 Main Event
Bellum Gens Elite Stara Zagora 2026
LiuLi Cup: 2025 Grand Finals
HSC XXVIII
Nations Cup 2026
IEM Rio 2026
PGL Bucharest 2026
Stake Ranked Episode 1
BLAST Open Spring 2026
ESL Pro League Season 23
ESL Pro League Season 23
PGL Cluj-Napoca 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.