Table of contents | |
Introduction | |
The Initial Solution | |
Brainstorming | |
The Best Solution | |
Conclusion |
Imagine four people who need to cross a bridge at night. This bridge is too dangerous to cross without a torch, and there is only one torch available. Also, the bridge can only support two people at a time. Each person takes a different amount of time to cross the bridge. In this article, we will discuss the shortest time needed for all four people to cross the bridge safely.
At first, most people would suggest using the fastest person as a guide to lead everyone across the bridge. However, this solution will take 10 + 1 + 7 + 1 + 2 = 21 minutes, which is not the shortest time possible.
To reduce the time, we need to find a way for the slowest people, 10 and 7, to cross the bridge together. However, if they cross together, we will need one of them to come back and get the others, which is not ideal. So, we need to think creatively.
We can have person 1 waiting on the other side of the bridge to bring the torch back. So, the steps for crossing the bridge are:
1. Person 1 and 2 cross the bridge together and move to the other side.
2. Person 2 comes back with the torch to the starting point.
3. Person 7 and 10 cross the bridge together and move to the other side.
4. Person 2 stays on the other side, and person 1 comes back with the torch.
5. Person 1 and 2 cross the bridge together and move to the other side.
The total time taken for all four people to cross the bridge is:
2 + 2 + 10 + 1 + 2 = 17 minutes.
In conclusion, crossing the dangerous bridge with limited resources requires creative thinking. By using person 1 as a torchbearer, we can reduce the total time to cross the bridge to 17 minutes, which is the shortest time possible.
|
Explore Courses for Interview Preparation exam
|