[algogeeks] Re: MS BRAINTEASR
hmm... interesting logic, but what about, for example, 8 people and 3 hats. Why can't one of the five without hats also be unsure and try to go swimming on one of the nights? I was thinking, if they somehow know how many hats there are (writing numbers in the sand or other cheating methods), it would be "n choose c" days at most, if they try a combination every night. But this can further be simplified to just "n" at most, if exactly one new person goes by himself at night. One cheating method: one man is a leader. The leader chooses all men he sees with hats and says "let's go swimming at midnight". If that does not work, the next night the same people (but without the leader) go swimming at midnight. Two nights. So... I'm thinking n days, since the men do not know how many hats there are. And if cheating is allowed, 1-2 days. Remember, the question did say "the men cannot *tell* each other..."=P On Aug 18, 7:15 am, DheerajSharma wrote: > Case 1: > when one person is wearing hat.The person wearing hat will see that no > other is wearing hat.hence he must be wearing it.So she will take it > off.hence one day > Case 2: > when two persons are wearing,first will think..that only second one is > wearing..while second will think only first one is wearing.hence no > one will go on first day. > on the second day..when both will see the same thing..they will come > to know..that they are also wearing hat..and making the second one > confused ;) hence..they both will go and take off hat on second day. > Case 3: > first person sees hat on two others.(same for other two). no one will > go on first day. > On second day..same situation..bt this time the person is still > unsure..wether she is wearing hat or not..bcoz case 2 can happen.. > on third day..when same situation arises...they will come to > know..that they are also wearing hat..hence..they will take it off on > day 3. > so on.. > so on.. > For C hats...C dayz... > > On Aug 18, 4:06 pm, DheerajSharma wrote: > > > > > > > > > it would take c days to take off all the hats > > > On Aug 18, 3:51 pm, "pg@manit" wrote: > > > > A bunch of men are on an island. A genie comes down and gathers > > > everyone together and places a magical hat on some people’s heads > > > (i.e., at least one person has a hat). The hat is magical: it can be > > > seen by other people, but not by the wearer of the hat himself. To > > > remove the hat, those (and only those who have a hat) must dunk > > > themselves underwater at exactly midnight. If there are n people and c > > > hats, how long does it take the men to remove the hats? The men cannot > > > tell each other (in any way) that they have a hat. > > > FOLLOW UP > > > Prove that your solution is correct. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
[algogeeks] Re: MS BRAINTEASR
Time taken by one man only . As a person can do only at exactly mid night so , all have to do together only at midnight . On Aug 18, 3:51 pm, "pg@manit" wrote: > A bunch of men are on an island. A genie comes down and gathers > everyone together and places a magical hat on some people’s heads > (i.e., at least one person has a hat). The hat is magical: it can be > seen by other people, but not by the wearer of the hat himself. To > remove the hat, those (and only those who have a hat) must dunk > themselves underwater at exactly midnight. If there are n people and c > hats, how long does it take the men to remove the hats? The men cannot > tell each other (in any way) that they have a hat. > FOLLOW UP > Prove that your solution is correct. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
[algogeeks] Re: MS BRAINTEASR
ur welcume :) On Aug 18, 4:12 pm, payal gupta wrote: > hmm...suitable rply i suppose > thanx...:):) > > REGARDS, > PAYAL GUPTA > > On Thu, Aug 18, 2011 at 4:36 PM, DheerajSharma > wrote: > > > > > > > > > it would take c days to take off all the hats > > > On Aug 18, 3:51 pm, "pg@manit" wrote: > > > A bunch of men are on an island. A genie comes down and gathers > > > everyone together and places a magical hat on some people’s heads > > > (i.e., at least one person has a hat). The hat is magical: it can be > > > seen by other people, but not by the wearer of the hat himself. To > > > remove the hat, those (and only those who have a hat) must dunk > > > themselves underwater at exactly midnight. If there are n people and c > > > hats, how long does it take the men to remove the hats? The men cannot > > > tell each other (in any way) that they have a hat. > > > FOLLOW UP > > > Prove that your solution is correct. > > > -- > > You received this message because you are subscribed to the Google Groups > > "Algorithm Geeks" group. > > To post to this group, send email to algogeeks@googlegroups.com. > > To unsubscribe from this group, send email to > > algogeeks+unsubscr...@googlegroups.com. > > For more options, visit this group at > >http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
[algogeeks] Re: MS BRAINTEASR
Case 1: when one person is wearing hat.The person wearing hat will see that no other is wearing hat.hence he must be wearing it.So she will take it off.hence one day Case 2: when two persons are wearing,first will think..that only second one is wearing..while second will think only first one is wearing.hence no one will go on first day. on the second day..when both will see the same thing..they will come to know..that they are also wearing hat..and making the second one confused ;) hence..they both will go and take off hat on second day. Case 3: first person sees hat on two others.(same for other two). no one will go on first day. On second day..same situation..bt this time the person is still unsure..wether she is wearing hat or not..bcoz case 2 can happen.. on third day..when same situation arises...they will come to know..that they are also wearing hat..hence..they will take it off on day 3. so on.. so on.. For C hats...C dayz... On Aug 18, 4:06 pm, DheerajSharma wrote: > it would take c days to take off all the hats > > On Aug 18, 3:51 pm, "pg@manit" wrote: > > > > > > > > > A bunch of men are on an island. A genie comes down and gathers > > everyone together and places a magical hat on some people’s heads > > (i.e., at least one person has a hat). The hat is magical: it can be > > seen by other people, but not by the wearer of the hat himself. To > > remove the hat, those (and only those who have a hat) must dunk > > themselves underwater at exactly midnight. If there are n people and c > > hats, how long does it take the men to remove the hats? The men cannot > > tell each other (in any way) that they have a hat. > > FOLLOW UP > > Prove that your solution is correct. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] Re: MS BRAINTEASR
hmm...suitable rply i suppose thanx...:):) REGARDS, PAYAL GUPTA On Thu, Aug 18, 2011 at 4:36 PM, DheerajSharma wrote: > it would take c days to take off all the hats > > On Aug 18, 3:51 pm, "pg@manit" wrote: > > A bunch of men are on an island. A genie comes down and gathers > > everyone together and places a magical hat on some people’s heads > > (i.e., at least one person has a hat). The hat is magical: it can be > > seen by other people, but not by the wearer of the hat himself. To > > remove the hat, those (and only those who have a hat) must dunk > > themselves underwater at exactly midnight. If there are n people and c > > hats, how long does it take the men to remove the hats? The men cannot > > tell each other (in any way) that they have a hat. > > FOLLOW UP > > Prove that your solution is correct. > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algogeeks@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
[algogeeks] Re: MS BRAINTEASR
it would take c days to take off all the hats On Aug 18, 3:51 pm, "pg@manit" wrote: > A bunch of men are on an island. A genie comes down and gathers > everyone together and places a magical hat on some people’s heads > (i.e., at least one person has a hat). The hat is magical: it can be > seen by other people, but not by the wearer of the hat himself. To > remove the hat, those (and only those who have a hat) must dunk > themselves underwater at exactly midnight. If there are n people and c > hats, how long does it take the men to remove the hats? The men cannot > tell each other (in any way) that they have a hat. > FOLLOW UP > Prove that your solution is correct. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.