Solve puzzles by reasoning from clues, step by step.
A detective doesn't guess who did it. She rules people out, one clue at a time, until only one answer is left. That's called deduction: using facts you know to reach a conclusion that must be true.
On this page you'll solve four kinds of classic logic puzzles, see how each worked solution is checked, and then try a six-question self-guided quiz.
Logic puzzles are old. A river-crossing puzzle about a wolf, a goat and a cabbage appears in a collection of math problems attributed to Alcuin of York, a scholar who lived about 1,200 years ago. The "knights and knaves" puzzles were made famous by the mathematician and magician Raymond Smullyan in his 1978 book What Is the Name of This Book?
Puzzle type 1
Knights and knaves: try it and see if it breaks
On a strange island, knights always tell the truth and knaves always lie. Everyone is one or the other. The trick is to suppose something, then follow it until it works or leads to a contradiction (two facts that can't both be true).
"We are both knaves"
You meet two islanders, A and B. A says, "We are both knaves." What are A and B?
See the worked solution
Suppose A is a knight. Then A tells the truth, so A is a knave. But A can't be both! That's a contradiction, so A is not a knight.
So A is a knave, and A's statement is a lie. "We are both knaves" is false, so they are not both knaves. A is a knave, so B must be the knight. Answer: A is a knave and B is a knight.
Check: a knave (A) says something false ("both knaves" is false, because B is a knight). ✔ Nothing in the puzzle breaks.
Puzzle type 2
Logic grids: cross out what can't be
A logic grid is a table that matches things up, like people and pets. Put ✘ where a clue rules something out and ✔ where a match must be true. Each row and column gets exactly one ✔.
Who owns which pet?
Ana, Ben and Cy each own one pet: a cat, a dog or a fish. No two own the same pet. Ana is allergic to fur, so her pet has none. Ben does not own the cat. Who owns which pet?
See the worked solution
Cats and dogs have fur, so Ana's pet is the fish. Mark ✔ for Ana–fish, and ✘ for everyone else in the fish column.
Ben can't have the cat or the fish, so Ben has the dog. That leaves the cat for Cy.
Finished logic grid for the pets puzzle
Person
Cat
Dog
Fish
Ana
✘
✘
✔
Ben
✘
✔
✘
Cy
✔
✘
✘
Answer: Ana has the fish, Ben has the dog, and Cy has the cat.
Check each clue: Ana's fish has no fur ✔, Ben doesn't own the cat ✔, and each pet has exactly one owner ✔.
Puzzle type 3
River crossings: list the safe moves
River puzzles have rules about who can be left alone. Write down each trip and check it's safe before you take the next one.
The wolf, the goat and the cabbage
A farmer has a wolf, a goat and a cabbage. His boat holds him and just one of them. If he leaves them alone, the wolf will eat the goat, and the goat will eat the cabbage. How does he get all three across safely?
See the worked solution
The goat is the problem: it can't be left with the wolf or the cabbage. So it goes first.
Take the goat across. (Wolf and cabbage are safe together.)
Go back alone.
Take the wolf across.
Bring the goat back! (Otherwise the wolf eats it.)
Take the cabbage across. (Wolf and cabbage are safe together.)
Go back alone.
Take the goat across.
Answer: 7 crossings, with the surprising move of carrying the goat back. Taking the cabbage in step 3 and bringing the goat back works too.
Check: after every trip, look at each bank where the farmer isn't. The goat is never alone with the wolf or the cabbage. ✔
Puzzle type 4
The mislabeled boxes: find the best question
Sometimes the smartest move is to pick the one test that tells you the most.
Apples, oranges, or both?
Three boxes are labeled "Apples," "Oranges" and "Mixed." Every label is wrong. You may take one fruit from one box without looking inside. How can you fix all three labels?
See the worked solution
Take a fruit from the box labeled "Mixed." Its label is wrong, so it holds only one kind of fruit. Say you pull out an apple. Then that box is all apples.
The box labeled "Oranges" can't be oranges (wrong label) and can't be apples (already found). So it's mixed. That leaves oranges for the box labeled "Apples." (If you pull out an orange, swap the words apple and orange in this reasoning.)
Answer: take one fruit from the "Mixed" box, then fix the other two labels by deduction.
Check: in the end, no box keeps its old label, and each kind appears once. ✔
How do we know an answer is right?
In logic, an answer is right when it agrees with every clue, and it's the only answer that does. So check twice: go back through each clue, then ask "could anything else work too?"
Self-guided quiz: Think it through
Six puzzles. Pick an answer for each, then check your score. Click "Check my answers" to see how you did and why.
Answer key (try first!)
A is a knight, B is a knave. If A were a knave, B would be a knight, and B's claim "same type" would be false, which a knight can't say. So A is a knight, and B really is a knave (and his claim is false ✔).
Fay. Eli beat Dee, so Dee isn't 1st, and Dee isn't last, so Dee is 2nd. Fay isn't 1st, so Eli is 1st and Fay is 3rd.
9 crossings. Moving one adult takes 4 trips: both kids cross, one kid rows back, the adult crosses, the other kid rows back. Do that twice (8 trips), then both kids cross together (9).
Box 2. If the gold were in Box 1, signs 1 and 2 would both be true. If it were in Box 3, signs 2 and 3 would both be true. Only Box 2 makes exactly one sign (Box 3's) true.
No one could say it. A knight saying "I am a knave" would be lying, and a knave saying it would be telling the truth. Neither is allowed.
Ivy. Put them in order from oldest: Jo, Gil, Hal, Ivy.
Talk About It
Is proving something can't be true just as useful as proving something is true? Why?
Where do people use deduction in real life: detectives, doctors, mechanics, or you?
Can you invent your own knights-and-knaves puzzle with exactly one answer? How would you check it?
Sources
Smullyan, Raymond. What Is the Name of This Book? The Riddle of Dracula and Other Logical Puzzles. Prentice-Hall, 1978.