From: KAR Subject: Depth-first search/Missionary & Cannibal problem Date: Message-ID: <97fevu$bhq$2@bob.news.rcn.net>
Hi, I'm having trouble implementing a depth-first solution to the Missionaries and Cannibals problem. I need help writing the function that will calculate the neighbors of a given node/state, i.e. if initial state = (3 3 1), then Neighbors (3 3 1) --> ((2 2 0) (3 1 0)). Any suggestions would be greatly appreciated. KAR