page_title: Wolf, goat and cabbage problem
section_title: Solution
hierarchical_section_title: Wolf, goat and cabbage problem / Solution
caption_attribution_description: Bahasa Melayu: Sumber animasi adalah dari gambar berikut
context_page_description: The wolf, goat and cabbage problem is a river crossing puzzle. It dates back to at least the 9th century, and has entered the folklore of a number of ethnic groups.
context_section_description: The first step that must be taken is to let the goat go across the river, as any other actions will result in the goat or the cabbage being eaten. When the farmer returns to the original side, he has the choice of taking either the wolf or the cabbage across next. If he takes the wolf across, he would have to return to get the cabbage, resulting in the wolf eating the goat. If he takes the cabbage across second, he will need to return to get the wolf, resulting in the cabbage being eaten by the goat. The dilemma is solved by taking the wolf (or the cabbage) over and bringing the goat back. Now he can take the cabbage (or the wolf) over, and finally return to fetch the goat. 
  His actions in the solution are summarized in the following steps:
  Take the goat over
  Return
  Take the wolf or cabbage over
  Return with the goat
  Take the cabbage or wolf over
  Return
  Take goat over
  Thus there are seven crossings, four forward and three back.
caption: An animation of the solution
exif: {}