Wolf, Goat, Cabbage

Logic puzzles help develop reasoning skills useful for programming, computer science, and anything you might do.

They also have another advantage: they’re free. Many logic puzzles also date back thousands of years. Here is a classic river crossing puzzle.

The Puzzle

You stand on the bank of a river with a wolf, a goat, and cabbage. You can carry only one across the river at a time. The wolf will eat the goat if left alone. And the goat will eat your cabbage if left alone. How do you get the wolf, goat, and cabbage across the river?

The Solution

This ancient puzzle appears in many cultures and dates from at least a thousand years ago. Most people assume you will cross the river with one item — the wolf or goat or cabbage — then return empty handed to get the second then third item. If you do this, however, at some point the goat will eat the cabbage or the wolf will eat the goat.

It’s also important to note the wolf will not eat the cabbage. Therefore, the goat must be carried across first. Don’t believe me? Pull out a piece of paper and write down what happens if you take across the wolf, goat, and cabbage in different orders.

The solution is to return with one item, in this order:

  1. Cross the river with the goat.
  2. Return empty handed to the wolf and cabbage.
  3. Cross the river with the cabbage.
  4. Bring the goat back with you to get the wolf. Leave the goat on shore.
  5. Cross the river with the wolf and leave it with the cabbage.
  6. Return empty handed to the goat.
  7. Cross the river again with the goat.

This version of the puzzle is from Alcuin who published a small book of puzzles around 800 AD. Other variations include a fox, a goose, and a bag of beans, as well as other combinations.

Below are links to other sites with logic puzzles you can try to solve. If you try to find more of these online, turns out these puzzles are hard to find. They’re called logic puzzles, deductive reasoning puzzles, brain busters, and several other terms.

Learn More

Logic Problems for Kids


The Case of the Stolen Birthday Cake

Wonderful elaborate logic puzzle with handouts.

Alcuin’s Puzzles


A Guide to Puzzle-Based Learning in STEM Subjects

Pages 20 onward have a number of logic puzzles with solutions.

Recreational Mathematics

This book excerpt has a neat history of math puzzles.


  • Tim Slavin

    Tim is an award-winning writer and technologist who enjoys teaching tech to non-technical people. He has many years experience with web sites and applications in business, technical, and creative roles. He and his wife have two kids, now teenagers, who are mad about video games.

Also In The October 2018 Issue

Logic puzzles help develop reasoning skills useful for programming, computer science, and anything you might do.

Find perfect and fun gifts for your loved ones that teach STEAM concepts and skills.

From light-up bow-ties to conductive thread, you’ll be the life of the party with this STEAM-inspired gear.

A free online test service reveals how much personal data your web browser is giving away.

Add more tools to your command line arsenal, including running mini-scripts and making backup copies.

Use switches to take your robotic creations to the next level.

An old classic with a electronic twist, featuring JavaScript and micro:bit.

Create the American flag in SketchUp using this detailed tutorial.

From lasers to supernovas, Berboucha is making science communication a priority.

Code can always be improved. Check out these tips to make you the best programmer you can be!

It’s a programming language unlike any you’ve seen before. Check out this symbolic system designed for mathematical calculations.

New, improved, faster, and sleeker - it’s Scratch 3, your new favourite block language!

Learn about the brilliant algorithm behind all of your GPS devices.

It’s free, comprehensive, and available on-the-go. This cool app helps you master Python faster than ever before.

Open up whole new worlds to explore through these interesting, diverse add-ons.

Links from the bottom of all the October 2018 articles, collected in one place for you to print, share, or bookmark.

Interesting stories about computer science, software programming, and technology for October 2018.

Interested but not ready to subscribe? Sign-up for our free monthly email newsletter with curated site content and a new issue email announcement that we send every two months.

No, thanks!