## The Temple of Doom

You and eight of your team members are trying to escape the Temple of Doom. You are running through a tunnel away from a deadly smoke and end up in a large hall. There are four paths ahead, and exactly one of them leads to the exit. It takes 20 minutes to explore any of the four paths one way, and your group has only 60 minutes until the deadly smoke suffocates you. The problem is that two of your friends are known to be delirious and it is possible that they do not tell the truth, but nobody knows which ones they are. How should you split the group and explore the tunnels, so that you have enough time to figure out which is the correct path and escape the temple?

**SOLUTION**

You explore the first path. You send two of your teammates to explore the second path. You send the remaining six teammates in groups of three to explore each of the two remaining paths. If your path leads to the exit, then everything is good. Otherwise, you ask the two groups of three whether their paths lead to the exit. If in both groups everyone answers consistently, then nobody is lying, and you will escape. If in both groups there is a person whose answer is different from the others in the group, then the majority in both groups says the truth. Once again, you will know which path leads to the exit. Finally, if in exactly one of the groups everyone answers consistently, you ask the group of two. If the team members there answer consistently with each other, then they say the truth. You will have two groups which tell the truth and will know which path leads to the exit. If the answers of the teammates in the group of two differ, then in the inconsistent group of three the majority will be saying the truth. Again, you will be able to deduce which path leads to the exit.