Knights and Knaves

Knight and squire is a Logical by Raymond Smullyan.

On a fictional island, all inhabitants either knights, who always tell the truth, or squire (also called villains ), who always lie. In the logic puzzle a visitor comes to the island and meets some residents. Usually, it must be concluded from the statements of the inhabitants, to which variety they are, but sometimes also find out something else. There are also puzzle, in which the visitor has to find a yes -no question that allows it to find out what he wants to know.

An early example of this type includes three residents A, B and C. The visitor asks A what he is, but does not hear the answer. Then B says: "A said that he was a knave " and C: " faith which B does not, he's lying " To solve the puzzle, you have to know that no inhabitant can say he is a squire. Therefore, the statements of B is false, so he is a squire. Thus the statement of C is correct, so he is a knight. Since A has said "I am a knight ", it is impossible to figure out what it is.

In some variants, there are also residents who are aged kidney, so alternately lie and tell the truth, or spies who say what they want. Another possible complication is that the inhabitants of yes-no questions to answer in their own language, while the visitors only knows that " bal" and "there" " yes " and "no" hot, but not in what order. This type of puzzle inspired ' the hardest Logical '.

Examples

A large class of elementary logic puzzle can be solved by means of Boolean algebra and logic truth tables. The Boolean algebra and their Simplifizierungsprozess helps in understanding the following examples.

John and William are both inhabitants of the island of knights and squires.

Question 1

John says: We are both miners.

Who 's what?

Question 2

John: If and only if William is a squire, I'm a squire.

William: We are of different types.

Who's who?

Question 3

Here is the most popular variant of knights and squires:

John and William are at a crossroads. Most users know that one of them is Knappe, the other knights, but not which one. He also knows that a way to death, the other leads to freedom. Who is the yes-no question, he finds the way to freedom?

This version of the puzzle was popularized in a scene from the fantasy film Labyrinth, place two doors in the Sarah (Jennifer Connelly ), both of which are each guarded by a two-headed knight. A door leads into the center of the castle, the other in certain doom.

Answer to Question 1

John's statement is equivalent to:

" John is a knave and Wilhelm is a squire. "

If John was a knight, so he said not to be a squire because he were lying there. So is the statement " John is a knave " true.

Since miners lie and a statement is true, the other statement must be false. So the statement " Wilhelm is a knave " necessary is wrong, ergo must be a Wilhelm Ritter.

Solution: John is a knave and William is a knight.

Answer to Question 2

John is a knave and William is a knight.

In this scenario, John says the equivalent of " We are not different type " (ie, both knights or both squires ). Wilhelm says the opposite. Since both contradict each other, one has to lie, tell the other the truth, so a knight and a squire be. Since the latter is what William said, William is the knight, so John is the squire.

Answer to Question 3

To find out which path leads to freedom, the following question should be asked: "Will tell me if your path to freedom lies the other man? "

Says the man " yes," then not leads his way to freedom, he says " no", then he does it.

If the question is asked the knight, whose path to freedom lies, he will say "no", because this is the truth that the squire lie and "no" would say. Does not the knight path to freedom, he will say "yes", as this would tell the squire.

If you question the squire, whose path leads to freedom, he will say "no" and lie with it, as the knight would say "yes". Does not his way to freedom, the squire said "yes " because the knight would say "no."

To this solution squire and knight must know each other their identity.

Another solution is the question: " What would be your answer, I asked you if your path leads to freedom? "

Replies the Sought " yes", then he made his way to freedom, he does not answer " no" then.

The knight tells the truth that he would tell the truth.

The squire would that he would lie, lie.

685432
de