Everyone will appoint any one person as a leader. Now everyone must follow some steps. Every prisoner will flip the first switch up at the first opportunity and also at the second opportunity. If the first switch is already up or they have flipped it up two times already, then they will flip the second switch. The leader however will have a different routine. He is the only one who will flip the switch down the first switch. Suppose if the switch is already down, he will flip the second switch. Also he will keep a count and when he has flipped the first switch down 44 times, he will declare that every prisoner has visited the room.
This is because once the leader has flipped down the switch 44 times, he will know that everyone has visited the room. If the switch was down initially, the other 22 prisoners will turn it up two times. If the first switch was already up, there will be one prisoner who will flip the switch up only once and the rest will do it twice.
Now this trick won't work when the leader has flipped the switch 23 times. Consider the fact that it is possible that 12 prisoners randomly and the leader have been taken to the switch room 24 times and the rest have not been taken till then. Remember that the first switch might have been up in the beginning itself. Thus the prisoners must flip the switch up twice. If they do it just once, the leader will never know whether to count till 22 or 23.
This is because once the leader has flipped down the switch 44 times, he will know that everyone has visited the room. If the switch was down initially, the other 22 prisoners will turn it up two times. If the first switch was already up, there will be one prisoner who will flip the switch up only once and the rest will do it twice.
Now this trick won't work when the leader has flipped the switch 23 times. Consider the fact that it is possible that 12 prisoners randomly and the leader have been taken to the switch room 24 times and the rest have not been taken till then. Remember that the first switch might have been up in the beginning itself. Thus the prisoners must flip the switch up twice. If they do it just once, the leader will never know whether to count till 22 or 23.
No comments:
Post a Comment