a prisoner escapes prison and reaches a place where there are two doors before him,each guarded by one man.the prisoner knows that one of the doors lead him back to prison and the other leads to freedom.he also knows that one of the guards is a liar and the other one is truthful,but he doesnt know which one is the liar.which ONE question can he ask to either of them which will surely show him the path to freedom.I WAS STUMPED BY THIS ONE,PLEASE HELP ME OUT...
I remember this one. I heard it as demons guarding the way out of an enchanted palace. Anyway, here's a hint: you have to make about three reversals in your thinking.
http://forum.allaboutcircuits.com/showpost.php?p=33496&postcount=9 here u'll find this problem even trickier, and yup i solved this one toO. (the answer and more puzzles in that respective thread)
Adding a third guard (or politician) with random answers does indeed add possibilities. The solution boils down to the same one, though, once the "red herring" is thrown out.
This can be done with boolean arithmetic.. Feed a signal through an inverter (NOT) , then through a non-inverter, you get the same output as if you fed the same signal through a non-inverter followed by an inverter..
here is the answer He should ask the question that "" Which gate the other guard will say as a gate to freedom if he ask him ?" whatever the answer this guard say to him, the person should go in the second gate and not in the same one specified by him. let me explain it. Let us suppose that GATE 1 (freedom) guard 1 (say lie only) GATE 2 (prison) guard 2 (say truth only) If the person will ask the question (mentioned above) to gaurd 1, then the guard 1 will reply gate 2. So the person should go in other gate means gate 1. OR If the person asks the question (mentioned above) to gaurd 2, then the guard 2 will reply as gate 2. So the person should go in other gate means gate 1. Hope it is clear to you. If not then read it again and do some paper work to make conditions for the same question.
Right.. one doesnt really need to 'think' about a problem like this if you apply 'boolean style' logic.. gaurd 1 and 2 form a 'inverter' and a 'non inverter' - The ONLY known is that there is one inverter and one non-inverter (liar + truth-teller.. False [NOT] and TRUE) so bounce the data (the 'door') through both of them in series, and you can gaurantee that the 'data' will be inverted!.. So ask any guard what the other gaurd would answer about a specific door, and the data you recieve will be false!
This boolean method almost works for puzzle involving 2 questions and one 'random' (noisy) element.. but not quite! - those familiar with indeterminate logic states will know the trouble these can cause! The 'true' (non-inverter) element would need to output an 'error' flag of some kind.. Quite simple for humans - the reponse from a true person asking someone they knew was untrustworthy would be to state "I do not know"... the output from a non-inverting logic element would simply be what was given to it at the time.. Given 2 questions, it should be possible to determine the answer... But it still has me stumped ! Please dont tell me! Give me another week...