Results 1 to 2 of 2

Thread: Save the ppl..

  1. #1
    Contributing Member
    Join Date
    Sep 2007
    Answers
    44

    Save the ppl..

    The Situation:
    There is an island with 10 inhabitants. One day a monster comes and says that he intends to eat every one of them but will give them a chance to survive in the following way:
    In the morning, the monster will line up all the people - single file so that the last person sees the remaining 9, the next person sees the remaining 8, and so on until the first person that obviously sees no one in front of himself. The monster will then place black or white hats on their heads randomly (they can be all white, all black or any combination thereof).
    The monster will offer each person starting with the last one (who sees everyone else's hats) to guess the color of his/her own hat. The answer can only be one word: "white" or "black". The monster will eat him on the spot if he guessed wrong, and will leave him alive if he guessed right. All the remaining people will hear both the guess and the outcome of the guess. The monster will then go on to the next to last person (who only sees 8 people), and so on until the end.
    The monster gives them the whole night to think.

    The Task:
    Devise the optimal strategy that these poor natives could use to maximize their survival rate.

    Assumptions:
    1) All the 10 people can easily understand your strategy, and will execute it with perfect precision.
    2) If the monster suspects that any of the people are giving away information to any of the remaining team members by intonation of words when answering, or any other signs, or by touch, he will eat everyone.
    3) The only allowed response is a short, unemotional "white" or "black".
    4) Having said that, I will add that you can put any value you like into each of these words. For example, "white" can mean "my mother did my laundry" and "black" can mean the guy in front of me is wearing a black hat.


  2. #2
    Contributing Member
    Join Date
    Sep 2006
    Answers
    962

    Re: Save the ppl..

    The last person first look all the other 9 hats. He shout white if he saw odd number of white hat. Otherwise he shouted block.

    Now the technique...
    So 9th person count the number of hat what color 10th person shout. If he got still odd number then his hat is opposite color of 10th person shout otherwise same color. All of them using the same technique.

    So 1st person count the number of color shouted. If the count is even then his hat is same color. otherwise opposite color.

    Only the 10th person doesn't know his guess is right or wrong.

    ----------------------------
    suresh

    Last edited by psuresh1982; 09-20-2007 at 09:47 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact