Wolf cabbage and goat using dijkstra. A farmer has to cross a river with a wolf, a goat and a cabbage.
He has a boat, but in the boat he can take just one thing.
He cannot let the goat alone with the wolf or the goat with the cabbage. It’s obvious why.
What is the solution?
Ok So I know the two solutions and I arrived them with trial and error. Reaching dead ends and making smart moves. But I am interested to know the solution of this problem using Dijkstra's Algorithm. I do not know what my graph should represent and how to use the shortest path algorithm to solve this puzzle.

Dijkstra himself simplified the example problem by noting the symmetry between wolf and cabbage, see http://www.cs.utexas.edu/users/EWD/videos/EWD4.mpg.
