## Welcome to BrainDen.com - Brain Teasers Forum

 Welcome to BrainDen.com - Brain Teasers Forum. Like most online communities you must register to post in our community, but don't worry this is a simple free process. To be a part of BrainDen Forums you may create a new account or sign in if you already have an account. As a member you could start new topics, reply to others, subscribe to topics/forums to get automatic updates, get your own profile and make new friends. Of course, you can also enjoy our collection of amazing optical illusions and cool math games. If you like our site, you may support us by simply clicking Google "+1" or Facebook "Like" buttons at the top. If you have a website, we would appreciate a little link to BrainDen. Thanks and enjoy the Den :-)
Guest Message by DevFuse

# vivekkumarjha

Member Since 13 Jun 2012
Offline Last Active Jun 13 2012 06:36 PM

### In Topic: Hats on a death row!! One of my favorites puzzles!

13 June 2012 - 06:36 PM

Sorry. I must have missed something in the instructions. This solution only works when there are 10 black hats and 10 red hats. No where in the instructions does it say this. The solution fails if there are different numbers of black and red hats. There could be 19 black hats and 1 red hat.

no the solution doesn't fail.
suppose there are 19 black and 1 red hat
then 20th last prisoner shouts black (key word for black being odd)
he does not know his own hats colour so he may or may not be saved
but the 19th prisoner knows that including his hat there are odd number of black hats, now if he sees even black hats, his hats colour is black, but if he sees odd black colours, his hat colour is red
now suppose he sees odd black colour, then he shouts red
the others keep on counting, this red means red is now odd (key word for red being odd)
the others would keep a note of it and carry on like wise

### In Topic: Hats on a death row!! One of my favorites puzzles!

13 June 2012 - 05:38 PM

well, nice one
but the slightest mistake and all would be executed