This one’s serious....
The warden meets with 23 new prisoners when they arrive to prison. He tells them, "You may meet today and plan a strategy. But after today, you will be in isolated cells and will have no communication with one another.
"In the prison is a switch room, which contains two light switches labeled A and B. Both are in the “off” position now. The switches are not connected to anything.
All day long, I will be leading prisoners randomly, one at a time, into the switch room. Every time you’re there, you must flip one switch and you’ll then be led back to your cell.
There’s no limit how many times a prisoner will visit the room, and no particular order which I will follow. One might visit the room 3 times before another would be there even once, but with time, all prisoners will have visited the room the same amount of times.
At any given time, any prisoner may yell “all have visited the room!”
If that will be true, you’ll all be freed. If even one prisoner hasn’t been to the room yet, you’ll all be shot.
I will not purposefully hold back one prisoner from entering the room.”
What plan can they come up with to ensure that they’re freed?
This one’s serious....
The warden meets with 23 new prisoners when they arrive to prison. He tells them, "You may meet today and plan a strategy. But after today, you will be in isolated cells and will have no communication with one another.
"In the prison is a switch room, which contains two light switches labeled A and B. Both are in the “off” position now. The switches are not connected to anything.
All day long, I will be leading prisoners randomly, one at a time, into the switch room. Every time you’re there, you must flip one switch and you’ll then be led back to your cell.
There’s no limit how many times a prisoner will visit the room, and no particular order which I will follow. One might visit the room 3 times before another would be there even once, but with time, all prisoners will have visited the room the same amount of times.
At any given time, any prisoner may yell “all have visited the room!”
If that will be true, you’ll all be freed. If even one prisoner hasn’t been to the room yet, you’ll all be shot.
I will not purposefully hold back one prisoner from entering the room.”
What plan can they come up with to ensure that they’re freed?
That's a tough one... I have no clue how to go about it...
Keep in mind that it might take a really long time for their plan to realize, but eventually they will reach a point where they can be 100% certain that all prisoners have visited the room at least once.
Hint:
Hidden:
They assign one person as the leader, who will somehow keep track of the entries.
Keep in mind that it might take a really long time for their plan to realize, but eventually they will reach a point where they can be 100% certain that all prisoners have visited the room at least once.
Hint:
Hidden:
They assign one person as the leader, who will somehow keep track of the entries.
But they can all just flick a single switch each time?
Mr A is in charge. He’s the only one allowed to open switch A. Every person who enters and finds in open closes it but don’t forget open Mr A can open it. Mr A keeps count every time he goes in and once there are 22 times it was closed again he knows all have passed through.
Mr A is in charge. He’s the only one allowed to open switch A. Every person who enters and finds in open closes it but don’t forget open Mr A can open it. Mr A keeps count every time he goes in and once there are 22 times it was closed again he knows all have passed through.
But this can take a looooong time.
Goooooddddddd, but you omitted one vital piece of information. Re-read your solution, think about it, and tell me what is missing.
Keep in mind that it might take a really long time for their plan to realize, but eventually they will reach a point where they can be 100% certain that all prisoners have visited the room at least once.
Hint:
Hidden:
They assign one person as the leader, who will somehow keep track of the entries.
Oh, I see... because I could not see how you would count to 23 with just two switches...
But what if
Hidden:
the assigned person is the last to be brought to switch, and will be brought to switch just once?
If they find switch A closed they obviously flick switch B?
I think it should be this:
Hidden:
Whoever comes in for the first time switches switch A on, no-one but Mr. A is allowed to switch it off. All the subsequent times, they have to switch switch B...If they came in an switch A was already on "on", they have to switch swicht A the next time they come in and it is on off... so that everyone will switch switch A on exactly one time... except Mr. A...
If they find switch A closed they obviously flick switch B?
No. Your solution, as currently worded is incorrect. This is why:
Hidden:
What if the warden alternates a few times between the leader and another prisoner? Then the switch goes on when the leader is there, off for prisoner, then leader flicks it on again, prisoner off, having the leader counting, but it's the same prisoner all along, so reaching 22 doesn't necessarily mean all were there!
Whoever comes in for the first time switches switch A on, no-one but Mr. A is allowed to switch it off. All the subsequent times, they have to switch switch B...If they came in an switch A was already on "on", they have to switch swicht A the next time they come in and it is on off... so that everyone will switch switch A on exactly one time... except Mr. A...
Mr A is in charge. He’s the only one allowed to open switch A. Every person who enters and finds in open closes it but don’t forget open Mr A can open it. Mr A keeps count every time he goes in and once there are 22 times it was closed again he knows all have passed through.
But this can take a looooong time.
Right, this could take a really long time...
And this is the next riddle:
If the distribution which prisoner is lead to switch is entirely random, every prisoner has always the same chance of getting called, how many switches will it take till there is a 95% chance that Mr. A can yell "Everyone was here"....
(this is also the reason why most sticker albums stay half empty, except if the children engage in heavy trading).
Last edited by ChanieMommy on Thu, Oct 15 2020, 12:34 pm; edited 1 time in total
One person is assigned as the leader, who will keep track of how many patients have already visited the room. Here's how:
Every prisoner's mission (except for leader) is to flick switch A "ON" at their very first opportunity. If switch A is already ON, or they have already turned it on at a previous visit, then they only flick switch B.
The leader's mission is to always leave the room with switch A in the "OFF" position. If it's already OFF, then he flicks switch B.
So: Whenever the leader sees switch A "ON", he knows that a newcomer has been there since his last visit. So, he will count every time he turns it to off, and when he reaches 22, he knows all have been there.
If the distribution which prisoner is lead to switch is entirely random, every prisoner has always the same chance of getting called, how many switches will it take till there is a 95% chance that Mr. A can yell "Everyone was here"....
(this is also the reason why most sticker albums stay half empty, except if the children engage in heavy trading).
No. Your solution, as currently worded is incorrect. This is why:
Hidden:
What if the warden alternates a few times between the leader and another prisoner? Then the switch goes on when the leader is there, off for prisoner, then leader flicks it on again, prisoner off, having the leader counting, but it's the same prisoner all along, so reaching 22 doesn't necessarily mean all were there!
Hidden:
Oh of course they can all only flick it once regardless of how many times they enter. I didn’t write it but certainly had that in mind.