The rowing boat problem — can you solve this puzzle?
- Frobo

- Oct 29
- 3 min read
Updated: Oct 30
Have you ever played a video game where you had to figure out the right order to do things? Or followed a recipe to bake cookies? That's kind of like what computers do all day long! Here's an example that can help explain what that means:
The Challenge
Imagine you're a farmer standing by a river. You need to get three things across to the other side:
A wolf 🐺
A goat 🐐
A cabbage 🥬

Sounds easy, right? But here's the tricky part: your boat is tiny! You can only take one thing with you each trip.
Oh no! There's more trouble:
If you leave the wolf alone with the goat, the wolf will eat the goat!
If you leave the goat alone with the cabbage, the goat will munch it up!
How do you get everyone across safely?
How to think
When you solve a puzzle like this, you're thinking just like a computer programmer! You're creating what's called an algorithm — a fancy word that just means "a list of steps that solves a problem."
Computers use algorithms for everything:
Finding the fastest way to school on a map
Deciding which YouTube video to show you next
Helping robots avoid bumping into walls
Even sorting your apps on your phone!
🧩 Let's solve it step by step
Here's one way to solve the puzzle. Watch carefully what happens on each side of the river:
Step | Left Side (Start) | Boat Trip | Right Side | Safe or Not? |
1 | Farmer, Wolf, Goat, Cabbage | Farmer takes Goat | Goat | ✅ Safe |
2 | Farmer, Wolf, Cabbage | Farmer goes back alone | Goat | ✅ Safe |
3 | Farmer, Wolf, Cabbage | Farmer takes Wolf | Wolf, Goat | ⚠ Goat eaten if left — not safe unless goat moves next |
Uh oh! Step 3 doesn't work. Time to try something else!
| 3 (Try Again) | Wolf | Farmer + Cabbage → | Cabbage, Goat | ❌ OOPS! Goat will eat cabbage! |
Hmm, that doesn't work either. What if we bring the goat back?
| 3 (Better!) | Wolf | Farmer + Cabbage → | Cabbage, Goat | Start of trip: ❌ |
| 4 | Wolf | ← Farmer + Goat | Cabbage | ✅ Cabbage is alone and safe! |
4 | Farmer, Goat | Farmer takes Goat back | Wolf, Cabbage | ✅ Safe |
5 | Farmer, Goat, Cabbage | Farmer takes Cabbage | Wolf, Cabbage | ✅ Safe |
6 | Farmer, Goat | Farmer goes back alone | Wolf, Cabbage | ✅ Safe |
7 | Farmer, Goat | Farmer takes Goat | Wolf, Cabbage, Goat | ✅ Safe 🎉 |
| 5 | Goat | Farmer + Wolf → | Wolf, Cabbage | ✅ They won't fight! |
| 6 | Goat | ← Farmer alone | Wolf, Cabbage | ✅ Almost done! |
| 7 | (empty) | Farmer + Goat → | Wolf, Cabbage, Goat | ✅ SUCCESS! 🎉 |
We did it! Everyone made it across safely!
Why this matters
This puzzle teaches us something important: solving problems is like playing a game where you try different moves until you find what works.
When you:
Get stuck on a level in Minecraft and try different strategies
Figure out a hard math problem by testing different solutions
Learn a new dance move by practicing the steps
...you're using algorithmic thinking!
Computers do the exact same thing, just really fast. They try options, follow rules, and find solutions — sometimes millions of times per second!
Your turn!
Now that you know how algorithms work, see if you can spot them everywhere:
What steps do you follow to tie your shoes?
How does a traffic light know when to change colors?
Both of these are algorithms! Once you start looking, you'll see them everywhere.
Can you think of a different way to solve the farmer's problem? Try drawing it out with pictures!
Keep exploring!
//Frobo



Comments