missionaries-and-cannibals-in-prolog-
On one bank of a river are 3 missionaries and 3 cannibals. There is one boat available that can hold up to two people and that they would like to use to cross the river. If the cannibals ever outnumber the missionaries on either of the riverβs banks, the missionaries will get eaten.How can the boat be used to safely carry all the missionaries and cannibals across the river?