VOOZH about

URL: https://www.geeksforgeeks.org/aptitude/puzzle-farmer-goat-wolf-cabbage/

⇱ Puzzle | Farmer, Goat, Wolf and Cabbage - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Puzzle | Farmer, Goat, Wolf and Cabbage

Last Updated : 10 Apr, 2026

A man bought a wolf, a goat, and a cabbage from the market. On his way home, he came to a river that he had to cross using a small boat. The boat could carry only the man and one of the three items at a time.

There was one difficulty:

  • If the wolf and goat were left alone together, the wolf would eat the goat.
  • If the goat and cabbage were left alone together, the goat would eat the cabbage.

How could the man carry all three safely across the river?

👁 boat

Check if you were right - full answer with solution below.  

Solution:

  • The farmer begins by taking the goat across the river.
    → He leaves the goat on the opposite side and returns alone, ensuring no conflict occurs.
  • Next, the farmer takes the wolf across the river.
    → Since the wolf cannot be left alone with the goat, he leaves the wolf on the far side and brings the goat back with him.
  • Then, the farmer takes the cabbage across the river.
    → He safely leaves the cabbage with the wolf (as they do not harm each other) and returns alone.
  • Finally, the farmer takes the goat across the river once again, completing the transfer.
Comment
Article Tags: