COSC 1315 - Fundamentals of Programming
Allan Kochis

Programming Assignment 1


(Classic puzzle) A farmer returning home from the market must get across the river and return home with his three purchases, a dog, a chicken and a bag of rice. However, He must take them in his boat. He can't have more than one item with him on his boat at all times. He cannot leave the dog alone with the chicken because the dog will eat the chicken, and he cannot leave the chicken alone with the bag of grain because the chicken will eat the bag of grain.

Submit an IPO chart that explains how he gets all three of his purchases back home safely?