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

thapaps at gmail.com thapaps at gmail.com
Mon Jan 15 23:44:07 EST 2007


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
missionary
   5. I need to move all the missionary and cannibal from one bank to the
other.

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20070115/6a9657e6/attachment.htm


More information about the Haskell-Cafe mailing list