Skip to content

Solving the Missionaries and Cannibals problem using BFS and DFS

License

Notifications You must be signed in to change notification settings

ValeriaPineda23/Missionaries-and-Cannibals

Repository files navigation

Missionaries-and-Cannibals

Solving the Missionaries and Cannibals problem using BFS and DFS

In the missionaries and cannibals problem, three missionaries and three cannibals must cross a river using a boat which can carry at most two people, under the constraint that, for both banks, if there are missionaries present on the bank, they cannot be outnumbered by cannibals (if they were, the cannibals would eat the missionaries). The boat cannot cross the river by itself with no people on board.

Image