Wednesday, October 14, 2009

10-14-09: The Two Doors Riddle

I was reminded of a scene from Labyrinth last night while watching an episode of Numb3rs. The scene, from Labyrinth, involved two doors, whereas the scene in Numb3rs involves two criminals. The logic is essentially the same.

Let's go with the Labyrinth scenario, in which the main character Sarah, played by Jennifer Connelly, comes upon two doors. Each door has a guard, and she is told one door leads to the castle, and the other leads to certain doom. She is also told one of the guards always lies, and the other always tells the truth.

She ends up solving the riddle by asking each guard "What would the other guard tell me about this door?" She then reasoned that, given the rules, she'd go through the one that she was told led to certain doom. She was, of course, correct.

I worked out the logic today once again, as this particular riddle has always boggled me a bit. I did get it at one point in time, but every time it comes back up, I have to reason it out again.

Let's look at it from each of the two generally possible scenarios (there are of course four combinations, but the doors can be interchangeable). The guards A and B are assigned to doors A and B, respectively:

1) Door A is the safe door and Door B leads to certain doom. Guard A is the liar and Guard B tells the truth. If you ask Guard A (the liar) what Guard B (the truth teller) would say regarding where Door A led, Guard A would say it led to certain doom (the opposite of the truth). If you ask Guard B what Guard A would say regarding where Door B led, Guard B would say it led to safety (the opposite of the truth).

2) Same door assignments as in 1, except Guard A tells the truth and Guard B is the liar. If you ask Guard A (the truth teller) what Guard B (the liar) would say regarding where Door A led, Guard A would say it led to certain doom (the opposite of the truth). If you ask Guard B what Guard A would say about Door B, Guard B would say it let to safety (the opposite of the truth).

Either way, you get the lie twice. In both cases, the door you are told leads to certain doom is, in fact, the door that leads to safety. Try the other two combinations (Door A leads to certain doom and Door B leads to safety) and you will come to the same scenario.

Simply go with the opposite.

No comments: