A man finds himself on a riverbank with a wolf, a goat, and a head of
cabbage. He needs to transport all three to the other side of the river in
his boat. However, the boat has room for only the man himself and one
other item (either the wolf, the goat, or the cabbage). In his absence, the
wolf would eat the goat, and the goat would eat the cabbage. Show how
the man can get all these “passengers” to the other side.
Answer:
Let M, w, g, and c stand for the man (with the boat, which is always on the same bank of the river as the man), wolf, goat, and cabbage head, respectively. The following figure depicts two sequences of trips that solve the problem.
No comments:
Post a Comment