5 Star Logic Problem (100 prisoners and a light bulb)

In summary, the prisoners must come up with a plan in which they can be certain that all 100 of them have visited the central living room with the light bulb. One possible plan is to have a counter who keeps track of the number of times the light switch is turned on and off, and once it reaches 99, the counter can declare that all 100 prisoners have visited the room. However, this plan relies on the assumption that the prisoners are chosen at random and are able to follow the plan without any deviation. Another option is to use the rotation of the light bulb to determine if a prisoner has been in the room before, but this also relies on the prisoners not interfering with the plan. Ultimately, there is no foolproof
  • #71
assuming all prisoners can count the days:

each toggles the switch everyday
if your called on an odd day the switch should initally be on
if your called on an even day the switch should initally be off
if your called twice within 100 days you leave the light bulb as it is
alerting the next guy that someone was called twice by destroying the correspondence between odd-on even-off [we call this guy THE MASTER]

the next guy continues to alert everyone that its a bum deal by continuing to toggle the switch
all prisionsers will know that its bad because on/off don't match with the even odd days.

UNTILL the original guy who was called twice returns having counted at least 100 days since his last visit. he now restores order (off for odd days on for even days).

the system is reset
each prisioner again toggles the switch on for odd days off for even days
again, if one man is called twice within 100 days he leaves the switch destroying the order.[HE BECOMES THE MASTER]

finally when our man [the master] who restored the order returns, again having counted 100 days at least and seeing that odd/even days match with on/off he knows that no one prisioner has been called twice in the last 100 days. and seeing as there is only 100 prisioners this means that each prisioner must have been called at least once.

he declares this and is promplty taken out to the back of the pump house and shot!

now where do i collect my prize (probably at the back of the pump house?! :) )
 
Physics news on Phys.org
  • #72
also i note from my post above that by the time dude decalers that all prisioner have been at least once, it may be several years since the event actually occurring. but he does not know this, not 100%
 
  • #73
also i just read akg's post #2 properly and i think if he and i were prisoners i'd rather go with his method!
28 years is easssyyy time
 
  • #74
My Solution:

1. First prisoner who goes to central room acts as counter and he leaves the switch as it is i.e off
2. Different prisoner goes to central room turns the light on if it is switched off and he/she
should not turn it on/off from then, even he/she gets chance to enter central room again(goes to infinity)..
3. Different prisoner goes to central room leaves the light as it is, if it is switched on
4. So whenever the first prisoner gets chance to go to central room again,he will count 1 if
the light is switched on and make the switch off.
5. when the first prisoner who is counting gets 99,then he will tell that all 100 prisoners
have been to the central room

This method takes a long long time but will work. please tell me if there are any mistakes
 
  • #75
NeutronStar said:
Well, I didn't know how to do that math, but I do know how to program a computer. So I wrote a simulation of AKG's method. After running the program several times (each time the program averages 1000 runs) I got a pretty consistent result.

The most likely number of days that the prisoners would serve would about 10,420 days. That a little over 28 years. That's the most likely amount of time they would serve using AKG's method.

If you'd like to see my program I'll be glad to post it. I wrote it in Visual Basic and it's quite short.

There's probably some way to do this directly using probability mathematics.

I've done a script in PHP. Running 10000 Trials the results come out to:

Max: 14348
Min: 6780
Avg: 10010.3376

So this number is very close to 10000 which is correct even intuitively seeing that the counter person has to come back to the room 100 times at a rate of 1/100 of him being chosen. Equals to 100x100 = 10,000 days.
 
  • #76
Once a prisoner is called, he goes in and he can either turn the light on or off, it doesn't matter. Once he's done this, he'll kill himself. Since he can't be called again, the warden must call another person. That person will go in, and then kill himself. This will continue, for about 99 days, and on the 100th day the last person will enter and say, "all 100 have entered if you include me." Pretty gruesome, I know, but it works (I think).
 
  • #77
aragorn1r said:
Since he can't be called again, the warden must call another person.

I'm not sure that works-- I don't see anything in the OP that restricts the warden into choosing living prisoners:

Everyday, the warden picks a prisoner at random, and that prisoner goes to the central living room.

I suppose it would work if one assumed that a dead person was incapable of being a prisoner and was instead a "former prisoner".

DaveE
 
  • #78
spidey said:
My Solution:

1. First prisoner who goes to central room acts as counter and he leaves the switch as it is i.e off
2. Different prisoner goes to central room turns the light on if it is switched off and he/she
should not turn it on/off from then, even he/she gets chance to enter central room again(goes to infinity)..
3. Different prisoner goes to central room leaves the light as it is, if it is switched on
4. So whenever the first prisoner gets chance to go to central room again,he will count 1 if
the light is switched on and make the switch off.
5. when the first prisoner who is counting gets 99,then he will tell that all 100 prisoners
have been to the central room

This method takes a long long time but will work. please tell me if there are any mistakes

There is a common mistake in many of these plans, namely the assumption that a prisoner will know that he is "first" (or WHO is first).
 
  • #79
Doesn't need to know if he's first, once he's been in the living room, he kills himself. This goes on for 100 days. The only person left at the last 100th day is the only one who will walk free.
 
  • #80
davee123 said:
I'm not sure that works-- I don't see anything in the OP that restricts the warden into choosing living prisoners:



I suppose it would work if one assumed that a dead person was incapable of being a prisoner and was instead a "former prisoner".

DaveE

If he's dead, he's got to buried you know. It's not like you let him rot in his cell.
 
  • #81
aragorn1r said:
If he's dead, he's got to buried you know. It's not like you let him rot in his cell.

I figure they'll just cremate him and take his urn into the room.

DaveE
 
  • #82
Begin with Phlegmy's #71 post of even/odd days for (say) 100 day intervals. The first repeat prisoner will reverse the order. The SECOND repeat prisoner becomes counter and begins "regular" (post #2) strategy, starting at the next 100 day (100 is probably not optimal) interval.
(There MUST be a second repeat prisoner by day 100).
This plan may need some work, but I like the odd/even idea...
 
  • #83
To clarify, strategy is two parts: days 1-100 use even/odd method and designate Counter (second repeater);
days 101 till end is "regular" (post#2) strategy.
They won't know who Counter is, but they'll know who it ain't (them).
When the first second repeater leaves room, he resets to original even/odd days, so that any future second repeaters know they're not Counter.
Now if I could only figure out the average time till second repeater and...
 
  • #84
English is not my first language so sorry for some mistakes

something isn't accurate with the problem. read this problem and there is some similarity between these 2 problems

The riddle: 100 prisoners. tomorrow will be stood by a line: the 100th one can see other 99, 99th other 98, 2nd-only first one and 1st can't see anybody. each of them will wear a hat either black or white, and nobody can know his color. the count of each color is unknown it can be 50bl 50wh or 100bl 0wh or 73bl 27wh etc., they have to say the color of their hat, using words "black" or "white" no other words and can't prompt others with the intonation. who says wrong will be killed. 1st will begin the 100th one then 99-98-97. . .-1
Q: Knowing all this what plan can they make at night for the tomorrow's issue in order to survive AT LEAST 99 prisoners?
 
  • #85
AKG said:
One person is chosen as the counter. If the light switch is on, no prisoner will touch it. If it is off, and a prisoner who has never flicked the switch enters, then he flicks the switch on. It stays like that until the counter returns. The counter never flicks it up, only flicks it down. Once he notices that it's been flicked up 99 times, he says that 100 prisoners have visited, and they go free.

I know this is an old thread, but it struck me that 'optimal' could be reached by combining more than one strategy. I saw good and other solutions in this thread, but hardly any cooperation between users to reach a more optimal solution.

I suggest a different strategy that happens for only the first 100 days: the first to come into the room switches on the light. The second person leaves the light on unless it is the same person who came in the room the first day. The 3rd person also leaves the light on unless he is the person who was there day one or day two. Same for the 4th, 5th, 6th, etc. In fact they all leave the light on UNTIL someone comes in for the second time while the light is on within those first 100 days. This person switches the light off and becomes the counter.
Once the light is off, the group has to wait for day 101 to indicate to people on later days that the first strategy has stopped working. From day 101 on I use the above AKG strategy. Anyone who was in the room and switched on the light during this first cycle does not switch the light on again, ever. This extra strategy gives the counter a head start. (It even gives the group the possibility, albeit a small one I agree, to get out in 100 days.)

Example: the first 30 people to go in the room leave the light switch on, because they all went in the room only once. Person 31 is in fact the person who went in day 8 so he switches off the light, so next persons know the chain is broken. Everyone now leaves the light off until day 101. Then they start the above AKG strategy with person 31 being the counter, having already 30 on his tally. Only 70 more to go. Without doing the math I think it's quicker to use this extra strategy.
 

Similar threads

Replies
20
Views
5K
Replies
10
Views
1K
Replies
3
Views
36K
Replies
152
Views
7K
Replies
5
Views
11K
Replies
1
Views
2K
Replies
8
Views
6K
Back
Top