# Labyrinth Two-Door Puzzle

My partner's favorite movie is without a doubt Labyrinth (1986) and I'm more or less "forced" to watch it at least once or twice a year. Not that I'm complaining. :)

I've always liked the Two-Door Puzzle presented in the movie but I've never really sat down and thought it through properly and my brain is too slow to verify the solution while the movie is running and I often forget about it afterwards.

You all know the drill:

There are two guards each guarding a door. One of the doors leads to the castle and the other one to certain death. One of the guards always speaks the truth and the other one always lies. You may ask one question.

Let **A** correspond to one fixed door and guard and **B** correspond to
the other guard/door. WLOG also assume that **A** is the safe door.

One possible solution is to ask guard **A** which door guard **B** would
say leads to the castle and then choose the opposite door.

We will show that this solution is independent of which of the guards is the compulsive liar.

First suppose that guard

**A**is the liar. Thus, by assumption,**B**always tells the truth. We ask**A**if**B**would tell you which door is safe. Since**B**is truthful they would point you to door**A**but since guard**A**is a liar they would say that guard**B**would point your to door**B**. By taking the opposite door**A**we are safe.Secondly suppose that guard

**A**is truthful and that guard**B**now is the liar. We ask**A**if**B**would tell you which door is safe. Since**B**is a liar they would say that**B**is the correct choice and since**A**is an agent of truth they would say that**B**would point you to door**B**. By taking the opposite door**A**we are again safe.

This shows that the proposed solution actually works. I think it's a fun little puzzle.