Three missionaries and three cannibals are on one side of the river, wanting to get across.
Unfortunately, the only boat available can hold a maximum of two people. The missionaries, wanting to stay safe, can never be on a side with more cannibals than missionaries (even for a moment!). The boat cannot travel under its own power, so there must be at least one person on board for it to cross.
How can the missionaries get safely across?
Let us denote the three missionaries m1, m2, and m3 and, the three cannibals are represented by c1, c2, and c3
Then, the following set of proceedures will guarantee that all the three missionaries will safely get across.
THIS SIDE ACTION OTHER SIDE
m1,m2,m3, m1 and c1 rows across ------
c1,c2, and c3
m2,m3,c2,c3 c1 rows back m1
m2,m3,c3 c1 and c2 row across m1
m2,m3,c3 c2 rows back m1,c1
m3,c3 m2 and c2 row across m1,c1
m3,c3 c2 rows back m1,m2,c1
c3 m3,c2 row across m1,m2,c1
c3 c2 rows back m1,m2,m3,c1
--- c2,c3 row across m1,m2,m3,c1
--- ------ m1,m2,m3,c1,c2,c3
Edited on February 26, 2022, 11:35 pm
Edited on February 27, 2022, 6:20 am