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

Or if N = number of people with blue eyes.

(N=1 blue) 1B goes home 1st night. (N=2 blue) 2B go home 2nd night. (N=2 blue) 3B go home 3rd night.

To see why this works at N=4 B1, sees 3 blues so if his eyes are not blue everyone goes home on the 3rd night. But they don't go home on 3rd night so he and all the other blues go home on the 4th night.

etc So at N=100 all blue go home on the 100th night and everyone else stays.

Note: brown and green don't get to go home because having 2, 1, or 0 green eyes presents blue with the same information. AKA Blue and brown eyed people know their eyes are not blue but they could be brown or green. So having 10 or 10,000 people with brown eyes does not change what happens.



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: