Presentation is loading. Please wait.

Presentation is loading. Please wait.

missionaries-and-cannibals problem

Similar presentations


Presentation on theme: "missionaries-and-cannibals problem"— Presentation transcript:

1 missionaries-and-cannibals problem
In one side of a river, 3 missionaries and 3 cannibals are staying. And there are a boat for 2 persons. They want to across the river using the boat. However, if the number of cannibals is more than the number of missionaries in any side of the river, cannibals can’t stand to eat missionaries. How to use the boat to all member across the river in safety. M C M C M C *Anyone can drive the boat. The boat can be driven at least one person. When the boat arrives at the side, all member should get off the boat.

2 How to programming Write all actions under the rule.
Convert actions to rule form. Consider about an infinite loop It is almost same process to make program. Consider carefully about the data definition. The number of attribute is larger than the number of attribute in the jug problem.


Download ppt "missionaries-and-cannibals problem"

Similar presentations


Ads by Google