
Classic Logic Puzzles
Five puzzles to solve before you read the answers: Raymond Smullyan's knights and knaves, Wason's four cards and the drinking-age version three times as many people get right, the Monty Hall problem and the Ph.D.s who wrote to tell Marilyn vos Savant she was wrong, the two envelopes, and the blue-eyed islanders. Each answer, the reasoning that reaches it, and what each puzzle shows about where minds slip.
- 12 min
- 9 steps
- 8 questions
- 7 hands-on
- Lesson 20 of 20 in Critical Thinking
- Drafted by Opus 5.5
In this lesson
- Knights and knaves
- Four cards
- Three doors
- Two envelopes
- The blue-eyed islanders
- What the puzzles share
- Puzzle books and papers
- Try it
Picking up where you left off.
On April 1, 1925, a six-year-old boy lay sick in bed in Far Rockaway, New York. His brother Emile, ten years older, came in and announced that today he would fool Raymond as he had never been fooled before. Raymond waited all day. Nothing happened. That night he lay awake wondering whether he had been fooled or not 1.
Raymond Smullyan grew up to be a logician and philosopher, a pianist, and for a stretch a nightclub magician called Five Ace Merrill; he studied for a year at the University of Wisconsin in 1943. His puzzle books, such as What Is the Name of This Book? (1978), made a public game of some of the deepest ideas in logic 1. He died in 2017. This lesson gives five classic puzzles. Each is set first; try it before reading on.
Knights and knaves
On Smullyan’s island, every native is a knight, who always tells the truth, or a knave, who always lies.
Puzzle 1. You meet A and B. A says, “We are both knaves.” What are they?
Puzzle 2. Another pair. A says, “At least one of us is a knave.” What are they?
Puzzle 3. The road forks. One road leads to the village. A single native stands there, and you don’t know which kind. You may ask one yes-or-no question. What do you ask?

Answers. The method is to try each possibility and throw out any that contradicts itself.
- If A were a knight, his statement would be true and he’d be a knave: impossible. So A is a knave, his statement is false, and they aren’t both knaves: B is a knight.
- If A were a knave, “at least one of us is a knave” would be true, and knaves can’t say true things. So A is a knight, the statement is true, and B is the knave.
- Point to the left road and ask: “If I asked you whether this road goes to the village, would you say yes?” A knight answers truthfully about a truthful answer. A knave lies about what he would say, and his lie about a lie comes out true. Either way, “yes” means the left road. A question about the other person’s answer, or one’s own, makes two negations cancel.
Sort
This exercise needs JavaScript.
Try each possibility and throw out the one that contradicts itself. A knight can’t call himself a knave, and a knave can’t truthfully say one of them is a knave. In the last two, assuming the other answer forces B to tell a truth while lying, or a lie while truthful.
Four cards
Look at the top row of the diagram. Each card has a letter on one side and a number on the other. The rule: if a card has a D on one side, it has a 3 on the other. Which cards must you turn over to find out whether the rule is broken? Then do the bottom row.
Answer. D and 7. The rule is broken only by a D with something other than 3. The D must be turned; so must the 7, which might have a D on its back. The 3 tells you nothing, because the rule never said only D cards carry a 3.
Peter Wason devised the task in the 1960s, interested in Karl Popper’s view of science, to see whether people look for evidence that could falsify a hypothesis. They mostly don’t. Across many studies, fewer than a quarter give the right answer for rules like this one; most pick D alone, or D and 3 2. Choosing the 3 is looking for confirmation, the habit in Confirmation Bias, where Wason’s other puzzle, 2-4-6, appears. The bottom row has the same logic: the beer drinker and the 16-year-old. In that form, around 75 percent get it right 2.
Why? Leda Cosmides and John Tooby argue that human reasoning has a special-purpose ability for detecting cheaters on social contracts: rules of the form “if you take the benefit, you must pay the cost.” Their evidence is that unfamiliar, even culturally alien social contracts also get around 75 percent, while obligation rules lacking that cost-and-benefit shape do poorly, 12 and 25 percent in one set of tests 2. Critics answer that more general reasoning about permission and obligation, rather than a dedicated module for catching cheaters, explains the improvement; Cosmides and Tooby have defended the modular reading against them, and the argument is not settled 3.
Select all that apply
This exercise needs JavaScript.
Only a D with something other than 3 behind it breaks the rule. So turn the D, and turn the 7 in case a D is on its back. The 3 can’t break the rule whatever is behind it, since the rule doesn’t say only D cards have a 3.
Select all that apply
This exercise needs JavaScript.
Check the beer drinker’s age and the 16-year-old’s drink. It is the same logic as D and 7, and around three times as many people get it right in this form.
Three doors
In 1990 a reader asked Marilyn vos Savant, in her Parade magazine column, this question. You’re on a game show with three doors: a car behind one, goats behind the others. You pick door 1. The host, who knows what’s behind the doors, opens door 3 to show a goat and asks whether you want door 2 instead. Should you switch? Answer before reading on 4.

