Lesson 1: Logic Puzzles
15-20 minutes
What You Will Learn
In this lesson, you will:
- Discover what logic puzzles are and why they are great for your brain
- Try a river crossing puzzle, a truth and liar puzzle, and a grid logic puzzle
- Practice thinking carefully, step by step
- See how logic puzzles use the same thinking skills as coding
What Are Logic Puzzles?
Logic puzzles are brain challenges that you solve by thinking carefully -- not by guessing. They do not need math or special knowledge. You just need to pay attention, think step by step, and use clues to figure out the answer.
Logic puzzles use the same skills you have been learning in this course:
- Breaking problems into steps (decomposition)
- Looking for patterns (pattern recognition)
- Making decisions based on clues (conditionals)
- Trying something, checking if it works, and trying again (debugging)
Let us try some together!
Puzzle 1: The River Crossing
The Farmer, the Fox, the Chicken, and the Grain
A farmer needs to cross a river with a fox, a chicken, and a bag of grain. The farmer has a small boat that can only carry the farmer and ONE other thing at a time.
Here is the problem:
- If the farmer leaves the fox alone with the chicken, the fox will eat the chicken.
- If the farmer leaves the chicken alone with the grain, the chicken will eat the grain.
How can the farmer get everything across the river safely?
Hints
- Think about which two things can safely be left together. (The fox and the grain are fine together!)
- The farmer might need to bring something BACK across the river at some point.
- Try acting it out with toys or pieces of paper!
- The farmer takes the chicken across. (The fox and grain are safe together.)
- The farmer goes back alone.
- The farmer takes the fox across.
- The farmer brings the chicken back. (So the fox does not eat it!)
- The farmer takes the grain across. (The fox and grain are safe together.)
- The farmer goes back alone.
- The farmer takes the chicken across.
Everyone is safely across! The trick was bringing the chicken back in step 4. Sometimes you have to go backwards to move forwards -- just like in debugging!
Puzzle 2: Truth Teller and Fibber
Two Guards, Two Doors
Imagine you are in a room with two doors. One door leads to a treasure. The other door leads to nothing.
There are two guards. One guard ALWAYS tells the truth. The other guard ALWAYS lies. You do not know which is which.
You can ask ONE question to ONE guard. What question should you ask to find the treasure door?
Let Us Simplify This
This is a tricky puzzle! Let us try an easier version first:
Imagine there are two people: Sam always tells the truth and Pat always lies.
- If you ask Sam "Is the sky blue?" Sam says YES (truth).
- If you ask Pat "Is the sky blue?" Pat says NO (lie).
Now, what if you asked one person about what the OTHER person would say? That is the key to the puzzle!
Ask either guard: "If I asked the OTHER guard which door leads to the treasure, what would they say?"
Then choose the OPPOSITE door from what they tell you!
Why does this work?
- If you ask the truth teller, they will honestly tell you what the liar would say -- which is the wrong door.
- If you ask the liar, they will lie about what the truth teller would say -- which also gives you the wrong door.
Either way, you always get the wrong door as the answer. So pick the other one! This puzzle is about thinking two steps ahead -- just like in coding when you think about what your code will do step by step.
Puzzle 3: Grid Logic
Who Lives Where?
Three friends -- Alex, Bella, and Carlos -- each live in a different colored house: red, blue, or yellow. Use the clues to figure out who lives where!
Clues:
- Alex does NOT live in the red house.
- Bella does NOT live in the blue house.
- Carlos does NOT live in the yellow house.
- The person in the blue house is NOT Carlos.
Use this grid to help you solve it. Put an X for "no" and a checkmark for "yes":
| Red | Blue | Yellow | |
|---|---|---|---|
| Alex | |||
| Bella | |||
| Carlos |
- From clue 1: Alex is NOT in the red house.
- From clue 3: Carlos is NOT in the yellow house.
- From clue 4: Carlos is NOT in the blue house.
- So Carlos must be in the red house! (It is the only one left for him.)
- From clue 2: Bella is NOT in the blue house. Since Carlos is in red, Bella must be in yellow.
- That means Alex lives in the blue house!
Answer: Alex = Blue, Bella = Yellow, Carlos = Red
Grid logic puzzles are all about using clues to cross off what is NOT possible until you find what IS possible. This is exactly how computers make decisions -- by checking conditions one at a time!
Why Logic Puzzles Help Your Brain
Logic Puzzles and Coding Skills
Every time you solve a logic puzzle, you are using the same thinking skills that coders use:
- Reading carefully -- like reading code to understand what it does
- Working step by step -- like following a sequence of instructions
- Checking your work -- like testing and debugging
- Trying different approaches -- like iteration
- Not giving up -- like persistence in problem-solving!
Key Takeaways
- Logic puzzles are solved by thinking carefully, not by guessing
- River crossing puzzles teach you to think about rules and constraints
- Truth and liar puzzles teach you to think two steps ahead
- Grid logic puzzles teach you to use clues to eliminate wrong answers
- All of these use the same skills you use in coding: decomposition, pattern recognition, conditionals, and debugging
Ready for More?
Next Lesson
In Lesson 2, you will explore strategy games that make you a better thinker!
Start Lesson 2Module Progress
You have finished Lesson 1! Your logic muscles are getting stronger.
Back to Module Home