A goat, a dog and a tiger are on one edge (side) of a river, and a fisherman in a small boat wants to move the three animals to the other bank. Because of its small size, the boat is only capable of carrying fishermen and at most one animal. If only goats and tigers live together on one riverbank, tigers will eat goats. Likewise, if only dogs and goats live together on one riverbank, dogs will kill goats. What is the strategy used by fishermen to have all animals moved safely and as many fishermen crossed as little as possible. What is the minimum number of fishermen to cross? (Use the Dijkstra Algorithm, with make weight graph at first)
Get Answers For Free
Most questions answered within 1 hours.