if I am trapped in a room which has two doors ,1 leads to my house and another to a hungry lion . there are two computers in the room 1 tells lie and 1 tells the truth but you do not know which tells truth and lie.if I try to open 1 gate the another one will be locked automatically. I need to ask a question through which I can get to my house and both of them give the same answer. I can ask only 1 question.
The question you would need to ask would be: which way would the other computer tell me to go? (To get to my house, assuming that is where you would want to go) This works because the truthful computer will correctly tell the direction the computer that lies wants you to go, which is the wrong direction. The lying computer will tell you the opposite way that the truthful computer wants you to go.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.
The question you would need to ask would be: which way would the other computer tell me to go? (To get to my house, assuming that is where you would want to go) This works because the truthful computer will correctly tell the direction the computer that lies wants you to go, which is the wrong direction. The lying computer will tell you the opposite way that the truthful computer wants you to