The shortest time is 17 minutes.
The key to this problem is that to minimize the time spent, we need to have persons C and D to cross together. However, to avoid one of them having to make the trip back, we need to ensure that when they cross, someone is waiting for them on the other side to take the flashlight back.
So we send A and B to the other side first. (This takes 2 minutes.) Then one of them returns with the flashlight (it doesn't matter who - the result will come out the same, but let's assume A comes back - making the total elapsed time 3 minutes.) Now C and D cross together, taking 10 minutes (and bringing our total to 13). B then takes the flashlight and returns to help A get across - taking 2 minutes to go each way, and yielding the result of 17 minutes.
(You can verify that the result is the same if it is B and not A who returns with the flashlight initially.) |