[Haskell-cafe] Newbie: Project: Missionary and Cannibal in Haskell

Henk-Jan van Tuyl hjgtuyl at chello.nl
Tue Jan 16 02:55:22 EST 2007

This might not be the solution you are looking for, but a mathematical  
approach to solving this problem is explained by Edsge W. Dijkstra in a  
video at
Click on "The Power of Counting Arguments"

Met vriendelijke groet,
Henk-Jan van Tuyl


On Tue, 16 Jan 2007 05:44:07 +0100, <thapaps at gmail.com> wrote:

I am very new to haskell.
my project is to solve Missionary and Cannibal
this is what I have been given :
    1. 3 Missionary and 3 Cannibal .
    2. 1 boat.
    3. Max passengers=2.
    4. RULE:  at any given time number of cannibal cannot exceed number of
    5. I need to move all the missionary and cannibal from one bank to the

I am really confused as to how to proceed to solving this problem.

based on 2 passenger I can come of with five different boat loads.
this would lead to five different combination at each state. how would i
preserve the previous state value and pass it to the next state,

What would be the best way to tackle this problem?

any direction any help in this will be highly appreciated.

Using Opera's revolutionary e-mail client:

More information about the Haskell-Cafe mailing list