|
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.
|
It's when I'm presented with a problem like this that I realize how stupid I am.
|
how many viziers are there?
|
+ 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..
|
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
|
are the vizjens isolated from each other and can they see each other's hats?
|
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 .
|
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.
|
On January 31 2008 08:51 .MistiK wrote: how many viziers are there? Irrelevant.
|
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.
|
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.
|
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?
|
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.
|
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.
|
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.
|
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.
|
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 [:
|
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)?
|
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.
|
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?
|
|
|
|