A farmer with his wolf, duck and bag of corn come to the east side of a river they wish to cross. There is a boat at the river’s edge, but of course only the farmer can row. The boat can only hold two things (including the rower) at any one time. If the wolf is ever left alone with the duck, the wolf will eat it. Similarly if the duck is ever left alone with the corn, the duck will eat it. How can the farmer get across the river so that all four arrive safely on the other side? Solve this problem using Depth First Search to find the shortest solution. Write Code in C++/Java.Its my assignment im unable to do it although have made the state space
happygeek 2,411 Most Valuable Poster Team Colleague Featured Poster
Builder_1 -6 Junior Poster in Training
AssertNull 1,094 Practically a Posting Shark
AssertNull 1,094 Practically a Posting Shark
Gribouillis 1,391 Programming Explorer Team Colleague
AssertNull 1,094 Practically a Posting Shark
Builder_1 -6 Junior Poster in Training
Gribouillis 1,391 Programming Explorer Team Colleague
AssertNull 1,094 Practically a Posting Shark
Gribouillis 1,391 Programming Explorer Team Colleague
Gribouillis 1,391 Programming Explorer Team Colleague
AssertNull 1,094 Practically a Posting Shark
Gribouillis 1,391 Programming Explorer Team Colleague
AssertNull 1,094 Practically a Posting Shark
Builder_1 commented: Thanks alot +2
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.