Let the five men be represented by A, B, C, D, and E. Let the five dogs be represented by a, b, c, d, and e. Let the dog that can operate the boat be dog a.
a, b, and c cross the river. a comes back alone and takes back d. a goes back and says behind while B, C, and D cross the river. Now A, a, E, and e are on the starting shore, and B, b, C, c, D, and d are on the destination shore. D and d return; A and a cross. C and c go back, and C, D, and E cross. Now dogs c, d, and e are on the starting shore, and everyone else is on the destination shore. a goes back and returns with c and d, then goes back and returns with e.
***
Since this is a little confusing, look at DJ's solution here for a better explanation of what is happening, as well as a diagram of the enumerated steps in the solution. |