Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Another way to think about it: forget about how many people there are in total, I can observe x blue eyes. Let m be the minimum globally known number of people with blue eyes. After the announcement m = 1.

On that day (and any subsequent) if your x < m you know you have blue eyes. If at the end of the day noone leaves, m must be at least m + 1.



Spoiler: Knowing Mathematical induction (http://en.wikipedia.org/wiki/Mathematical_induction) really helps.

It was not that hard at all.


To correct myself: It was a little bit harder than it seemed at first. I forgot to prove that my solution was optimal.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: