A man (?) needs to transport a carrot (?), a rabbit (?), and a fox (?) across a river. However, due to the overly restrictive rules of the boat operator, he can only carry one item at a time in the boat. He can, however, cross the river repeatedly as many times as he’d like. If the man leaves the rabbit and the carrot alone, then the rabbit will eat the carrot. If the man leaves the rabbit and the fox alone, then the fox will eat the rabbit. We can describe any state by listing what is on each shore. For example, we can use the pair (??, ??) for the state where the man and the rabbit are on the first shore, and the fox and the carrot are on the other shore. We can use the empty set symbol, ∅, when nothing is on a shore. The initial position is (????, ∅).
a) Find all allowable states where nothing gets eaten.
b) Construct a graph such that each vertex represents an allowable state and the vertices represented by two allowable states are connected by an edge if it is possible to move from one state to the other using one trip of the boat.
c) Find two different solutions of the puzzle.
Hi
The answer of the following question is given below as follows :
Ans.1) Lets assume the river sides are: X and Y
X has Man, Rabbit, Fox, Cabbage --> X(M,R,F,C)
Y has none Y()
Boat being B()
Following are the steps:
X(M,R,F,C) --> B() --> Y() _______ Initial
X(F,C) --> B(M,R) --> Y()
X(F,C) <-- B(M) <-- Y(R)
X(F) --> B(M,C) --> Y(R)
X(F) <-- B(M,R) <-- Y(C)
X(R) --> B(M,F) --> Y(C)
X(R) <-- B(M) <-- Y(F,C)
X() --> B(M,R) --> Y(F,C)
X() --> B() -->Y(M.R.F,C).
Ans.C) In Trip 1: Leave the rabbit on the original side of the river and pic up the cabbage n take it across n drop it with the fox. Come back empty.
In Trip 2: Take the rabbit across.
Trip 3 :Take the rabbit across, drop it on the other side n come back.
I hope I have served the purpose well.
Thanks.
Get Answers For Free
Most questions answered within 1 hours.