She said yes: the first door has a 1-in-3 chance, the other a 2-in-3. Imagine a million doors, she wrote: you pick one, the host opens all the others but one. You’d switch fast. The mail was ferocious. One university mathematician wrote, “You blew it!”; others suggested she consult a textbook. She reported thousands of letters, nine readers in ten disagreeing with her, including 65 percent of the letters from universities. She then asked school maths classes to play the game with paper cups and a penny, two hundred rounds each way. The results came back on her side, among them from a fifth-grade class in River Falls, Wisconsin 4.
Answer. Switch. List the three equally likely places the car could be, not the two doors left. In one of them your first pick was right and switching loses; in the other two the host was forced to open the only other goat, and switching wins.
The key condition is the host’s knowledge. He always opens a losing door on purpose; vos Savant pointed out that he couldn’t always find a goat by chance 4. His choice carries information about the doors you didn’t pick, and none about yours.
Work it out
This exercise needs JavaScript.
Your first pick is right 1 time in 10. The other 9 times the car is behind one of the doors you didn’t pick, and the host has opened every one of those except the car’s. Switching wins 9 times in 10.
Find the mistake
This exercise needs JavaScript.
Staying wins 1 time in 3 and switching 2 in 3. Even 65 percent of the university letters said she was wrong, and the classroom games came back on her side.
Two envelopes
You are handed one of two envelopes and told that one holds twice as much money as the other. You open yours: $100. You reason that the other holds $200 or $50 with even odds, so its expected value is $125, and you should switch. But the reasoning didn’t depend on the $100; you’d switch whatever you saw, and the person holding the other envelope would reason the same way. Something is wrong. What?
When Barry Nalebuff set this in the Journal of Economic Perspectives in 1988, the response was, as he wrote in his 1989 answer, overwhelming 5.
Answer. The even odds. No real way of filling envelopes can make “double or half, fifty-fifty” true for every amount. If the amounts have any upper limit, then seeing the top amount tells you the other envelope is half, and the expected gain from always switching comes to nothing. The philosopher David Chalmers notes that it is widely accepted that whenever the distribution of amounts has a finite expected value, the switching argument fails. Distributions with an infinite expected value keep the puzzle alive, and he links them to the St. Petersburg game 6, the coin game in Expected Value.
Quick check
The argument needs even odds that the other envelope holds double, whatever you see. With any real limit, the top amounts can’t be doubled, so the even odds fail. Only distributions with infinite expected value keep the puzzle alive.
The blue-eyed islanders
On an island, the custom is that anyone who learns their own eye colour must leave on the ferry that night. No one may mention eye colour, and there are no mirrors. Everyone sees everyone else’s eyes, and everyone is a perfect logician and knows the others are too. There are 100 blue-eyed islanders; each sees 99. One day a visitor remarks how unusual it is to see another blue-eyed person here. What happens? The visitor said nothing anyone didn’t know.
Terence Tao, the mathematician, posted the puzzle in this form in 2008 (his version ends more grimly than a ferry) and set out two arguments: the visitor changes nothing, or, by induction, all 100 blue-eyed islanders act on the hundredth day 7.
Answer. All 100 leave on the hundredth night. Start small. With one blue-eyed islander, she sees no blue eyes, hears the remark, and leaves that night. With two, each sees one and expects that one to leave the first night; when nobody does, each realizes there must be a second, and both leave on night two. Each added islander adds a night.
What did the visitor add, if everyone already knew there were blue eyes? Before, everyone knew it; after, everyone knew that everyone knew it, and that everyone knew that, all the way down. Philosophers call this common knowledge, as against mere mutual knowledge. The Stanford Encyclopedia tells the same puzzle as diners with barbecue sauce on their faces, from a version Littlewood published in 1953: the cook’s announcement of something each diner already knew is what lets them work out the rest 8.
Work it out
This exercise needs JavaScript.
Each blue-eyed islander sees 3 others and expects them to leave on night 3 if there are only 3. When they don’t, each concludes there is a fourth, and it is themselves. All 4 leave on the fourth night.
What the puzzles share
Each trap is a different slip. Knights and knaves punish trusting a statement before checking whether it could be true from that speaker. The four cards reward looking for the case that could prove the rule false. The doors reward asking how the evidence was produced, not just what it shows. The envelopes punish a probability no real setup can give. The islanders show that a public statement can change what people can infer even when it tells no one anything new.
Puzzle books and papers
- Smullyan’s What Is the Name of This Book? (1978) and his other puzzle books are listed in MacTutor’s biography of him, which also tells the April Fool story 1.
- Marilyn vos Savant’s page reprints the original columns and letters, preserved by the Internet Archive 4.
- Cosmides and Tooby’s chapter on social exchange is free from the Center for Evolutionary Psychology at Santa Barbara 2.
- Tao’s post has hundreds of comments working through the islanders 7.
Try it
Play the three-door game with someone else as host: three cups, a coin, and a die to hide it. Run 30 rounds staying and 30 switching, and keep a tally. Then set the four-card puzzle, in both forms, for someone who hasn’t seen it, and note which cards they pick first and what they say while choosing.
Lesson complete
Nice work.
Teach it back
In two sentences, explain Classic Logic Puzzles to a friend who missed it.
Related lessons
Among the starsSources for this lesson
- 1Raymond Merrill Smullyan. MacTutor History of Mathematics, University of St Andrews. verifiedBorn 25 May 1919, Far Rockaway, New York; died 6 February 2017, Hudson, New York; mathematician, magician, concert pianist, logician and philosopher, best known for puzzle books. On 1 April 1925 his brother Emile promised to fool him as never before, and fooled him by not fooling him; Smullyan lay awake wondering whether he had been fooled. Entered the University of Wisconsin in 1943 for a year; earned his living in Chicago and New York performing magic as 'Five Ace Merrill' and teaching music; later Lehman College (CUNY) and Indiana University. References list What is the name of this book? (New York, 1978).
- 2Cognitive Adaptations for Social Exchange, in The Adapted Mind, ed. J. Barkow, L. Cosmides, and J. Tooby. Oxford University Press (chapter PDF from the UCSB Center for Evolutionary Psychology). 1992. verifiedPp. 181-182: Peter Wason, interested in Popper, devised the selection task (Wason 1966) to see whether people look for evidence that could falsify a hypothesis; a rule If P then Q is violated only by P with not-Q, so the logically correct choice is the P card and the not-Q card (for 'a D on one side means a 3 on the other', D and 7); fewer than 25 percent give it for unfamiliar rules; most choose P alone or P and Q. P. 185: social contract rules, familiar like the drinking-age problem or unfamiliar, elicit around 75 percent correct. Pp. 203-204: Cheng and Holyoak's permission-schema theory predicts high performance on any obligation rule, but rules without a social contract's cost-benefit structure elicited only 12 and 25 percent in Manktelow and Over's tests; the authors argue for reasoning procedures specialized for detecting cheaters. Cited at: pp. 181-182; p. 185; pp. 185, 203-204.
- 3Evolutionary Psychology. Stanford Encyclopedia of Philosophy. 2024. verifiedFirst published February 8, 2008; substantive revision January 30, 2024. Section 5: Cosmides (1989) defends the hypothesis of a cheater-detection module, an adaptation that arose in response to cheaters; Cosmides and Tooby (2008) defend its modularity against the view that general rules of inference drive this reasoning; Sterelny and others offer non-modular explanations of moral psychology. Cited at: §5.
- 4Game Show Problem. marilynvossavant.com (material first published in Parade magazine, 1990 and 1991). verifiedRead in the Internet Archive copy of November 18, 2018; the live site does not respond. The reader's question (three doors, a car and two goats, a host who knows opens a goat door); her answer: switch, the first door has a 1/3 chance and the other 2/3; imagine a million doors. Letters from Ph.D.s insisting the odds are 1/2; she plays through the six possible games; later 'thousands of letters', 92 percent of letters from the general public and 65 percent from universities against her, nine out of ten readers in all; the key condition is that the host always opens a losing door on purpose; she asked math classes to test it with paper cups and a die; replies from classes, including a fifth-grade class in River Falls, Wisconsin, confirmed it.
- 5Puzzles: The Other Person's Envelope is Always Greener. Journal of Economic Perspectives 3(1):171-181. 1989. verifiedAbstract read on the AEA page (the PDF sits behind a bot check): the Puzzles feature answers 'The Other Person's Envelope is Always Greener', posed in the Spring 1988 issue; 'The response to this puzzle was overwhelming'; Nalebuff recaps the problem and discusses the many proposed solutions.
- 6The St. Petersburg Two-Envelope Paradox. Analysis 62:155-157 (author's copy at consc.net). 2002. verifiedStates the two-envelope reasoning: for any x in A, B holds 2x or x/2 with even odds, so B's expected amount is 5x/4 and you should switch, though the situation is symmetrical. 'It is widely accepted' that if the prior distribution has a finite expected value, steps (1) and (2) are false; some distributions with infinite expected value keep (2) true, and the paradox returns as strongly as ever; Chalmers builds a version with St. Petersburg amounts in each envelope to diagnose it.
- 7The blue-eyed islanders puzzle. What's new (Terence Tao's blog). 2008. verifiedFebruary 5, 2008. Tao's formulation: 1,000 islanders who may not learn their own eye colour, 100 of them blue-eyed, all highly logical, each seeing everyone else's eyes; a visitor remarks on seeing another blue-eyed person. Two plausible arguments: (1) no effect, since everyone already knew there were blue-eyed people; (2) by induction on n, n days after the address all n blue-eyed islanders act on their knowledge, with the n = 1 case and the inductive step given. Tao leaves the resolution to the comments.
- 8Common Knowledge. Stanford Encyclopedia of Philosophy. 2022. verifiedFirst published August 28, 2001; substantive revision August 5, 2022. Section 1.2, the Barbecue Problem, a variation of an example first published by Littlewood (1953): diners with sauce on their faces cannot see their own; the cook announces that at least one has sauce, something each already knew, and rings a bell repeatedly; with k messy diners, all realize it at the kth ring, by induction; the announcement works because it makes the fact common knowledge, not just mutual knowledge. Cited at: §1.2.