News for hackers. Stuff that matters.
Re:Seven Puzzles You Think You Must Not Have Heard Correctly... by ekke on Monday August 29, 2016 @01:03PM (#12383284)
Good one!

A naive strategy where they never die, and hopefully stay in prison for slightly less than a few billion years:

One prisoner is the light-counter (Mr C). Others follow a simple pattern - if the light is off, and they have never turned it on yet, turn it on. If it is already on, or they have already ever turned it on, do nothing.

Mr C enters the room, if the light is on, remembers it, and turns it off.

When Mr C has entered the room 99 times with light on, he can say 'Yes' and they are safe.

This can be optimized. How?

Re:Seven Puzzles You Think You Must Not Have Heard Correctly... by evanb on Monday August 29, 2016 @02:08PM (#12383834)
You have to be careful, because if the light starts out on, Mr C could be fooled when only 98 other people have entered the room.
Re:Seven Puzzles You Think You Must Not Have Heard Correctly... by greendude29 on Monday August 29, 2016 @03:03PM (#12384307)
This is essentially the same solution I came up with. I'm not sure it needs to be optimized assuming we can set the starting state and the strategy for every prisoner.