Jump to content
When you buy through links on our site, we may earn an affiliate commission.
  • Current Donation Goals

Pirates And Ninjas - Oh My!


Devedander

Recommended Posts

This was moved out of the triangle thread:

Googling searching for the answer is cheating! Brain power only :)

100 pirates are captured by a clan of ninjas. The ninjas tell the pirates that being honrable they will give the pirates a way to be let free, they will be blindfolded and a hat put on their heads (white or black - there are infinite white and black hats to draw from). They will then be lined up on a hill facing down the hill such that each pirate can see every pirate and hat in front of him and blindfolds removed.

Then starting from the back of the line, the last pirate will be asked his hat color, he must whisper his answer to the ninja guard so that no one else can hear. The guard will call out his answer in a plain fashion so that everyone can hear.

They will progress up the line until all 100 pirates have answered from back to front what their hat color is. If more than 1 gets his wrong, they are all killed. If 1 or 0 gets his wrong, they are all let go.

The pirates are given a day to plan a strategy for this situation.

What strategy will get them released?

Assume smart pirates, math skills and other cognotive skills sufficient to carry out a complex strategy. These are harvard pirates.

There is to be no information traded between pirates after blindfolds are put on other than the color of their hats - ie they cannot cough, shout or answer in a strange accent to give info, essentially this is a logic solution, not a funny business solution

EDIT The description has been changed slightly to make it clear and impossible what kind of information each pirate can pass to the other pirates. The only information that can be considered is what the pirate thinks his own hat color is. This does not change the problem or the solution at all, just clarifies.

Bonus points:

Solve this for 101 pirates and/or solve for any number of pirates.

Edited by Devedander
Link to comment
Share on other sites

This was moved out of the triangle thread:

Googling searching for the answer is cheating! Brain power only :)

100 pirates are captured by a clan of ninjas. The ninjas tell the pirates that being honrable they will give the pirates a way to be let free, they will be blindfolded and a hat put on their heads (white or black - there are infinite white and black hats to draw from). They will then be lined up on a hill facing down the hill such that each pirate can see every pirate and hat in front of him and blindfolds removed.

Then starting from the back of the line, the last pirate will be asked his hat color. Every pirate can hear what every pirate before him says.

They will progress up the line until all 100 pirates have answered from back to front what their hat color is. If more than 1 gets his wrong, they are all killed. If 1 or 0 gets his wrong, they are all let go.

The pirates are given a day to plan a strategy for this situation.

What strategy will get them released?

Assume smart pirates, math skills and other cognotive skills sufficient to carry out a complex strategy. These are harvard pirates.

There is to be no information traded between pirates after blindfolds are put on other than the color of their hats - ie they cannot cough, shout or answer in a strange accent to give info, essentially this is a logic solution, not a funny business solution

the only thing i can think of is that they would plan for the last pirate (first to answer) to answer with the color of the hat in front of him. Even if the guessor is wrong, he would be telling the next in line what color his hat is. the next guessor would indicate his color taking his clue from the previous answer, and than (if this is allowed) tell the next person the color he is wearing. So pirate 1: I am wearing BLACK Pirate 2 I am wearing Black and the guy in front of me is wearing White... etc...

Maybe this isn't the right answer but unless I am reading the question wrong this is an instance of what is known as Probabliity with replacement" which means each pirate has a 50/50 chance of answering correctly otherwise.

EDIT:

Actually, that sounds ridiculous, even to me.

Link to comment
Share on other sites

the only thing i can think of is that they would plan for the last pirate (first to answer) to answer with the color of the hat in front of him. Even if the guessor is wrong, he would be telling the next in line what color his hat is. the next guessor would indicate his color taking his clue from the previous answer, and than (if this is allowed) tell the next person the color he is wearing. So pirate 1: I am wearing BLACK Pirate 2 I am wearing Black and the guy in front of me is wearing White... etc...

Maybe this isn't the right answer but unless I am reading the question wrong this is an instance of what is known as Probabliity with replacement" which means each pirate has a 50/50 chance of answering correctly otherwise.

Good try, but let's say the last three pirate hats are B W B

Last pirate says "white" so the guy in front of him knows, guy 2 says "White" knowing his hat is white... but now what about guy 3? He knows nothing to help with his hat...

He could simply guess opposite of the guy behind him but then what about

B W W

Edited by Devedander
Link to comment
Share on other sites

Good try, but let's say the last three pirate hats are B W B

Last pirate says "white" so the guy in front of him knows, guy 2 says "White" knowing his hat is white... but now what about guy 3? He knows nothing to help with his hat...

He could simply guess opposite of the guy behind him but then what about

B W W

or even B B B, or W W W

yeah, i know.. that is why i said it was ridiculous...

Link to comment
Share on other sites

I tend to think that the easiest solution has to be the right one.

Considering there is an infinite number of black and white hats to choose from there really is no mathematical formula to figure it all out before hand.

Since only one person can guess wrong it has to be the guy that goes first as he has NO way of knowing which color his hat is.

