• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 12:34
CEST 18:34
KST 01:34
  • 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
Team Liquid Map Contest #22 - The Finalists10[ASL21] Ro16 Preview Pt1: Fresh Flow9[ASL21] Ro24 Preview Pt2: News Flash10[ASL21] Ro24 Preview Pt1: New Chaos0Team Liquid Map Contest #22 - Presented by Monster Energy21
Community News
2026 GSL Season 1 Qualifiers8Maestros of the Game 2 announced32026 GSL Tour plans announced8Weekly Cups (April 6-12): herO doubles, "Villains" prevail0MaNa leaves Team Liquid18
StarCraft 2
General
2026 GSL Tour plans announced https://www.facebook.com/FunguLuxUK.Official/ Team Liquid Map Contest #22 - The Finalists Maestros of the Game 2 announced Weekly Cups (April 6-12): herO doubles, "Villains" prevail
Tourneys
2026 GSL Season 1 Qualifiers Sparkling Tuna Cup - Weekly Open Tournament Master Swan Open (Global Bronze-Master 2) SEL Doubles (SC Evo Bimonthly) $5,000 WardiTV TLMC tournament - Presented by Monster Energy
Strategy
Custom Maps
[D]RTS in all its shapes and glory <3 [A] Nemrods 1/4 players [M] (2) Frigid Storage
External Content
Mutation # 521 Memorable Boss The PondCast: SC2 News & Results Mutation # 520 Moving Fees Mutation # 519 Inner Power
Brood War
General
BGH Auto Balance -> http://bghmmr.eu/ BW General Discussion ASL21 General Discussion Data needed A cwal.gg Extension - Easily keep track of anyone
Tourneys
[ASL21] Ro16 Group B [Megathread] Daily Proleagues [ASL21] Ro16 Group A [ASL21] Ro24 Group F
Strategy
What's the deal with APM & what's its true value Any training maps people recommend? Fighting Spirit mining rates Muta micro map competition
Other Games
General Games
General RTS Discussion Thread Battle Aces/David Kim RTS Megathread Nintendo Switch Thread Stormgate/Frost Giant Megathread Starcraft Tabletop Miniature Game
Dota 2
The Story of Wings Gaming Official 'what is Dota anymore' discussion
League of Legends
G2 just beat GenG in First stand
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
Vanilla Mini Mafia Mafia Game Mode Feedback/Ideas TL Mafia Community Thread Five o'clock TL Mafia
Community
General
US Politics Mega-thread Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread Canadian Politics Mega-thread European Politico-economics QA Mega-thread
Fan Clubs
The IdrA Fan Club
Media & Entertainment
[Req][Books] Good Fantasy/SciFi books [Manga] One Piece Movie Discussion!
Sports
2024 - 2026 Football Thread Formula 1 Discussion Cricket [SPORT] Tokyo Olympics 2021 Thread
World Cup 2022
Tech Support
[G] How to Block Livestream Ads
TL Community
The Automated Ban List
Blogs
Reappraising The Situation T…
TrAiDoS
lurker extra damage testi…
StaticNine
Broowar part 2
qwaykee
Funny Nicknames
LUCKY_NOOB
Iranian anarchists: organize…
XenOsky
ASL S21 English Commentary…
namkraft
Customize Sidebar...

Website Feedback

Closed Threads



Active: 2616 users

Sultan and his Viziers

Blogs > fanatacist
Post a Reply
1 2 Next All
fanatacist
Profile Blog Joined August 2007
10319 Posts
January 30 2008 23:37 GMT
#1
This is a logic problem, with a light bit of 1st grade algebra in it (yes that is a hint ;D).

The Sultan is displeased with his Viziers and summons them to test if all of them are worthy of keeping. He tells them they will be tested the next morning, and until then they have to devise a strategy for the following conditions:

1. The Sultan will place a hat on the head of each Vizier. The hat will either be red or blue.
2. The Sultan will then ask the Viziers, one by one, to name the color of the hat on their head correctly; only one can be wrong about the color of the hat on his head.
3. They are not allowed to communicate with each other in any way, or use any tricks or mirrors to see the hat on their head.
4. They have the night to come up with a strategy to this problem.

How do they do it? I will answer any questions with yes/no or irrelevant/relevant.

***
Peace~
Pwntrucci[sR]
Profile Blog Joined June 2006
Canada1519 Posts
January 30 2008 23:46 GMT
#2
It's when I'm presented with a problem like this that I realize how stupid I am.
bg
.MistiK
Profile Blog Joined August 2007
Netherlands347 Posts
January 30 2008 23:51 GMT
#3
how many viziers are there?
Caller
Profile Blog Joined September 2007
Poland8075 Posts
January 31 2008 00:26 GMT
#4
+ Show Spoiler +
If there are an equal amount of hats
Each person sees x white hats and y black hats, but they don't know what their hat is.
A person sees lets say 5 white hats 4 black hats. He thinks he has a black hat and guesses. If correct, then the next people know that they must have a hat that they can't see, i.e. a white/black hat, based on how many hats they see..
Watch me fail at Paradox: http://www.teamliquid.net/forum/viewmessage.php?topic_id=397564
Emptyness
Profile Blog Joined June 2007
Bulgaria1016 Posts
Last Edited: 2008-01-31 00:52:27
January 31 2008 00:35 GMT
#5
On January 31 2008 09:26 Caller wrote:
+ Show Spoiler +
If there are an equal amount of hats
Each person sees x white hats and y black hats, but they don't know what their hat is.
A person sees lets say 5 white hats 4 black hats. He thinks he has a black hat and guesses. If correct, then the next people know that they must have a hat that they can't see, i.e. a white/black hat, based on how many hats they see..


Question for Caller (spoiler for others ):
+ Show Spoiler +
But what about not equal amount of hat? And the "only one can be wrong about the color of the hat on his head" - part - because in your case - everyone guessed right
Fall down 9 times, Get up 10.
Rev0lution
Profile Blog Joined August 2007
United States1805 Posts
January 31 2008 00:56 GMT
#6
are the vizjens isolated from each other and can they see each other's hats?
My dealer is my best friend, and we don't even chill.
Emptyness
Profile Blog Joined June 2007
Bulgaria1016 Posts
January 31 2008 01:01 GMT
#7
On January 31 2008 09:56 Rev0lution wrote:
are the vizjens isolated from each other and can they see each other's hats?


If they are isolated from each other, there is exactly 50% chance to guess their hat right - that means - a lot of them will be wrong - I don't think that's the case here, they should be able to see each other - something else is the tricky part .
Fall down 9 times, Get up 10.
fanatacist
Profile Blog Joined August 2007
10319 Posts
January 31 2008 01:10 GMT
#8
On January 31 2008 09:26 Caller wrote:
+ Show Spoiler +
If there are an equal amount of hats
Each person sees x white hats and y black hats, but they don't know what their hat is.
A person sees lets say 5 white hats 4 black hats. He thinks he has a black hat and guesses. If correct, then the next people know that they must have a hat that they can't see, i.e. a white/black hat, based on how many hats they see..

The amount of hats is unknown.
Peace~
fanatacist
Profile Blog Joined August 2007
10319 Posts
January 31 2008 01:11 GMT
#9
On January 31 2008 08:51 .MistiK wrote:
how many viziers are there?

Irrelevant.
Peace~
fanatacist
Profile Blog Joined August 2007
10319 Posts
January 31 2008 01:12 GMT
#10
On January 31 2008 10:01 Emptyness wrote:
Show nested quote +
On January 31 2008 09:56 Rev0lution wrote:
are the vizjens isolated from each other and can they see each other's hats?


If they are isolated from each other, there is exactly 50% chance to guess their hat right - that means - a lot of them will be wrong - I don't think that's the case here, they should be able to see each other - something else is the tricky part .

Hint warning:
+ Show Spoiler +
Seriously, free minds and problem solvers should not read this:
+ Show Spoiler +
That is correct. You have to include that in your strategy somehow.
Peace~
fanatacist
Profile Blog Joined August 2007
10319 Posts
January 31 2008 01:13 GMT
#11
On January 31 2008 08:46 Pwntrucci[sR] wrote:
It's when I'm presented with a problem like this that I realize how stupid I am.

Don't be disheartened, even a little effort put to it makes you smarter than most [: It's not the answer that is important, it's using your brain to get to the solution - even a small attempt is worthy of praise.
Peace~
Oceanic
Profile Blog Joined November 2007
United States122 Posts
Last Edited: 2008-01-31 02:00:01
January 31 2008 01:56 GMT
#12
Is there an equal number of red and blue hats or almost equal like if there's an odd number of viziers for example if there were 19 would there be 10 red hats and 9 blue hats?
I need a sig
fanatacist
Profile Blog Joined August 2007
10319 Posts
January 31 2008 02:02 GMT
#13
On January 31 2008 10:56 Oceanic wrote:
Is there an equal number of red and blue hats or almost equal like if there's an odd number of viziers for example if there were 19 would there be 10 red hats and 9 blue hats?

The amount of hats is unknown. So is the ratio of the hat colors.

If you were referring to the other post someone made, then yea, if you have a red hat, you'd have a 50/50 shot at it.
Peace~
Oceanic
Profile Blog Joined November 2007
United States122 Posts
January 31 2008 02:07 GMT
#14
I'm working on a solution but can you tell me if I'm on the right track?
+ Show Spoiler +
The 1st person says the color of the person after him and he is the person who gets it wrong.
I need a sig
Macavenger
Profile Blog Joined January 2008
United States1132 Posts
Last Edited: 2008-01-31 03:08:24
January 31 2008 02:47 GMT
#15
On January 31 2008 11:07 Oceanic wrote:
I'm working on a solution but can you tell me if I'm on the right track?
+ Show Spoiler +
The 1st person says the color of the person after him and he is the person who gets it wrong.


+ Show Spoiler [For Oceanic] +
That breaks down at the third person, as the second person must repeat the answer of the first, giving the third no information. It also isn't stated that the viziers know which order they'll be asked in.


I somehow read that there were 4 viziers the first time I read the problem and solved that.

+ Show Spoiler [Special case for 4 hats] +
The first vizier looks at the three hats visible to him. If he sees a 2-1 split, he announces the color he sees 2 of; if the split is 3-0 he announces the color he sees 0 of. From this, the other 3 can each infer their own hat color - If I'm not first and see the same color on the other two who aren't first, if the first guy calls that color I'm the opposite, whereas if he calls the opposite I'm the same. If I see each color on the other 2, I know I'm whatever color he calls. If the first person's call is wrong, the other 3 all announce their colors correctly, if he happened to be correct with his signal color the last simply "guesses" wrong.


I'm trying to work out a way to generalize that to an unspecified number of hats now.

+ Show Spoiler +
Not knowing whether there's an even number of viziers - and thus whether I can count on the first guy seeing some level of imbalance in the number of hats - is kinda screwing with me at the moment.


Edit: Ok, I got it.

+ Show Spoiler [Solution] +
The first vizier announces red if he sees an odd number of red hats, and blue if he sees an even number of red hats. Since all other viziers can count whether the number of red hats they see not counting the first vizier is odd or even, they can all determine the color of hat they wear from this information. Again, if the first vizier announced his color incorrectly, all the following announce their own correctly; otherwise the last vizier intentionally announces his color incorrectly to meet that condition.
fanatacist
Profile Blog Joined August 2007
10319 Posts
January 31 2008 03:16 GMT
#16
On January 31 2008 11:07 Oceanic wrote:
I'm working on a solution but can you tell me if I'm on the right track?
+ Show Spoiler +
The 1st person says the color of the person after him and he is the person who gets it wrong.

+ Show Spoiler +
Wrong. What would the third person say? He would not be able to say both his hat color and the color of the next person in line.
Peace~
fanatacist
Profile Blog Joined August 2007
10319 Posts
January 31 2008 03:18 GMT
#17
On January 31 2008 11:47 Macavenger wrote:
Show nested quote +
On January 31 2008 11:07 Oceanic wrote:
I'm working on a solution but can you tell me if I'm on the right track?
+ Show Spoiler +
The 1st person says the color of the person after him and he is the person who gets it wrong.


+ Show Spoiler [For Oceanic] +
That breaks down at the third person, as the second person must repeat the answer of the first, giving the third no information. It also isn't stated that the viziers know which order they'll be asked in.


I somehow read that there were 4 viziers the first time I read the problem and solved that.

+ Show Spoiler [Special case for 4 hats] +
The first vizier looks at the three hats visible to him. If he sees a 2-1 split, he announces the color he sees 2 of; if the split is 3-0 he announces the color he sees 0 of. From this, the other 3 can each infer their own hat color - If I'm not first and see the same color on the other two who aren't first, if the first guy calls that color I'm the opposite, whereas if he calls the opposite I'm the same. If I see each color on the other 2, I know I'm whatever color he calls. If the first person's call is wrong, the other 3 all announce their colors correctly, if he happened to be correct with his signal color the last simply "guesses" wrong.


I'm trying to work out a way to generalize that to an unspecified number of hats now.

+ Show Spoiler +
Not knowing whether there's an even number of viziers - and thus whether I can count on the first guy seeing some level of imbalance in the number of hats - is kinda screwing with me at the moment.


Edit: Ok, I got it.

+ Show Spoiler [Solution] +
The first vizier announces red if he sees an odd number of red hats, and blue if he sees an even number of red hats. Since all other viziers can count whether the number of red hats they see not counting the first vizier is odd or even, they can all determine the color of hat they wear from this information. Again, if the first vizier announced his color incorrectly, all the following announce their own correctly; otherwise the last vizier intentionally announces his color incorrectly to meet that condition.


+ Show Spoiler +
That last sentence is unnecessary - only one CAN be wrong - but yes you got it correct, nicely done [:
Peace~
Motiva
Profile Joined November 2007
United States1774 Posts
January 31 2008 03:41 GMT
#18
The first person's answer is the color of the hats of everyone around him in order (assuming they're standing in some sort of formation)?
fanatacist
Profile Blog Joined August 2007
10319 Posts
January 31 2008 12:02 GMT
#19
On January 31 2008 12:41 Motiva wrote:
The first person's answer is the color of the hats of everyone around him in order (assuming they're standing in some sort of formation)?

... What? They are only allowed to say the color of the hat on their own head.
Peace~
DaasEuGen
Profile Blog Joined May 2007
Germany35 Posts
January 31 2008 21:07 GMT
#20
the first vizier looks at someone who has a red hat and says: "red". one can be wrong, so it doesn't matter which colour the hat of the first person has. then the one the first vizier looked at looks at another vizier with a red hat and says "red". this goes on until the perons with the last red hat cannot see any remaining red hats. this person closes his eyes and says "red". this is the signal for the other viziers, that the remaining hats are blue.
Is this wrong?
1 2 Next All
Please log in or register to reply.
Live Events Refresh
Next event in 7h 26m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
elazer 258
SteadfastSC 143
mouzHeroMarine 86
trigger 72
StarCraft: Brood War
Britney 38849
Jaedong 2578
Horang2 2529
Mini 1206
Soma 1097
Snow 648
firebathero 538
Larva 491
Light 346
Rush 307
[ Show more ]
Soulkey 257
hero 185
ggaemo 102
Aegong 59
Hyun 36
Free 30
sorry 28
HiyA 24
soO 20
Rock 18
Sexy 10
NaDa 8
Bale 7
ivOry 6
Terrorterran 4
Dota 2
420jenkins419
Counter-Strike
fl0m4105
olofmeister3495
ceh9300
zeus299
kRYSTAL_17
Other Games
FrodaN722
RotterdaM404
Grubby354
TKL 111
ArmadaUGS88
markeloff63
KnowMe59
QueenE46
Mew2King34
Trikslyr30
Organizations
Counter-Strike
PGL108
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 21 non-featured ]
StarCraft 2
• poizon28 41
• LUISG 19
• iHatsuTV 14
• HeavenSC 13
• sooper7s
• AfreecaTV YouTube
• intothetv
• Migwel
• Kozan
• IndyKCrew
• LaughNgamezSOOP
StarCraft: Brood War
• HerbMon 26
• FirePhoenix9
• blackmanpl 5
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• lizZardDota288
League of Legends
• Nemesis2695
• TFBlade1383
Other Games
• WagamamaTV286
Upcoming Events
Replay Cast
7h 26m
The PondCast
17h 26m
WardiTV Map Contest Tou…
18h 26m
CranKy Ducklings
1d 7h
Escore
1d 17h
WardiTV Map Contest Tou…
1d 18h
OSC
1d 22h
Korean StarCraft League
2 days
CranKy Ducklings
2 days
WardiTV Map Contest Tou…
2 days
[ Show More ]
IPSL
2 days
WolFix vs nOmaD
dxtr13 vs Razz
BSL
3 days
Sparkling Tuna Cup
3 days
WardiTV Map Contest Tou…
3 days
Ladder Legends
3 days
BSL
4 days
IPSL
4 days
JDConan vs TBD
Aegong vs rasowy
Replay Cast
4 days
Replay Cast
4 days
Wardi Open
4 days
Afreeca Starleague
4 days
Bisu vs Ample
Jaedong vs Flash
Monday Night Weeklies
4 days
RSL Revival
5 days
Afreeca Starleague
5 days
Barracks vs Leta
Royal vs Light
WardiTV Map Contest Tou…
5 days
RSL Revival
6 days
Liquipedia Results

Completed

Proleague 2026-04-14
RSL Revival: Season 4
NationLESS Cup

Ongoing

BSL Season 22
ASL Season 21
CSL 2026 SPRING (S20)
IPSL Spring 2026
StarCraft2 Community Team League 2026 Spring
Nations Cup 2026
IEM Rio 2026
PGL Bucharest 2026
Stake Ranked Episode 1
BLAST Open Spring 2026
ESL Pro League S23 Finals
ESL Pro League S23 Stage 1&2
PGL Cluj-Napoca 2026
IEM Kraków 2026

Upcoming

KCM Race Survival 2026 Season 2
Escore Tournament S2: W3
Escore Tournament S2: W4
Acropolis #4
BSL 22 Non-Korean Championship
CSLAN 4
Kung Fu Cup 2026 Grand Finals
HSC XXIX
uThermal 2v2 2026 Main Event
RSL Revival: Season 5
2026 GSL S1
WardiTV TLMC #16
IEM Cologne Major 2026
Stake Ranked Episode 2
CS Asia Championships 2026
Asian Champions League 2026
IEM Atlanta 2026
PGL Astana 2026
BLAST Rivals Spring 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.