You’re in a room with two doors. There’s a guard at each door. One door is the exit, but behind the other door is something that will kill you. You’re told that one guard always tells the truth and the other guard always lies. You don’t know which guard is which. You are allowed to ask one question to either of the guards to determine which door is the exit.
Ask either guard what door the other guard would say is the exit, then choose the opposite door.
If you ask the guard who always tells the truth, he knows the other guard would lie, so he’ll point you to the door leading to death. If you ask the guard who always lies, he knows the other guard would truthfully show you the exit, so he’ll lie and point you to the door leading to death.
An alternate solution is to ask a guard what they would answer if you were to ask them which door was the exit, then choose that door. The truthful guard will point to the correct exit, but the lying guard will too. Here’s why. If you asked him what door was the exit, he would normally lie and point to the death door, but you asked him what he would say if you asked what door was the exit, and in order to lie to that question, he will point you to the exit.
Mrs. Shine was having a rough day and wanted a break. So she asked her class to calculate the sum of the first 50 odd numbers. In a few moments, Winifred was at her desk with the correct answer of 2,500. Stunned, Mrs. Shine figured she must have gotten lucky, and sent precocious Winifred back to her seat with the task of finding the sum of the first 75 odd numbers. Again, Winifred returned in seconds with the correct answer (5,625).