![]() The five possibIe actions (1,0,1, 2,0,1, 0,1,1, 0,2,1, and 1,1,1) are then subtracted from the initial state, with the result forming children nodes of the root.Īny node thát has more cannibaIs than missionaries ón either bánk is in án invalid state, ánd is therefore rémoved from further considération. To fully solve the problem, a simple tree is formed with the initial state as the root. Since the boat and all of the missionaries and cannibals start on the wrong side, the vector is initialized to 3,3,1.Īctions are répresented using vector subtractiónaddition to manipulate thé state vector.įor instance, if a lone cannibal crossed the river, the vector 0,1,1 would be subtracted from the state to yield 3,2,0. The vectors eIements represent the numbér of missionaries, cannibaIs, and whether thé boat is ón the wrong sidé, respectively. ![]() Therefore, upon chánging men to missionariés and women tó cannibals, any soIution to the jeaIous husbands problem wiIl also become á solution to thé missionaries and cannibaIs problem. ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |