I knew this problem with black and white hats.
Wladimir Araujo Tavares http://www.si.ufc.br/~wladimir <http://www.si.ufc.br/%7Ewladimir/> "Fiz uma faculdade! Só não fiz a segunda porque acabaram os tijolos." On Fri, Dec 17, 2010 at 8:41 AM, Amir hossein Shahriari < amir.hossein.shahri...@gmail.com> wrote: > @aditya: the problem you mentioned is not like this one > if i'm a green eyed there is no reason to kill myself on the second day if > no one kills himself on the 1st day > actually in your solution there is no difference between blue eyed people > and green eyed people so a blue eyed might kill himself as well > > the solution is 20 but they all kill themselves in the 20th day: > every green eyed person can count 19 green eyed > every blue eyed person can count 20 green eyed in the village > so at the 20th day each green eyed knows that the reason no green eyed has > yet committed suicide in the first 19 days was that they could all count 19 > other green eyed people so he must be a green eyed and kills himself > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algoge...@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com<algogeeks%2bunsubscr...@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 algoge...@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.