The only way to get out of it would be as roughly stated above, for the guy behind you to let you know what color hat you have on so you can guess correctly.

This also brings up another problem

if the first guy says black because the guy in front of him has a black hat on, the second guy knows his hat is black, but what if the guy in front of him has a white hat on? If the second guy says black which is what color hat he is wearing then he would be giving the guy in front of him the wrong answer.

So the simplest thing to do would be for the guy behind you to give you the answer to your hat and still have a way to correctly guess his hat color.

All you have to do is think of two ways to pronounce black and two ways to pronounce white, or even simpler just figure out a part of each word to annunciate more.

So if the first guy says black then the next guy knows his hat is black, but the guy in front of him has a white hat so he can say bllack annunciating the "bl" more which would be a clue to the guy in front of him that even though he is saying black you really have a white hat on. Then the guy with the white hat knows that even though he is hearing black he really has a white hat on. Then the 3rd guy has a black hat on so the guy could say white which would be correct, but if he annunciates the "wh" more than the rest of the word the guy in front of him would know that even though he is hearing white he really has a black hat on.

Link to comment
Share on other sites

@ Ken and @jdkno I think that's covered here:

There is to be no information traded between pirates after blindfolds are put on other than the color of their hats - ie they cannot cough, shout or answer in a strange accent to give info, essentially this is a logic solution, not a funny business solution
Link to comment
Share on other sites

What if the last pirate yells out "I have the same colour hat as pirate 1, 4, 7, 9, 13...............and that is black"

Ken

that is kinda what i was trying to say... poorly....

Link to comment
Share on other sites

I tend to think that the easiest solution has to be the right one.

if the first guy says black because the guy in front of him has a black hat on, the second guy knows his hat is black, but what if the guy in front of him has a white hat on? If the second guy says black which is what color hat he is wearing then he would be giving the guy in front of him the wrong answer.

So the simplest thing to do would be for the guy behind you to give you the answer to your hat and still have a way to correctly guess his hat color..

All you have to do is think of two ways to pronounce black and two ways to pronounce white, or even simpler just figure out a part of each word to annunciate more.

So if the first guy says black then the next guy knows his hat is black, but the guy in front of him has a white hat so he can say bllack annunciating the "bl" more which would be a clue to the guy in front of him that even though he is saying black you really have a white hat on. Then the guy with the white hat knows that even though he is hearing black he really has a white hat on. Then the 3rd guy has a black hat on so the guy could say white which would be correct, but if he annunciates the "wh" more than the rest of the word the guy in front of him would know that even though he is hearing white he really has a black hat on.

Vizzini: Now, a clever man would put the poison into his own goblet, because he would know that only a great fool would reach for what he was given. I am not a great fool, so I can clearly not choose the wine in front of you. But you must have known I was not a great fool, you would have counted on it, so I can clearly not choose the wine in front of me!

sorry... i just saw a lot of similarity... :rolleyes:

Link to comment
Share on other sites

There is to be no information traded between pirates after blindfolds are put on other than the color of their hats - ie they cannot cough, shout or answer in a strange accent to give info, essentially this is a logic solution, not a funny business solution

Ok so if they can't trade any information "Other Than" the color of their hats then that would mean that they can trade info on the color of their hats or was this just a grammatical error?

Link to comment
Share on other sites

No, it means that you cannot in anyway pass information about anything besides the color you think your hat is ie if you use an accent to answer thus providing the guy in front of you some info about his hat in the process you are passing more info than the color of your hat.

You will see that it is specifically an example that they may not use accents to denote extra information.

To make it more clear I will edit the original question.

Edited by Devedander
Link to comment
Share on other sites

I do not see the similarity... in fact I do not think that means what you think it means...

Just wait till i get started!! You fell victim to one of the classic blunders, the most famous of which is, "Never get involved in a land war in Asia." But only slightly less well known is this, "Never go in against a Sicilian, when death is on the line." :thumbsupsmileyanim:

it is definetly not a probability calculation because of the 'replacement' factor, i.e. the infinite number of hats of both colors. the first guy giving the answer is definetly the key.. somehow he needs to communicate not just with the guy in front of him, but with ALL the guys in front of him the key is not just with the one person in front of him, it is with all the guys in front of him... he has to use his guess as a means to start a communication chain.. that everyone else feeds from.... i just can't figure out how or what and it is driving me crazy... I HATE YOU FOR THIS!! :angry:

Link to comment
Share on other sites

Hate me because I am beautiful but do not hate me for my logic puzzles :)

If it helps at all, you are correct that the infinite hats means no probability exists and that indeed the first guy to answer plays a very pivotal roll in the whole ordeal.

each piratecounts the number of black and white hats ahead of him. the first guy to guess chooses the color of the guy immediately after him as his color. the next guy now knows his color and the number of B and W hats that remain. he calls his number. the third guy knows the number of B and W hats in front of him. he just needs to subtact the colors that the other two called out!!!

The only thing i am not sure about is the first guy. He is calling out the second guy's color as his own. If he is wrong, will he know right away? If yes, the puzzle is solved!! in which case I would have to again remind you that "You fell victim to one of the classic blunders, the most famous of which is, "Never get involved in a land war in Asia." But only slightly less well known is this, "Never go in against a Sicilian, when death is on the line." :thumbsupsmileyanim:

If not it is back to the drawing board in which case I think I will drink from a poisened goblet

Link to comment
Share on other sites

each piratecounts the number of black and white hats ahead of him. the first guy to guess chooses the color of the guy immediately after him as his color. the next guy now knows his color and the number of B and W hats that remain. he calls his number. the third guy knows the number of B and W hats in front of him. he just needs to subtact the colors that the other two called out!!!

The only thing i am not sure about is the first guy. He is calling out the second guy's color as his own. If he is wrong, will he know right away? If yes, the puzzle is solved!! in which case I would have to again remind you that "You fell victim to one of the classic blunders, the most famous of which is, "Never get involved in a land war in Asia." But only slightly less well known is this, "Never go in against a Sicilian, when death is on the line." :thumbsupsmileyanim:

If not it is back to the drawing board in which case I think I will drink from a poisened goblet

Very good but if I am following properly it doesn't quite work...

First guy calls out the guy in front of his hat color. He may well be wrong about his own, but that's ok, one guy can get it wrong.

Ok, next guy knows his color now, sweet, he says whatever it is.

Now we are on guy 3... he knows how many black and white are in front of him, but nothing about his own hat...

Uh oh...

Let's look at B W W B B W

Last guy says white. He is wrong. Oh well.

Second guy knows there are 2 whites and 2 blacks ahead, but has to say white to answer his own color.

Third guy now sees 2 blacks and 1 white ahead... but what can he do with this info?

But you are on the right track.

Edited by Devedander
Link to comment
Share on other sites

each prisoner counts the number of black and white hats ahead of him. the first guy to guess chooses the color of the guy immediately after him as his color. the next guy now knows his color and the number of B and W hats that remain. he calls his number. the third guy knows the number of B and W hats in front of him. he just needs to subtact the colors that the other two called out!!!

The only thing i am not sure about is the first guy. He is calling out the second guy's color as his own. If he is wrong, will he know right away? If yes, the puzzle is solved!! in which case I would have to again remind you that "You fell victim to one of the classic blunders, the most famous of which is, "Never get involved in a land war in Asia." But only slightly less well known is this, "Never go in against a Sicilian, when death is on the line." :thumbsupsmileyanim:

If not it is back to the drawing board in which case I think I will drink from a poisened goblet

Got it, they decide the first color called based on what the guy in the back sees in front of him. Lets say he counts 52 black hats and only 47 white hats. He would call out Black.

Now the guy in front of him would know that there are more black hats than white hats, so in turn he counts that there are lets say 52 black hats in front of him and only 46 white hats he now knows that his hat has to be white. Now provided they all follow along with the answers that come down the line, simple addition and subtraction should let each one of them know what color hat they have on.

Link to comment
Share on other sites

Got it, they decide the first color called based on what the guy in the back sees in front of him. Lets say he counts 52 black hats and only 47 white hats. He would call out Black.

Now the guy in front of him would know that there are more black hats than white hats, so in turn he counts that there are lets say 52 black hats in front of him and only 46 white hats he now knows that his hat has to be white. Now provided they all follow along with the answers that come down the line, simple addition and subtraction should let each one of them know what color hat they have on.

I am not sure about that... because second guy knows there are more black than white ahead of him, he sees 52 black hats and 46 white hats.

If his hat is black, then the last guy saw more black hats than white hats.

If his hat is white, the last guy still saw more black hats than white hats.

I don't think that works out becuase either way the last guy still says "black" (or whatever they agreed means more black than white hats) but it doesn't garuantee guy 2 knows his hat color....

Example (assume that all the pirates represented by dots are wearing black hats):

BWBBB...BBBWW

BBBBB...BBBWW

Here both ways last guy sees more black than white. He says Black.

Second guy sees more black than white also... he has no idea which way to go.

Edited by Devedander
Link to comment
Share on other sites

What do you do if you end up with the same number of black and white hats ahead of you?

Well if you followed the answers of the people behind you, you should know that at this point there should either be more blacks or more whites, if you see 6 of each and lets say there are supposed to be more whites than blacks at this point then you would know that your hat should be white.

Link to comment
Share on other sites

Very good but if I am following properly it doesn't quite work...

First guy calls out the guy in front of his hat color. He may well be wrong about his own, but that's ok, one guy can get it wrong.

Ok, next guy knows his color now, sweet, he says whatever it is.

Now we are on guy 3... he knows how many black and white are in front of him, but nothing about his own hat...

Uh oh...

Let's look at B W W B B W

Last guy says white. He is wrong. Oh well.

Second guy knows there are 2 whites and 2 blacks ahead, but has to say white to answer his own color.

Third guy now sees 2 blacks and 1 white ahead... but what can he do with this info?

But you are on the right track.

You're right... that doesn't make sense....

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...
Please Sign In or Sign Up