• 0

A Prisoner Problem

Question

Posted · Report post

100 prisoners are imprisoned in solitary cells. Each cell is windowless and soundproof. There's a central living room with one light bulb; the bulb is initially off. No prisoner can see the light bulb from his or her own cell. Each day, the warden picks a prisoner equally at random, and that prisoner visits the central living room; at the end of the day the prisoner is returned to his cell. While in the living room, the prisoner can toggle the bulb if he or she wishes. Also, the prisoner has the option of asserting the claim that all 100 prisoners have been to the living room. If this assertion is false (that is, some prisoners still haven't been to the living room), all 100 prisoners will be shot for their stupidity. However, if it is indeed true, all prisoners are set free and inducted into MENSA, since the world can always use more smart people. Thus, the assertion should only be made if the prisoner is 100% certain of its validity.
Before this whole procedure begins, the prisoners are allowed to get together in the courtyard to discuss a plan. What is the optimal plan they can agree on, so that eventually, someone will make a correct assertion?
0

Share this post


Link to post
Share on other sites

10 answers to this question

  • 0

Posted (edited) · Report post

the best way i can think of:

imagine the state of the bulb, as a sequence of binary numbers.

each person notes whether the state of the bulb was different from the last time they entered.

if it is, note this as a1, if the same, note this as a 0.

then every person is assigned a different prime number and only flips the bulb on that number of times entering in the room.

once the prisoner with the largest prime has flipped it himself his prime number of times, and has seen it change state his prime number of times, he can call solved fairly confidently. i personally don't see a guaranteed solution.

Edited by phil1882
0

Share this post


Link to post
Share on other sites
  • 0

Posted (edited) · Report post

I had a solution here, but found a flaw in it... *REMOVED*

Edited by ThunderCloud
0

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

The prisoners decide that who ever is called on the first day will be the one to take the call whether all have flipped or not.



Also they decide that any prisoner (except first) going to the room will toggle the switch on IF it is off otherwise will not toggle the switch. And, any prisoner (except first) will toggle the switch ONLY once.

The first prisoner will always toggle the switch off and count the number of times he does so. When he has a count of 99 toggles to off (other than his own on the first day if the bulb wasn't off) , he announces the passage of all 100 prisoners.
1

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

The prisoners decide that who ever is called on the first day will be the one to take the call whether all have flipped or not.

Also they decide that any prisoner (except first) going to the room will toggle the switch on IF it is off otherwise will not toggle the switch. And, any prisoner (except first) will toggle the switch ONLY once.

The first prisoner will always toggle the switch off and count the number of times he does so. When he has a count of 99 toggles to off (other than his own on the first day if the bulb wasn't off) , he announces the passage of all 100 prisoners.

There is a flaw in this strategy. Since the prisoners are chosen at random, the first person can visit the room all 99 times and toggle the switch off and not have 100 of the other prisoners still make it. Resulting in the death of the group. But your answer is closer to mine. Just need a little revision.

0

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

I think DeGe's strategy is sound.

The term "toggle" may be adding confusion.

Prisoner 1 always turns the light OFF [or leaves it off]

Every other prisoner is allowed to turn the light ON only once [after they turn it on once, the leave it unchanged]. Other prisoners are not allowed to ever turn the light off.

after day 1 prisoner 1 counts the times he turns it off and after 99 he can safely assume that all have been in the room

0

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

I think DeGe's strategy is sound.

The term "toggle" may be adding confusion.

Prisoner 1 always turns the light OFF [or leaves it off]

Every other prisoner is allowed to turn the light ON only once [after they turn it on once, the leave it unchanged]. Other prisoners are not allowed to ever turn the light off.

after day 1 prisoner 1 counts the times he turns it off and after 99 he can safely assume that all have been in the room

Thanx for making it clear.

0

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Thank you for clarifying

0

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

What do I do?

0

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

What do I do?

Don't turn the light off I'm counting

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.