- Joined
- Sep 1, 2007
- Sythe Gold
- 690
- Messages
- 6,681
My procrastination has come to a head, and I'm leaving today for a week in washington DC, so I'll miss the deadline for this project. I've not even started on this, if anyone could write a java program which answers the following question, I would love you forever. And I'm not allowed to offer money.... my skype is tonywhite2259
A farmer is on the south bank of a river with his possessions: a goat, a wolf, and a very large cabbage. The farmer wants to get to the north shore of the river with all his possessions. The river is too deep and wide to wade across. However, there is a small boat available. The boat is so small that the farmer can only take one of his possessions at a time. It is important to note two other conditions. First, if the goat and the wolf are left alone on the same side of the rover, the wolf will eat the goat. And second, if the goat and the cabbage are left alone on the same side, the goat will eat the cabbage.
Help the farmer by telling him how he should move his possessions to get them all to the north side of the river. Develop two solutions one that uses breadth first search and one that uses depth first search. To help understanding the algorithm print each decision that is considered and either rejected or executed.


