Knights and Knaves Puzzles

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.

About these ads

1 Comment

Filed under External, Logic, Original

One response to “Knights and Knaves Puzzles

  1. Joshua Sklar

    1. If I was to ask you what Bob was, what would you say?

    I’m not sure about the second one. If there is at least one knight, I think you could do it this way:

    First you ask, “If I were to ask you if there were an even number of knights among Carl, Bab, Dave and Evans, what would you say?” If he says yes, you ask “If I were to ask you if two of the four were knights, what would you say?”
    If he says no to this, you know there are four knights. If he says yes, there are two knights.

    If, on the other hand, he answers “no” to your first question, you can ask “If I were to ask you if there were three knights among them, what would you say?” If he answers “yes” to this, there are three. If he answers “no,” there is one.

    I do know about the last question. It seems to me, at this stage, that it would depend on his answers to the questions. I guess you could ask “If I were to ask you if the number of knights was a factor of six?” as the first question it could work out pretty well. If he says no, you’re only left with four and five, and then you could just ask, “If I were to ask you if there were four knights among you, what would say?” If he says no, they are all knights. If he says yes, there are four knights.

    If, on the other hand, he says yes, you have to narrow it down between one, two, and three, and I don’t know if you can do that in less than two questions. So, I’m going to say you need three tops, two minimum. Like the last question, this solution only works if there are more than zero knights.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s