Problem 1 (River crossing with a middle island!). On one bank of a river are four missionaries and four cannibals. There is one boat available that can hold up to two people and that they would like to use to cross the river. The river contains a middle island that can be used to assist the movement of missionaries and cannibals across the river. (Here we are allowed to cross from bank-to-bank without stopping at the middle island. If this were not allowed, we could not transport two cannibals across if a missionary were on the middle island.) If the cannibals ever outnumber the missionaries on either of the river’s banks, the missionaries will get eaten. How can the boat be used to safely carry all the missionaries and cannibals across the river? m 8 ISLAND LEFT SHORE RIGHT SHORE a. Solve the riddle by drawing a diagram indicating the movement of missionaries and cannibals. Record the number of movements used. b. (Bonus) Solve the original riddle with the assumption that shore-to-shore travel is not allowed (i.e., you must stop at the middle island). Does this change the number of movements used? c. (Bonus) Solve the riddle with N = 5 missionaries and N = 5 cannibals (without and with shore-to-shore movement) d. (Bonus) Attempts at implementing a search algorithm (in a language of your choice) to construct a path from initial state to end state in the Missionaries and Cannibals (+ Middle Island) Riddle? 1

43 0

Get full Expert solution in seconds

$1.97 ONLY

Unlock Answer

EXPERT ANSWER

Solution:

a.) The solution to this problem is represented in the form of diagram as in the image attached.

Total no. of movements used were : 28 [by using middle island]

This can further reduced to 26 movements by skipping 11th and 12th movement as depicted in image.

c.) The riddle solution is present with or without using the middle island in minimum 26 movements as in image.

S.NoLeft shoreMiddle IslandRight shore
1(4,4)(0,0)(0,0)
2(3,3)(0,0)(1,1)
3(4,3)(0,0)(0,1)
4(3,2)(1,1)(0,1)
5(4,2)(0,1)(0,1)
6(2,2)(0,1)(2,1)
7(3,2)(0,1)(1,1)
8(2,1)(0,1)(2,2)
9(2,1)(2,1)(0,2)
10(3,1)(1,1)(0,2)
11(2,0)(2,2)(0,2)
12(4,0)(0,2)(0,2)
13(2,0)(0,2)(2,2)
14(3,1)(0,2)(1,1)
15(1,1)(0,2)(3,1)
16(2,1)(0,2)(2,1)
17(1,0)(0,2)(3,2)
18(2,0)(0,2)(2,2)
19(0,0)(2,2)(2,2)
20(1,1)(1,1)(2,2)
21(0,1)(2,1)(2,2)
22(0,1)(0,1)(4,2)
23(1,1)(0,1)(3,2)
24(0,0)(0,1)(4,3)
25(0,0)(1,1)(3,3)
26(0,0)(0,0)(4,4 )