Four people need to cross a rickety rope bridge to get back to their camp at night. Unfortunately, they only have one flashlight and it only has enough light left for 17 minutes. The bridge is too dangerous to cross without a flashlight, and it’s only strong enough to support two people at any given time.
Each of the campers walks at a different speed. One can cross the bridge in 1 minute, another in 2 minutes, the third in 5 minutes, and the slowest camper takes 10 minutes to cross. How can the campers make it across in exactly 17 minutes?
Trip Elapsed Time
1 5 10 ------------- 2 1 --------------------> 2
2 5 10 <------------1 ---------------------- 2 1
3 10 ---------------5 1 ------------------- >2 5
4 10 <------------- 1 ---------------------- 5 2 1
5 ------------- 10 1 ---------------------> 10
Total Elapsed time: 19 minutes
We were only able to get all of the campers over the bridge in 19 minutes. But, the question clearly asks us how to do it in 17 minutes. How can we improve? Well, let’s ask ourselves this question: what assumptions did we make that we can improve on? We did assume that having the 1 minute camper come back every time is the best way to do this. That sounds like there may be some room for improving that assumption, and, in fact, there is: it seems like having 10 and 1 cross the bridge at the same time is a waste, because anyone who crosses the bridge with 10 will have to take 10 minutes since 10 will slow them down. Why not have instead have 10 go with the second slowest camper, 5, and then have 2 come back? So, it would look like this:
Trip Elapsed Time
1 5 10 ------------- 2 1 ---------------------> 2
2 5 10 <------------ 1 ----------------------- 2 1
3 1 -----------------5 10 ------------------- >2 10
4 1 <--------------- 2 ------------------------ 5 10 2
5 --------------- 2 1 --------------------->5 10 2
Total Elapsed time: 17 minutes
And, voila! We have our answer as shown above!
No comments:
Post a Comment