An old man is on his way home when he is about to go over a river the old man notices that the old bridge colapsed and there was no way to get across. The old man then noticed a very small boat but is dismayed because the small boat will not carry himself and his cargo which would be: a wolf a goat and a head of cabbage. The old man can only take one of the cargo at a time but if he takes the cabbage the wolf will eat the goat and if he takes the wolf the goat will eat the cabbage.
What does he do?
First he takes the goat over and then he goes back to get the cabbage but when he gets the cabbage over he must take the goat back and bring the wolf to where the cabbage is and finally go and bring the goat over and sets on his way.