tag:blogger.com,1999:blog-1147784181901427860.post2976878003799278966..comments2015-08-13T06:05:34.762-07:00Comments on The Weekly Riddle: The Prisoners' Hats, Part 1Charlie Guthriehttp://www.blogger.com/profile/15624106792764866509noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-1147784181901427860.post-31936549983568774882012-12-11T08:58:16.879-08:002012-12-11T08:58:16.879-08:00This riddle ONLY works if Carl is blind. If they a...This riddle ONLY works if Carl is blind. If they all can see and are of equal intelligence 1) someone will dash out if they see 2 blacks, so no one has 2 blacks if any hesitation; 2) someone will dash out if they see 1 black and 1 white, since they know their hat must be white; 3) but with more hesitation they all rush out knowing they all have white.<br /><br />Albert, Barry, and Carl with 1 = white and 0 = black:<br /><br />A B C<br />1 1 1<br />0 1 1<br />1 0 1<br />1 1 0<br />0 0 1<br />1 0 0<br />0 1 0<br /><br />If Carl is blind, then Albert and Barry could make no inferences based on Carl's actions. C knows he and B aren't both in black since A didn't run out, and he and A aren't both in black since B didn't run out. So the only possibilities now are:<br /><br />A B C<br />1 1 1<br />0 1 1<br />1 0 1<br />1 1 0<br />0 0 1<br /><br />Blind Carl knows Albert and Barry would be racing out if Carl had black, because they've made all the same intelligent inferences. So, Carl knows he has white before the others know, if everyone is standing around hesitating.Trevor Sayrehttp://www.blogger.com/profile/11825445816648130429noreply@blogger.comtag:blogger.com,1999:blog-1147784181901427860.post-74038111119688161382012-11-14T06:41:03.076-08:002012-11-14T06:41:03.076-08:00What if Carl wears a black hat, and the other two ...What if Carl wears a black hat, and the other two white hats? They both see that there are one of each color and nobody can be sure which is on their head. Maybe if Carl wasn't blind this riddle would workAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-1147784181901427860.post-42477905573066666702012-10-27T23:58:55.042-07:002012-10-27T23:58:55.042-07:00The silence of the other prisoners says a lot - bu...The silence of the other prisoners says a lot - but there are some assumptions here that are being forgotten. I think this page does a good job of clarifying assumptions:<br /><br /><br />http://www.programmerinterview.com/index.php/puzzles/hat-puzzle-black-and-white-hats/Joehttp://www.blogger.com/profile/12568980537278420520noreply@blogger.comtag:blogger.com,1999:blog-1147784181901427860.post-54618866369952317922009-12-13T21:16:30.769-08:002009-12-13T21:16:30.769-08:00Since the solution hasn't been posted, I figur...Since the solution hasn't been posted, I figured I'd go ahead and put in a brief explanation. Fun puzzle, by the way.<br /><br />Carl's hat is white, and he can infer this from Albert and Barry's inability to tell the colors of their own hats.<br /><br />Given that there are only two black hats available, there are seven possible arrangements of hats among the three prisoners:<br /><br />(the table won't go in, because preformatted text is not allowed. Unfortunate. If you like, you can make a table with seven rows and three columns. Let a white hat encode binary zero, and a black hat encode binary one. Then, if Albert's hat color is the MSB, Barry's is in the middle, and Carl's is the LSB, row n is given by the binary representation of n-1.)<br /><br />An eighth scenario, in which each of the prisoners wears a black hat, is impossible, since there are only two black hats.<br /><br />Consider what Albert can infer from seeing Barry's and Carl's hats. The only way he could make a conclusive determination of his own hat color is if Barry and Carl were both wearing black hats. In that case, Albert would know he was wearing white. Since Albert is honest and intelligent, and does not know that he is wearing white, we know that Barry and Carl are not both wearing black hats -- this eliminates line 4 from the table above.<br /><br />Likewise, if Albert and Carl were both wearing black hats, Barry would immediately know that his hat was white. Since he doesn't know this, we can eliminate line 6.<br /><br />Finally, Barry knows that he and Carl are not both wearing black hats. If they were, Albert would know that his own hat was white. So, if Carl were wearing a black hat, and Albert's hat were white, Barry would know that his own hat must be white. Since he cannot infer this, Carl knows that his hat is white.Zachhttp://www.blogger.com/profile/11107439993314759422noreply@blogger.com