River Crossing Problem - You have a fox, a chicken and a sack of grain.

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?



Sounds tricky , right ?? lets break the solution into steps to understand the solution.I am assuming A as the initial point and B as the destination across the river for explanation

1. Take the chicken  first and drop him across the river at B.
2. Go back to A and bring the grain next, but instead of leaving the chicken with the grain, come back to A with the chicken .
3. Leave the chicken on A and take the fox with you to B. 
4.Leave the fox  on B with the grain. 
5.Finally, go back over to A and get the chicken and bring it over to B.

Now you know the Trick to solve this question , there are many other variants of river crossing problem but all are solved with this approach only ,if I get time I will post those problems also

 why not share this post with your friends . :)






Comments