This poem is taken from PN Review 58, Volume 14 Number 2, November - December 1987.

The Cannibals and Missionaries Problem

Peter Sansom

This is a variant of the more familiar problem.
In this - your - version, the five cannibals
and five missionaries initially on the left bank of the
  river
are your friends, the ones that do not like each other
and, really, don't like you much either.

The rowing boat, hired out by the hour from the park
(and on which you must pay a deposit), can hold
up to four persons at a time: your job is to find
a sequence of crossings that will leave these 'friends'
  together
EITHER (a) on the right hand bank in the sun

OR (b) thirty feet down upon the river bed.
  Remember,
no missionaries may be left with a larger
number of cannibals on the bank or in the boat for
...
Searching, please wait...