Problem :
You have a fox, a chicken and a sack
of grain. You must cross a river with only one of them at a time. If you leave
the fox with the chicken he will eat it; if you leave the chicken with the
grain he will eat it. How can you get all three across safely?
Solution :
Take the chicken over first.
Go back and bring the grain next, but instead of leaving the chicken with the
grain, come back with the chicken. Leave the chicken on the first side and take
the fox with you. Leave it on the other side with the grain. Finally, go back
over and get the chicken and bring it over.
0 comments:
Post a Comment