PuzzlersWorld.com

  • Hacker Puzzle
  • Interview Puzzles
  • Number Puzzles
  • Maths Puzzles

10 prisoners and hats puzzle

(9 votes, average: 3.78 out of 5)

April 20, 2013 by puzzler 12 Comments

Their are 10 prisoners in a jail for a minor crime, they all request the jail officer to set them free, jail officer agrees to release them tomorrow, saying i will

  1. Make you all stand in a queue in ascending order of your heights(smallest first).
  2. You will not be allowed to turn your head(they have to look straight)
  3. I will put one hat on your head, either BLACK or WHITE in color.
  4. Everyone of you has to tell the color of his hat starting from the tallest prisoner, you can only say BLACK or WHITE.
  5. You all will be released, if and only if at least 9 of you guess your hat’s color correctly.

Can you suggest a strategy to the prisoners to maximize the chances of their release?

10 prisoners and hats puzzle

10 prisoners and hats puzzle

10 prisoners and hats puzzle solution:-

I would suggest, think once again before reading the solution

Okay, If you tried enough:-

  1. The strategy is to count the number of white and black hats in front of them and say white if number of white hats are odd else say black.
  2. Now the next prisoner will count the white or black hats(depending on what the first person said) and if the count is even it means he has the same color hat else it is the opposite color hat.
  3. Now all other prisoner will keep making the count as odd or even depending on the previous prisoners answer and can predict their own hat color.
  4. This way, all prisoner will be able to guess the color of their hats correctly accept the first one, which will be having 50% probability.

In the above image:-

For the last prisoner=> number of white hats in front of him: 3(odd), so he will say white
For next prisoner: number of white hats in front of him: 3(odd), as the previous prisoner said white so it is black hat on his head.
Again for the next prisoner: number of white hats in front of him: 3(odd), as the the previous prisoner said black so it must be black hat on his head too.
Same logic for next 2 prisoners as well
Now the sixth prisoner from last see number of white hats as 2:(even)-> he can say it is his hat which was making the white at count odd, so his hat must be white in color.
Seventh prisoner can see now white hat count for previous prisoner is even and can predict the color of his hat.

  • Share on Whatsapp
  • Share on Facebook
  • Share on Twitter
Facebook Comments
Facebook
Next Puzzle
Minimum wins to qualify for playoffs

Checkout more Logical Puzzles Tags: Difficult, Hats Puzzles, Interview, Puzzle, Solved Puzzles

Comments

  1. Reality Checks says

    June 16, 2022 at 11:28 pm

    That is because the number of white and black hats aren’t even, necessarily.
    The fact that the number of total hats is even is obviously inferred from the fact that there are 10 prisoners participating (and thus 10 total hats).
    Nothing confusing about it.

    Reply
  2. Reality Check says

    June 16, 2022 at 11:25 pm

    You are a midwit, if that.

    Reply
  3. Rew_Rose says

    October 17, 2016 at 2:54 am

    Well , if the last person uses the given strategy’s first step to say ( for the given picture ) something like b-white ( kinda sounding like ‘bite’ )
    Now the next person knows his is ‘b’lack hat so he says a normal black
    The no.4 guy from left would say something like w-lack (almost ‘whack’ sound) and move on giving the message of ‘white hat’ to the next person in que
    This was all discussed the day before

    Reply
  4. Guest says

    September 5, 2014 at 4:56 pm

    Its so simple….
    Jail officer agrees to release them tomorrow so they can discuss this thing 1 day before that each person will give answer of next person’s hat color.

    Reply
    • puzzlersworld says

      September 19, 2014 at 10:21 pm

      This way, they will not tell correct color of their own hat 🙁

      Reply
      • guest says

        February 14, 2015 at 11:08 pm

        Nope, the last person will say the front ones colour to the person before him and he will say what colour he was wearing and so on. So at least 9 people are correct

        Reply
        • sanjay mehrotra says

          December 25, 2015 at 10:29 pm

          How?

          Reply
  5. Nishit says

    December 29, 2013 at 11:42 am

    The strategy is made by the prisoners on the previous day itself. So, only the tallest person could possible get his answer wrong with a probability of 50%

    Reply
  6. Dr. Travis Hedrick says

    November 1, 2013 at 5:50 pm

    There is no possible solution to this scenario. First, the terms of release for the prisoners have not been defined. Second, the prisoners have not been told how many numbers of each color would be represented, nor their significance. Third, you state that there is one condition, yet offer three that have no specific relevance to this problem, based on my first point. Finally, your wording is choppy and needs to be reworded for better clarification. My college students would actually like to have a complete problem to consider for our critical thinking discussion. Please notify me when you correct this problem. It has an interesting potential.

    Reply
  7. Rahul says

    September 29, 2013 at 11:52 am

    There is no mention that the number of caps are EVEN. This makes it a bit confusing.

    Reply
  8. Abinay says

    September 2, 2013 at 5:16 pm

    lol this one is very easy ,
    there is no condition that they should turn back or talk , they look at each other and find their hat colors

    Reply
    • puzzlersworld says

      September 2, 2013 at 5:37 pm

      To make it clear, they can not talk as they can only say black or white and they can not turn their head back.

      Reply

Leave a Comment Cancel reply

Submit your Puzzle

You may also like

  • Philip says truth only one day
  • Why manholes are round?
  • Decipher the hidden text
  • Did i speak to Tina or Meena ?
  • Nine children in house
  • Minimum wins to qualify for playoffs
  • Confusing one!
  • 10 coins in straight line puzzle
  • Average salary
  • Max runs by single player in cricket match

Categories

  • Aive hi Puzzles
  • Akbar and Birbal
  • Alphabetical Puzzles
  • Bollywood Puzzles
  • Google Code jam
  • Hindi Riddles
  • Interview Puzzles
  • Interview Questions
  • Logical Puzzles
  • Malayalam Puzzles
  • Maths Puzzles
  • Miscellaneous
  • Number Puzzles
  • Picture Puzzles
  • Riddles
  • Tamil Puzzles
  • Technical

Social

  • View puzzlersworld’s profile on Twitter
privacy policy

Copyright © 2023 · eleven40 Pro Theme on Genesis Framework · WordPress · Log in

  • Hacker Puzzle
  • Logo Puzzles
  • Optical Illusions
  • WhatsApp Puzzles
  • Picture Puzzles
  • Riddles
    ▼
    • Hindi Riddles
  • Bollywood Puzzles
  • Alphabetical Puzzles
  • Aive hi Puzzles
  • Interview Puzzles
  • Logical Puzzles
  • Interview Questions
    ▼
    • Data Structures
    • Binary Tree
    • Algorithms
    • Recursion Questions
    • Amazon Interview Questions
    • Snapdeal Interview Questions
    • Google Code jam
  • Technical
  • Akbar and Birbal
  • Number Puzzles
  • Maths Puzzles
  • Miscellaneous