You have a 3 cup container, a 5 cup container, and an 8 cup container. The 8-cup container is exactly full with sugar, but the other two are empty. You want to split it evenly with a friend so you can both make the same recipe, which calls for 4 cups of sugar. Neither of you has any more sugar. How can you make it so that two of the containers have exactly 4 cups of sugar?
Fill up the 5 container and dump it all in the 3 to get 3 in the 3, 2 in the 5 and 3 in the 8. Dump all the 3 in the 8 and dump the two from the five in the 3 to get 2 in the 3, none in the 5, and 6 outside. Fill up the 5 and dump one in the 3. You get 3 in the three and 4 in the 5. Put the three with the remaining one in the 8 jar and yu have two separate piles of four!
Pour 3 out of 8 into 3
8 contains 5 3 contains 3 5 contains 0
Pour 3 into 5
8 contains 5 3 contains 0 5 contains 3
Pour 3 out of 8 into 3
8 contains 2 3 contains 3 5 contains 3
Pour 1 out of 8 into 5
8 contains 1 3 contains 3 5 contains 4
Pour 3 out of 3 into 8
8 contains 4 3 contains 0 5 contains 4