^^^lets say there are only 3 priosoners...me,dennis & bjr : i am the leader,who will finally declare the we all have entered... we plan that dennis and bjr will only switch "on" A if its off...if its already "on" then we leave it as it is and switch B...on or off..it doesnt matter. They have to switch A "on" only twice...and once its over,keep flipping B. i will switch "off" A if its on and count one..(or if its off,i switch B)coz i know that when A is on,it means one of dennis or bjr has entered. but i dont know the initial position,..hmmmm....so if i am taken in first and A was "on",i can mistake it for someone entered. lets take this condition...so i enter first,switch A is on..so i switch B and count 1. the next time i see A "on",i am sure someone has entered..and i count 2. when i count 3,it means again somone has entered,but i am not sure if both have entered as the warden chooses randomly and it could be dennis twice or bjr twice.... but the 4th time i am sure that both dennis and bjr have entered atleast once coz they are flipping A only twice...and it has been flipped 4 times(so the doubt of initially "on" is also removed).... hence i declare that we all have entered atleast once....and thus we all are set free... :rule: now work that out for 23.... :
dude..23 people!!!!hadh hai for me the funda is ki whatever happens, in the end the number of times people enter will be a multiple of 23...bah, but i still cant get a funda...mayeb im jsut too dumb ..hehehe
^^lol...nope..its simple....when everyone is switching A "on" only twice,it means the leader has to count twice their number....in case of 23...the leader has to count till 44 & then he can declare that all have entered...