0

I was reading yet another possible (not the most efficient) solution to the following problem:

"There are 100 prisoners in solitary cells. There's a central living room with one light bulb; this bulb is initially off. No prisoner can see the light bulb from his or her own cell. Everyday, the warden picks a prisoner equally at random, and that prisoner visits the living room. While there, the prisoner can toggle the bulb if he or she wishes. Also, the prisoner has the option of asserting that all 100 prisoners have been to the living room by now. If this assertion is false, all 100 prisoners are shot. However, if it is indeed true, all prisoners are set free and inducted into MENSA, since the world could always use more smart people. Thus, the assertion should only be made if the prisoner is 100% certain of its validity. The prisoners are allowed to get together one night in the courtyard, to discuss a plan. What plan should they agree on, so that eventually, someone will make a correct assertion?"

The suggested solution: Prisoners agree that whoever enters the room for the 2nd time will be the counter. The bulb will be used the following way in the first 100 days.

  1. Prisoner brought in on Day 1 switches the light on and regards himself as counted.

2.All the others entering the room and seeing the bulb switched on regard themselves as counted and leave the bulb switched on.

3.As soon as a prisoner enters the room for the 2nd time he switches the bulb off. He knows that he'll be the counter and can count in as many people as days have elapsed before he came for the 2nd time.

  1. All the other prisoners entering the room before Day 101 and seeing the light switched off leave the bulb switched off.

  2. Who has seen the bulb switched on in the first 100 Days regards himself as counted.

  3. From Day 101 another procedure commences. Whoever comes in the room for the first time or hasn't been counted yet, switches the bulb on and regards himself as counted. It stays switched on until the counter enters the room and switches it off. He adds one person to the counted list. (Even if someone else enters the room for the first time but sees the bulb on, he can't regard himself as counted, as the counter can only add 1 prisoner at a time from Day 101. Step 6 repeats until the counter has counted 100 people.

So far so good. But then a comment appears that I do not understand: "The approach isn't possible as it's not clear which prisoner will first enter the room for the 2nd time. For example, let's assign each prisoner a number (for the easiness). In the first 5 days prisoners #1-5 enter the room. On Day 6 prisoner #1 enters the room for the 2nd time, sees the bulb switched on and knows that he's the first one to enter the room twice.He regards himself as a counter and switches the light off. On day 7 prisoner #6 comes, sees the light switched off and switches it on as he's never been in the room before. (What he shouldn't be doing according to point#4 above.) On Day 8 a prisoner #2 enters the room again and regards himself as a counter and switches the light off. This continues until all prisoners see themselves as counters."

My question:I don't understand, why one must do contrary to what point 4 says. If all the points are followed, everything works. It's because the role of a bulb is different in the first 100 days. Why would prisoner #6 switch the light on? He shouldn't do that so as all the others entering the room before Day 101. Thus, everyone will see that the light is off, and, the counter already exists.

Is my logic false?

amWhy
  • 210,739
Lola
  • 115
  • In the original problem, there are 100 prisoners, so I guess day 101 is related t othis number and should be day 7 in your example? Edit: No, I think this isn't true. – Mariuslp Sep 30 '16 at 13:49
  • @Mariuslp: I understood that #7 was taken just to show how quickly things mess up if point#4 is violated. I.e., when we get to day 101, we have several counters and not 1. – Lola Sep 30 '16 at 13:52
  • Forget my previous comment. I read everything again, now I think that either the comment you quote is wrong, or that the prisoners don't know on which day the experiment started, ie, when is Day 1 (but then the whole reasoning would be wrong) – Mariuslp Sep 30 '16 at 14:02
  • 2

0 Answers0