Basically, they agree to one person being the leader. Since the bulb starts are being off, all the prisoners agree so that everyone (except the leader) will turn on the switch if it is off, and if they haven't been in the room before. When the leader visits the room, he will turn the switch off. When he has turned the switch off 99 times, then he knows everyone has visited the room.
Now, I'm sure there are loads of better ways and complicated algorithms and calculations about the time, etc. it takes to do such a thing. But I stared at it for about an hour and none of it made sense to me, so I'll just post a link here just in case you want to see the complicated solutions.
This one's not a bad one for calculating time, but it kind of ends abruptly:
http://anttila.ca/michael/100prisoners/
Ahhh... I dunno, I'm really bad at this probability stuff. :(
No comments:
Post a Comment