• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 16:43
CEST 22:43
KST 05:43
  • 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
[ASL20] Ro24 Preview Pt1: Runway112v2 & SC: Evo Complete: Weekend Double Feature2Team Liquid Map Contest #21 - Presented by Monster Energy9uThermal's 2v2 Tour: $15,000 Main Event18Serral wins EWC 202549
Community News
Weekly Cups (Aug 11-17): MaxPax triples again!5Weekly Cups (Aug 4-10): MaxPax wins a triple6SC2's Safe House 2 - October 18 & 195Weekly Cups (Jul 28-Aug 3): herO doubles up6LiuLi Cup - August 2025 Tournaments7
StarCraft 2
General
Weekly Cups (Aug 11-17): MaxPax triples again! What mix of new and old maps do you want in the next 1v1 ladder pool? (SC2) : RSL Revival patreon money discussion thread Team Liquid Map Contest #21 - Presented by Monster Energy Would you prefer the game to be balanced around top-tier pro level or average pro level?
Tourneys
Sparkling Tuna Cup - Weekly Open Tournament RSL: Revival, a new crowdfunded tournament series LiuLi Cup - August 2025 Tournaments SEL Masters #5 - Korea vs Russia (SC Evo) Enki Epic Series #5 - TaeJa vs Classic (SC Evo)
Strategy
Custom Maps
External Content
Mutation # 487 Think Fast Mutation # 486 Watch the Skies Mutation # 485 Death from Below Mutation # 484 Magnetic Pull
Brood War
General
New season has just come in ladder ASL 20 HYPE VIDEO! [ASL20] Ro24 Preview Pt1: Runway BW General Discussion Which top zerg/toss will fail in qualifiers?
Tourneys
[ASL20] Ro24 Group A BWCL Season 63 Announcement Cosmonarchy Pro Showmatches KCM 2025 Season 3
Strategy
Simple Questions, Simple Answers Fighting Spirit mining rates [G] Mineral Boosting Muta micro map competition
Other Games
General Games
Stormgate/Frost Giant Megathread Nintendo Switch Thread Total Annihilation Server - TAForever Beyond All Reason [MMORPG] Tree of Savior (Successor of Ragnarok)
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
Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread Vanilla Mini Mafia
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread Things Aren’t Peaceful in Palestine European Politico-economics QA Mega-thread The Games Industry And ATVI
Fan Clubs
INnoVation Fan Club SKT1 Classic Fan Club!
Media & Entertainment
Movie Discussion! [Manga] One Piece Anime Discussion Thread [\m/] Heavy Metal Thread Korean Music Discussion
Sports
2024 - 2025 Football Thread TeamLiquid Health and Fitness Initiative For 2023 Formula 1 Discussion
World Cup 2022
Tech Support
Gtx660 graphics card replacement Installation of Windows 10 suck at "just a moment" Computer Build, Upgrade & Buying Resource Thread
TL Community
TeamLiquid Team Shirt On Sale The Automated Ban List
Blogs
The Biochemical Cost of Gami…
TrAiDoS
[Girl blog} My fema…
artosisisthebest
Sharpening the Filtration…
frozenclaw
ASL S20 English Commentary…
namkraft
StarCraft improvement
iopq
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1566 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
Hungary11291 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 3h 18m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
UpATreeSC 108
ProTech93
Nathanias 88
StarCraft: Brood War
Britney 19566
Calm 3468
Horang2 504
ggaemo 239
firebathero 129
LaStScan 115
Rock 24
soO 23
Dota 2
syndereN437
Counter-Strike
fl0m1952
Stewie2K207
PGG 49
Super Smash Bros
hungrybox412
PPMD98
Heroes of the Storm
Liquid`Hasu493
Other Games
Grubby2652
FrodaN1093
RotterdaM958
Mlord494
mouzStarbuck487
C9.Mang0265
SteadfastSC76
ZombieGrub72
Trikslyr68
Sick15
Organizations
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 19 non-featured ]
StarCraft 2
• kabyraGe 297
• davetesta42
• LaughNgamezSOOP
• sooper7s
• AfreecaTV YouTube
• intothetv
• Migwel
• Kozan
• IndyKCrew
StarCraft: Brood War
• Eskiya23 20
• 80smullet 12
• Pr0nogo 5
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• masondota21727
Counter-Strike
• Shiphtur304
Other Games
• imaqtpie1594
• WagamamaTV653
Upcoming Events
OSC
3h 18m
Replay Cast
13h 18m
Afreeca Starleague
13h 18m
JyJ vs TY
Bisu vs Speed
WardiTV Summer Champion…
14h 18m
PiGosaur Monday
1d 3h
Afreeca Starleague
1d 13h
Mini vs TBD
Soma vs sSak
WardiTV Summer Champion…
1d 14h
Online Event
2 days
The PondCast
2 days
WardiTV Summer Champion…
2 days
[ Show More ]
Replay Cast
3 days
LiuLi Cup
3 days
BSL Team Wars
3 days
Team Hawk vs Team Dewalt
Korean StarCraft League
4 days
CranKy Ducklings
4 days
SC Evo League
4 days
WardiTV Summer Champion…
4 days
[BSL 2025] Weekly
4 days
Sparkling Tuna Cup
5 days
SC Evo League
5 days
BSL Team Wars
5 days
Team Bonyth vs Team Sziky
Afreeca Starleague
6 days
Queen vs HyuN
EffOrt vs Calm
Wardi Open
6 days
Liquipedia Results

Completed

Proleague 2025-08-13
uThermal 2v2 Main Event
HCC Europe

Ongoing

Copa Latinoamericana 4
Jiahua Invitational
BSL 20 Team Wars
KCM Race Survival 2025 Season 3
BSL 21 Qualifiers
ASL Season 20
CSL Season 18: Qualifier 1
SEL Season 2 Championship
WardiTV Summer 2025
BLAST Bounty Fall 2025
BLAST Bounty Fall Qual
IEM Cologne 2025
FISSURE Playground #1
BLAST.tv Austin Major 2025

Upcoming

CSLAN 3
CSL 2025 AUTUMN (S18)
LASL Season 20
BSL Season 21
BSL 21 Team A
RSL Revival: Season 2
Maestros of the Game
PGL Masters Bucharest 2025
Thunderpick World Champ.
MESA Nomadic Masters Fall
CS Asia Championships 2025
Roobet Cup 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025
BLAST Open Fall Qual
Esports World Cup 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.