If...Then... Logic: How Many Legs Does a Dragon Have?
"If it is raining, then I will take my umbrella." You say sentences like that without thinking about them. They have a shape, and computers, math and detective stories all run on that shape.
It is called a conditional: an if part, and a then part that follows from it.
The Two Halves
- If it is raining, then I will take my umbrella.
- If I eat all my vegetables, then I can have dessert.
The if half is a condition — something that might be true or might not. The then half is what has to happen when it is.
The rule does not say anything at all about what happens when the if half is false. "If it is raining, then I take my umbrella" does not promise you leave the umbrella behind on a sunny day. You might take it anyway. Rules only tell you about the cases they mention, and that catches people out constantly.
The Dragon Rules
Here is a world with three rules in it:
- If a dragon is blue, then it has four legs.
- If a dragon is green, then it has two legs.
- If a dragon is red, then it has no legs.
Sparky is a blue dragon. Rule 1 is the one that fits, so Sparky has four legs. You did not need to see Sparky. The rule did the work.
Emerald is green, so rule 2 applies and Emerald has two legs.
Ruby is a red dragon. How many legs does Ruby have?
- Four legs, like Sparky
- Two legs
- None at all
Rule 3 covers red dragons and says no legs, so Ruby has none. Notice you have never been told what a red dragon looks like, how big Ruby is, or anything else about her. The rule was enough on its own.
The Trap
Now the harder question. You meet a dragon with four legs. Is it blue?
The rules do not say so. Rule 1 promises that blue means four legs — it never promised that four legs means blue. Some other dragon could have four legs for a completely different reason, and no rule here forbids it.
Reading a rule backwards is the most common mistake in logic, and it is worth remembering the shape of it: if A then B does not give you if B then A. "If it is raining, the ground is wet" is true. A wet ground could still be a burst pipe.
Make Your Own World
Write three rules for creatures of your own, then hand them to someone else with a creature and see if they can work out the answer without asking you anything.
- If a creature has wings, then it can fly.
- If a creature has a horn, then it can do magic.
Then try to catch them out with the backwards question — "I met something that can fly, so it must have wings, mustn't it?"