190 likes | 433 Views
Missionary & Cannibal. Members in group. Napatr Tansutiraphong M.2/1 No.2 (Introduction) Puriphat Rongjitprapas M.2/1 No.9 (Conclusion ) Thayat Thanomkul M.2/1 No.15 (Present) Thanakorn Liumpitak M.2/1 No.24 (Pseudo Code) Watcharin Sirinaovakul M.2/1 No.30 (Present). Start.
E N D
Members in group NapatrTansutiraphong M.2/1 No.2 (Introduction) PuriphatRongjitprapas M.2/1 No.9 (Conclusion) ThayatThanomkul M.2/1 No.15 (Present) ThanakornLiumpitak M.2/1 No.24 (Pseudo Code) WatcharinSirinaovakulM.2/1 No.30 (Present)
Start 3 Missionary & 3 Cannibal 1 missionary and 1 cannibal Chosen Wrong Correct 2 Cannibals 2 Cannibals 1 Cannibals back
Start 1 Missionary and 1 Cannibal 3 missionary and 3 cannibal Move 1 missionary to the boat. Chosen Wrong Correct Move 1 cannibal to the boat. 2 Cannibals 1 Cannibals back
Start 3 Missionary and 3 Cannibal Move 1 missionary to the boat. Chosen Wrong Correct Move 2 cannibal to the land and move 2 missionary to the boat. 2 missionary 1 Cannibal and1 missionary back
Start 3 Missionary and 3 Cannibal 1 missionary out and 1 cannibal come in Chosen Wrong Correct 1 cannibal out and 1 missionary come in 2 missionary on the boat
Start 3 Missionary and 3 Cannibal 1 missionary out and 1 cannibal come in Chosen Wrong Correct 2 missionaries out and 1 cannibal come in 1 cannibal on the boat
Start 3 Missionary and 3 Cannibal Chosen 1 cannibal comes in 2 cannibals on the boat
Start 3 Missionary and 3 Cannibal 1 cannibal out and 1 missionary in Chosen Wrong Correct 1 cannibal out 1 cannibal on the boat
Start 3 Missionary and 3 Cannibal Chosen 1 cannibal out 2 cannibals on the boat End
Pseudo Code • Choose 2 cannibals to come in the boat land 1 • 1 cannibal out of the boat land 2 • 1 cannibal comes on the boat in land 1 • 1 cannibal out of the boat land 2 • 1 cannibal out of the boat and 2 missionary come in the boat land 1 • 1 missionary out of the boat and 1 cannibal come in the boat land 2 • 1 cannibal out of the boat and 1 missionary come in the boat land 1 • 2 missionary out of the boat and 1 cannibal come in the boat land 2 • 1 cannibal comes in the boat land 1 • 1 cannibal out of the boat land 2 • 1 cannibal comes in the boat land 1 • Out of the boat all