A farmer must transport a fox, a goose and a sack of feed across a river. The boat is so small that he can only carry one of them at a time. How can he make the crossing so that the fox does not eat the goose and the goose will not eat the feed.
Let M = the man (farmer)
Let F = the fox
Let G = the goose
Let S = the sack of feed.
LEFT SIDE OF RIVER RIGHT SIDE OR RIVER
We start with all four on the left side of the river
M,F,G,S
M takes G across. Then we have this:
F,S M,G
M comes back alone. Then we have this:
M,F,S G
M takes F across. Then we have this:
S M,F,G,
M brings G back. Then we have this:
M,G,S F
M takes S across. Then we have this:
G M,F,S
M comes back alone. Then we have this:
M,G F,S
M brings G across. Then we have this:
M,F,G,S
Edwin