Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

A wel-known class of puzzle games called river crossing puzzles usually involve

ID: 3604903 • Letter: A

Question

A wel-known class of puzzle games called river crossing puzzles usually involve transporting a set of objects from a starting position to a desired position using a boat. A popular variation is stated below 3 cannibals and 3 anthropologists want to cross a river. The boat they have is only big enough for two people. If at any point in time, there are more cannibals than anthropologists on one side of the river, the cannibals will eat them. The boat cannot cross the river by itself. Someone has to row it. Use CLINGO to come up with a way for the anthropologists to cross the river with the cannibals and survive.

Explanation / Answer

Solution to River Crossing Puzzle:

To simply let us denote the entities involved as follows:

Let,

Anthropologist be A

Cannibal be C

The boat be B

Let us consider that everyone is on the west coast and let us denote it by W

The East coast is the portion where everybody has to go and let us denote it by E

Step 1:

Let A and C cross with B therefore we've got the subsequent on every coast

W [A, A, C, C]

E [A, C, B]

Step 2:

A returns

W [A, A, A, C, C, B]

E [C]

Step 3:

Two C cross with B

W [A, A, A]

E [C, C, C, B]

Step 4: C returns

W [A, A, A, C, B]

E [C, C]

Step 5:

Two A cross with B

W [A, C]

E [A, A, C, C, B]

Step 6 :

A and C return

W [A, A, C, C, B]

E [A, C]

Step 7:

Two A crosses

W [C, C]

E [A, A, A, C, B]

Step 8:

C returns

W [C, C, C, B]

E [A, A, A]

Step 9:

Two C crosses

W [C]

E [A, A, A, C, C, B]

Step 10:

C returns

W [C, C, B]

E [A, A, A, C]

Step 11:

Two C crosses

W [Empty]

E [A, A, A, C, C, C, B]

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote