Knights and knaves puzzles were first formally introduced in Raymond Smullyan’s book What is the Name of This Book?: The Riddle of Dracula & Other Logical Puzzles. I won’t go too deep into their history as you will easily find that in many other sources.
The setting for these puzzles is an island, all of whose inhabitants are either knights or knaves. Knights always tell the truth (they never lie), while knaves always lie (they never tell the truth). A knights and knaves puzzle typically consists of a challenge to make a logical deduction based on the simplicity of the setting. I’ll explain myself better through some examples:
The following are the two basic examples found on Wikipedia and other web sources. John and Bill are residents of the island:
First example: John says “We are both knaves.” What are John and Bill?
Second example: John says “We are of the same kind,” after which Bill says “We are of different kinds.” What are John and Bill?
Testing all the four possible cases provides us with the answers to each of the two puzzles above. In the first one for example, the only possibility is that John is a knave and Bill is a knight. The second one also has only one possible solution which I will leave for my readers to figure out.
The most famous of all knights and knaves puzzles is much more difficult than the two examples above: At some point in your trip through the island, you are forced to choose between two doors, one of which is guarded by a knight while the other one is guarded by a knave. One of the doors leads to instant death while the other one allows you to continue with your tour. You don’t know which door is which, or which guard is which. You must make one (and only one) yes-no question to one (and only one) of the guards. After receiving the answer to your question, you must choose a door based on that answer. Which question would you ask and which door would you choose?
An even more difficult puzzle has been called The Hardest Logic Puzzle in the World, but for now I will just share with you some knights and knaves puzzles I came up with tonight. They may or may not be originally mine, but I devised them independently for this post. Andy, Bob, Carl, Dave and Evan are all residents of the island.
- Can you figure out Bob’s kind by asking one yes-no question to Andy?
- Can you figure out the number of knights among Bob, Carl, Dave and Evan by asking two yes-no questions to Andy?
- How many yes-no questions do you need to ask Andy to figure out the number of knights among the five of them?
Have fun solving them! Remember to post your comments, questions, solutions and related puzzles in the comment section below.