Open In App

Four People on a Rickety Bridge

Last Updated : 27 Jan, 2023
Like Article

Question: Four people need to cross a rickety bridge at night. Unfortunately, they have one torch and the bridge is too dangerous to cross without a torch. The bridge can support only two people at a time. All the people don’t take the same time to cross the bridge. Time for each person: 1 min, 2 mins, 7 mins, and 10 mins. What is the shortest time needed for all four of them to cross the bridge?

Answer = 17 mins


The initial solution most people will think of is to use the fastest person as an usher to guide everyone across. But it would take longer as 10 + 1 + 7 + 1 + 2 = 21 mins. But can it be the right answer? No. That would make this question too simple even as a warm-up question.

Let’s brainstorm a little further. To reduce the amount of time, we should find a way for 10 and 7 to go together as they are the slowest among all these. If they cross together, then we need one of them to come back to get the others. That would not be ideal. How do we get around that? Maybe we can have 1 waiting on the other side to bring the torch back. This brings us closer to the solution. So let’s put all this together.

1 and 2 cross the bridge and move to the other side.
Now 2 comes back with the torch from the other side.
7 and 10 crosses the bridge and 2 remain to this side only.
Now 1 comes back with the torch from the other side.
At last, 1 and 2 cross the bridge and we are done.

Total time taken = 2 + 2 + 10 + 1 + 2 = 17 mins


Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads