You Light Up for Life
A warden meets with 23 prisoners. He tells them the following:
- Each prisoner will be placed into a room numbered 1-23. Each will be alone in the room, which will be soundproof, lightproof, etc. In other words, they will NOT be able to communicate with each other.
- They will be allowed one planning session before they are taken to their rooms.
- There is a special room, room 0. In this room are 2 switches, which can each be either UP or DOWN. They cannot be left in between, they are not linked in any way (so there are 4 possible states), and they are numbered 1 and 2. Their current positions are unknown.
- One at a time, a prisoner will be brought into room 0. The prisoner MUST change one and only one switch. The prisoner is then returned to his cell.
- At any time t, given some N>0, there exists a finite t_0 by which time every prisoner will have visited room 0 at least N times. (In other words, there is no fixed pattern to the order or frequency with which
prisoners visit room 0, but at any given time, every prisoner is guaranteed to visit room 0 again. If you’re still confused by this statement, ignore it, and you should be ok). - At any time, any prisoner may declare that all 23 of them have been in room 0. If right, the prisoners go free. If wrong, they are all executed.
What initial strategy is 100% guaranteed to let all go free?
Communicated by Steven Johnson.
WARNING: of all the riddles, this one gave me the hardest time!
Nope. Email me at [email protected] for a hint
109890? I’m a kid
You can do it without assuming something like Chuck, they can just move the switches
That is included in the etc. you can solve without anything like that
It doesn’t say that there is no chalk in room 0. Or each prisoner originally has a tiny wedge of chalk with them. They mark the wall with a dot or dash, and when the prisoner that sees 23 markings can declare that they’ve all been in room 0.
Please feel free to email me at [email protected] (the email address you used didn’t work). I think this is the hardest on the site
this was very hard but i got the answer
email me: [email protected]
.
could visit a billion times!
So, prisoner #1 could visit room 0 5 times before prisoner #5 goes in at all?
Nope. ..s
does the first prisoner know he is the first prisoner to enter?
Nope. ..s
can a prisoner flip a switch twice before leaving, IE flip the right switch one direction then the same switch back to its original position in one visit?
Yep. Or a million…..
So a prisoner in say cell one, could be put in cell 0 10 times before the prisoner from cell 2 is put in cell 0 once?
email to you bounces — please email me at sjm1 AT williams.edu
I tried emailing you but it bounced. I worked with some students and we used WordPress.
Cool blog! Is your theme custom made or did you download it
from somewhere? A theme like yours with a few simple tweeks would really make my
blog shine. Please let me know where you got your theme.
Thanks
your email address didn’t work. email me (sjm1 AT williams.edu) for a hint
how a hard question sir . may i know the correct answer so that i’am going to present that as my project in mathematics ? please ?
Nope, no role.
does the fact that 23 is a prime number play any role for the solution?
Hello it’s me, I am also visiting this web page regularly, this web page is really nice and the users are really sharing nice thoughts.
email to you bounced — please email me at sjm1 AT williams.edu
whats the answer?
tried emailing you but emails bounced — email me at sjm1 AT williams.edu
Hmm. I am really quite confused. I just found this website and have amused me with interesting questions. may I please know the solution and explain how to get the answer. Thx.
email@email: essentially correct, email me at sjm1 AT williams.edu
[email protected]: you’re somewhat on the right track, but this email is not a valid account — email me at sjm1 AT williams.edu to chat
Cocobread: almost – email me at sjm1 AT williams.edu to discuss
email me — sjm1 AT williams.edu
how do you account for the unknown initial condition? (it could start up and you will mistakingly think 23 have been in when it was 22)
Anonymous: well done — email sjm1 AT williams.edu
I aced this one. There is a dummy switch. Im the only one allowed to turn the real switch down. Everyone else can turn the real switch only up, and only once. And i count.
sending hint
what is the answer my mind is pretty beaten up……
sent — one of my favorites, and in my mind the hardest on the site
Can I have the solution? This is an awesome riddle
sure //s (sjm1 AT williams.edu)
May I please have the solution? Thank you.
Derek: you missed something — email me at sjm1 AT williams.edu to chat
wow, by far your hardest riddle. spent a 3.5 hour car drive thinking about it and still nothing. any chance i could get the solution? i am truly stumped
ok == sent some info on my soln .s
I am intrigued by your “You Light Up for Life” riddle. I think I may have an answer, but I was wanting to know if you would send me the answer to the riddle.
ok: hint/soln sent
Pls send me the answer. I couldn’t get it ;-(
Daniel: close. email me at sjm1 AT williams.edu
hint/soln sent
i spent 2 four hour shifts thinking and i got ….NADA…:)
sure
the more i think about it the harder it gets…..can you please send me the solution?
these are immortal people — it could be a billion years before one of the people visits!
How many times a day do these prisoners visit the room? Why not just wait 3 years? Their lives are on the line! oR wait 10 years. how old are these prisoners? If they are all almost dying from age might as well wait 1 year then anybody can declare. cos they are going to die in prison if they dont get executed anyway!
Alex Irby: Correct. Please include an email so I can comment on your solns, or email me at sjm1 AT williams.edu //s
Any chance you’ll give us the answer? 🙂
sure, coming over. I think this is the hardest one on the site. /s
While a prisoner can only change one switch is it possible for the prisoner to change that one switch more than once? Say change it then change it back?
Also could you please send me the answer for this riddle? Hard to concentrate on studying when you are stuck in riddles!
you can visit a room many times in any order. that said, no guarantee that every prisoner will visit once prior to someone visiting twice.
Question: Can a particular prisoner visit room zero more than once prior to any other prisoner not entering the room? Or more specifically, is there any guarentee that every prisoner will visit room zero prior to any other prisoner visiting room zero twice?
I still believe this is the hardest on the site. I’ll let the comment go through as you’re the proposer. //s
ok, hint/soln sent
i am clueless…
Wow. Glad to see my problem is still generating a buzz!
Here are hints I typically give if people are trying to solve it but don’t just want the answer. You can either let this comment through or reject it and add hints in the usual sense in case people want them separately.
Hint 1: Start out by removing some assumptions, then seeing if you can work them back in.
Hint 2: Having two switches and being forced to flip one is not very different from having one switch and the option whether or not to flip it.
Hint 3: (More explicit stating of hint 1): Start with the case of 2 prisoners, 1 switch, optional whether or not to flip it, known to start down. This should be fairly simple. Then, attack each assumption one at a time. What modifications need to be made to generalize the number of prisoners? What modifications need to be made to account for having 2 switches and being forced to flip one? What modifications need to be made to get around the initial configuration being unknown?
Good luck!
correct //s
So, the prisoners who doesnt get chosen to go to room 0, cant see when someone is picked, or see how long the one who does, stay there?
If memory serves, the problem with your soln was you don’t know the initial configuration of the lightswitches, or who starts….
wasnt my solution correct
To anonymouns (is it that every person will be told to ….): correct, well done! not posting as its’ the soln
I’m not sure. I struggled for awhile on this one, finally solved it by taking a 50 minute walk
what is the fastest time a person finished this riddle?
Can you please email me the solution:D
sadly, yes — one of the many things that makes this problem so hard! email me at sjm1 AT williams.edu if you want more of a hint / the soln
Can I please get some clarification on this problem?
Is it possible for the same prisoner to be brought to room 0 twice in a row, without any other prisoners visiting the room? If so I can’t see a solution that guarantees success.
almost — you’d be correct if you knew the initial configuration of switches.
nope — this is the hardest one by far on the page! :]
before i continue trying to crack my brain on this one…is there some sort of non mathematical “trick” involved?
Stan: you’re close; email me ([email protected]) if you want a hint / my soln. //s
Well I guess that everyone would flip the first switch but then the 22nd guy would flip the 2nd switch so the next guy would know that he was 23rd, i just cant figure out how he would figure out he was the 22nd guy to go in so he could flip the 2nd switch
same here — a fun problem
Greetings From Canada I agree with you 97% I have some reservations, but on the whole as far as I am concerned your views are good enough
Well done! ..s
Sent you the solution
will do — I think this is the hardest. //s
I was thinking about this really hard but… why not just ask the Warden?
But that would defeat the purpose of the riddle… Hm. I’d say what I think, but I’m sure I’m wrong. Does my email show up for you? If so, please send me the answer. :/ I agree, this is probably one of the hardest, if not the hardest, one on the sight.
Glad you’re enjoying the page. It’s interesting seeing how much the traffic is increasing — at this rate in a year or two I’ll need to have someone helping!
Youre so cool! I dont suppose Ive read anything like this prior to. So nice to obtain somebody with some original thoughts on this topic. realy thank you for starting this up. this web site is some thing that is needed on the web, someone using a small originality. beneficial job for bringing some thing new to the web!
I believe it’s the hardest one on the site — email me at [email protected] if you want a hint. //s
this is hard
sure //s
will you pls. e-mail me the sol.?
can you email me the answer
Hmm — will you be honest and admit to them that you had to look it up? If you’re willing to do that I’ll send the answer to “you light up for life”….
please send me the answer, I am trying to stump some coworkers and the rules of the office is that you must know the answer first:(
Sure — this is the hardest one on the site (in my opinion). //s
Can you please email me the solution to this email?
I am very interested about it!
Thank you in advance.
Sure — this is I believe the hardest one on the site.
Can you email the answer to this email. Students checking my answer.
Thanks
this is the hardest (in my mind) on the site — will email.
Hey Steve,
My Friend and me have been trying to figure this problem out for a couple weeks now and I was hoping that you could give us the answer and the math on how to get the answer.
Thanks
Typically the numbers matter little, if at all. You could do 2012 prisoners; people often use the year to highlight the fact that the number doesn’t matter. Glad you’re enjoying the site. //s
Gosh! It gets more complicated the more you think about it.
I need a small hint… Does the riddle only work with 23 prisoners? If they can come in and out as many times as you want, the number is irrelevant, is it? Could it be done with, say, 15 prisoners? Could it be done with 46?
By the way, great website! I can’t believe I hadn’t found it before!
Sure. Let me know if you didn’t get it (email me at [email protected])
can you email me the anwser
not sure — what does it mean to double?
can i double my chanses?
email to y ou isn’t working — email me at [email protected]
can you send me the solution/
Andrew: essentially correct (which is why I’m not posting), well done!
Yay for solving 🙂
Just send me an email ([email protected])
I believe I know the answer. How do I find out if I am correct?
yes. //s
Let me get this straight: we have 22 people with one leader, and they move one switch unless there is some special circumstance, in which case they move the other. Am I right?
locked in their rooms, and *I* get to decide the order. I can be as mean as I want. I can listen to their plotting. If I want, I can have prisoners 2 and 4 alternate one gazillion times in a row before someone else enters!
One more question, are the prisoners locked in each of their rooms? who decides the order in which they get to leave the room to go to room 0? is this something they could decide upon during the initial meeting?
sadly, nope. there is a solution without having a starting state that is known to all
“Their current positions are unknown” regarding the switches, thats what’s written. If we say that they had their initial planning meeting in room 0, could we say that they arranged the switches in a certain way? both up, or both down, for example?
they were gunned down — warden is no fool and had the room bugged!
Durring the planning session, they all team up to kill the warden and escape the prison. 😛 (I’m just joking)
This is the hardest by far on the site!
Wow. This riddle is extremely difficult! I don’t understand how someone with an IQ any lower than 500 can figure out the answer to this! It’s going to take me a while to figure out the answer to this one. (If I ever do figure it out)
One more question, can they visit Room 0 before the start of the game, like for their meeting session
That’s a good hint. So you can say there is a special person, and all else are equal, and there is a special switch that is used as a special switch if possible. This is a really hard riddle (I think the hardest on the site).
Second innocent hint??!
What if the two switches are assigned separate functions???
[I should say, I have a solution, and being a complete riddle fanatic myself, I am trying to deliver some useful hints to any other fanatic, that won’t be utter spoilers].
that’s the right way to start — one prisoner is special.
Innocent hint?!!
What if the prisoners, nominate a leader between them?
this is the hardest one on the site — if you want a hint/soln, email me at [email protected]
SO HARD
SO COMPLICATED!
AHAHAHAHAHA
i can’t answer it, ahahahaha
ok, but they still need to agree on a strategy!
They hold their initial meeting/planning session in room 0.
To: Anonymous: Submitted on 2011/10/08 at 7:22 pm: First person can only flip one switch, people can only flip switches cannot use anything to write their names.
this is almost surely the hardest problem on the site
if your teacher gets an answer, I’m happy to check.
I gave this problem to my math teacher, could i have the solution o i can check what she gets? [email protected]
Yes, can keep coming and coming and coming…..
I need to know one more thing from this:
If no-one declares to be 23th person. Does prisoners continue visiting in roomto end of a world?
So is there some timelimit or other limit?
Yep — it’s these issues that make it so hard!
Dear Steve,
this is a tough one.
do i understand the rules correctly, that 1) the first prisoner to get to room 0 does not know he is the first? and 2) theoretically it could happen that let us say prisoner 7 might only get to room 0 for the first time after one thousand other room-0-visits by the other prisoners?
regards
chris
Thanks for your kind words. It’s a lot of fun chatting with people about math. I’m working on a teacher’s corner with solutions and putting the riddles in context. If you want to be added to the list (or want to help), let me know. //s
I would like to get across my admiration for your kindness supporting folks that ought to have guidance on in this subject matter. Your individual dedication to obtaining the solution throughout had become particularly advantageous and has encouraged regular individuals just like me to obtain their pursuits. Your insightful data indicates a good deal to me and substantially more to my fellow workers. Thanks a whole lot; from all of us.
Right, but you need something that will work in general….
I have kind of an ansrew. It is not full-proof but i will work with some ways.
When starting postions are followings: 1,2 1,1 2,2 2,1 (1 = up 2 = down)
Every time when some one moves one of those, there will be added +1 or -1 to value ( so i mean if position is 1,2 next value is 1+1,2 or 1, 2-1. ) If u count it longer u notice that in 23 adds ending values always uneven son 1,3,5,7 and so on. U can transfer that to switch postions so uneven value is always 1,1 or 2,2. So if swich are in postion 1,2 or 2,1 it cant be ended yet. I cant say more yet but i will correct this ansrew later. There is now half of the values deleted. But it will not solve this problem yet.
no
Is it required that each prisoner must visit at least once before any prisoner visits a 2nd time?
Really hard to give a hint for this one; try making one special.
can you give a hint? so confusing!
Hello Steven. Nice. I will try it.Thanks.
Without a doubt, this was the hardest for me to solve. It took me a 50 minute walk away from everything to see how to tackle it. If you want a hint, email me at sjm1 AT williams.edu.
My head hurt solving this
Sorry to hear that; however, if you have some feline blood you might still have 6 lives in reserve! For me, riddles like this are great at getting me to think in radically new ways.
This game has no purpose. I would have been executed 3 times!!
I don’t see how to do it with one if each person must flip a switch every time they enter. Could you email me (sjm1 AT williams.edu) your solution?
one switch is enough to solve this one.
In my mind, this is the hardest problem on the site. It took me a long time to see the right way to look at it (I think it was in a 50 minute walk from my wife’s office back to our house).
A very ingenious problem indeed. It took my colleagues and me the best part of a lunch break to solve, after two of us had spent some thought on it overnight. Once you know the solution, all parts of the problem make perfect sense.