River Crossing

A man has to get a fox, a chicken, and a sack of corn across a river. He
has a rowboat, and it can only carry him and one other thing. If the fox
and the chicken are left together, the fox will eat the chicken. If the
chicken and the corn is left together, the chicken will eat the corn.
How does the man do it?




Boat(Man, Chicken) ---------->
<---------- Chicken

//Leave the fox and carry back the chicken

Boat(Man, Fox) ----------->
(man, chiken)<------------ Fox

// Leave the chicken, and take the corn
(Man, Corn) --------------->
<--------------- Fox, Corn

// Now Take the chicken to the other side.
(Man, Chicken) ------------>



No comments: