Click here to Skip to main content
15,918,193 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Juiced up hamsters? Pin
Nagy Vilmos4-Dec-13 0:18
professionalNagy Vilmos4-Dec-13 0:18 
GeneralRe: Juiced up hamsters? Pin
OriginalGriff4-Dec-13 0:32
mveOriginalGriff4-Dec-13 0:32 
GeneralRe: Juiced up hamsters? Pin
Nagy Vilmos4-Dec-13 1:16
professionalNagy Vilmos4-Dec-13 1:16 
GeneralRe: Juiced up hamsters? Pin
Jörgen Andersson4-Dec-13 1:08
professionalJörgen Andersson4-Dec-13 1:08 
GeneralRe: Juiced up hamsters? Pin
Simon_Whale4-Dec-13 0:09
Simon_Whale4-Dec-13 0:09 
GeneralRe: Juiced up hamsters? Pin
Nagy Vilmos3-Dec-13 23:28
professionalNagy Vilmos3-Dec-13 23:28 
GeneralRe: Juiced up hamsters? Pin
SoMad3-Dec-13 23:33
professionalSoMad3-Dec-13 23:33 
QuestionA Life Or Death Problem Pin
Nagy Vilmos3-Dec-13 22:57
professionalNagy Vilmos3-Dec-13 22:57 
Following on from yesterday's maths, here's a more logical [but still mathematical] problem.


The Prisoners:

The warden of a top security prison meets with the 23 prisoners as they arrive and he tells them:

You may meet together today and plan a strategy, but after today you will be in isolated cells and have no communication with one another.

There is in this prison a "switch room" which contains two light switches, labelled "A" and "B", each of which can be in the "on" or
"off" position. I am not telling you their present positions. The switches are not connected to any appliance. After today, from time to
time, whenever I feel so inclined, I will select one prisoner at random and escort him to the "switch room", and this prisoner will
select one of the two switches and reverse its position (e.g. if it was "on", he will turn it "off"); the prisoner will then be led back
to his cell. Nobody else will ever enter the "switch room".

Each prisoner will visit the switch room arbitrarily often.

At any time, any of you may declare to me: "We have all visited the switch room." If it is true (each of the 23 prisoners has visited the switch room at least once), then you will all be set free. If it is false (someone has not yet visited the switch room), you will all be put to death!

Devise for the prisoners a strategy which will guarantee their release.


You can easily google this, as I found it on the interweb, so play nice and try to apply some thinking. Go on, I dare you! Double dog dare you!
speramus in juniperus

AnswerRe: A Life Or Death Problem Pin
DaveAuld3-Dec-13 23:06
professionalDaveAuld3-Dec-13 23:06 
GeneralRe: A Life Or Death Problem Pin
Nagy Vilmos3-Dec-13 23:07
professionalNagy Vilmos3-Dec-13 23:07 
GeneralRe: A Life Or Death Problem Pin
DaveAuld3-Dec-13 23:10
professionalDaveAuld3-Dec-13 23:10 
GeneralRe: A Life Or Death Problem Pin
Johnny J.3-Dec-13 23:10
professionalJohnny J.3-Dec-13 23:10 
GeneralRe: A Life Or Death Problem Pin
_Dhull 4-Dec-13 1:06
_Dhull 4-Dec-13 1:06 
AnswerRe: A Life Or Death Problem Pin
OriginalGriff3-Dec-13 23:15
mveOriginalGriff3-Dec-13 23:15 
AnswerRe: A Life Or Death Problem Pin
OriginalGriff3-Dec-13 23:24
mveOriginalGriff3-Dec-13 23:24 
GeneralRe: A Life Or Death Problem Pin
Nagy Vilmos3-Dec-13 23:26
professionalNagy Vilmos3-Dec-13 23:26 
GeneralRe: A Life Or Death Problem Pin
Motor Viper3-Dec-13 23:38
professionalMotor Viper3-Dec-13 23:38 
GeneralRe: A Life Or Death Problem Pin
Nagy Vilmos4-Dec-13 0:17
professionalNagy Vilmos4-Dec-13 0:17 
GeneralRe: A Life Or Death Problem Pin
OriginalGriff4-Dec-13 0:30
mveOriginalGriff4-Dec-13 0:30 
GeneralRe: A Life Or Death Problem Pin
Nagy Vilmos4-Dec-13 0:35
professionalNagy Vilmos4-Dec-13 0:35 
GeneralRe: A Life Or Death Problem Pin
OriginalGriff4-Dec-13 0:37
mveOriginalGriff4-Dec-13 0:37 
AnswerRe: A Life Or Death Problem Pin
CBadger4-Dec-13 0:41
professionalCBadger4-Dec-13 0:41 
GeneralRe: A Life Or Death Problem Pin
Motor Viper4-Dec-13 0:52
professionalMotor Viper4-Dec-13 0:52 
GeneralRe: A Life Or Death Problem Pin
CBadger4-Dec-13 1:34
professionalCBadger4-Dec-13 1:34 
GeneralRe: A Life Or Death Problem Pin
Freak304-Dec-13 1:41
Freak304-Dec-13 1:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.