Skip to content

Python program for an arbitrary number of missionaries and cannibals.

Notifications You must be signed in to change notification settings

jviriato/missionaries-and-cannibals

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Missionários e Canibais

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. And, in some variations, one of the cannibals has only one arm and cannot row. (Wikipedia)

Python program for an arbitrary number of missionaries and cannibals.

How to run:

python3 main.py <missionaries> <cannibals> <size of boat>

About

Python program for an arbitrary number of missionaries and cannibals.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages