Jugami Math Puzzles

Jugami › School › Math Puzzles › Logic Puzzles

Logic Puzzles: Knights, Knaves and Deduction

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.

Two islanders with speech bubbles, one saying "True!" and one saying "False!", beside a small logic grid with one check mark and crosses True! False! Rule it out, one clue at a time

Where these puzzles come from

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
PersonCatDogFish
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.

  1. Take the goat across. (Wolf and cabbage are safe together.)
  2. Go back alone.
  3. Take the wolf across.
  4. Bring the goat back! (Otherwise the wolf eats it.)
  5. Take the cabbage across. (Wolf and cabbage are safe together.)
  6. Go back alone.
  7. 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.

1. On an island, knights always tell the truth and knaves always lie. A says, "B is a knave." B says, "A and I are the same type." What are A and B?

2. Dee, Eli and Fay ran a race and finished 1st, 2nd and 3rd, with no ties. Eli beat Dee. Fay was not first. Dee was not last. Who finished 3rd?

3. Two adults and two kids must cross a river. The boat holds either one adult or up to two kids, and someone must row it every trip. What is the fewest number of crossings to get all four across?

4. Gold is hidden in one of three boxes. Box 1 says "The gold is here." Box 2 says "The gold is not here." Box 3 says "The gold is not in Box 1." Exactly one of these signs is true. Where is the gold?

5. On the same island, you meet C, who says, "I am a knave." What can you conclude?

6. Gil is older than Hal. Ivy is younger than Hal. Jo is older than Gil. Who is the youngest?

Answer key (try first!)
  1. 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 ✔).
  2. 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.
  3. 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).
  4. 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.
  5. 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.
  6. 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

Credits: All illustrations are original art made for Jugami. Puzzles are traditional; all wording, solutions and quiz items are written for this page.