Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App
geeksforgeeks
Browser
Continue

Related Articles

Puzzle 18 | (Torch and Bridge)

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

Puzzle: There are 4 persons (A, B, C and D) who want to cross a bridge in night.

  1. A takes 1 minute to cross the bridge.
  2. B takes 2 minutes to cross the bridge.
  3. C takes 5 minutes to cross the bridge.
  4. D takes 8 minutes to cross the bridge.

There is only one torch with them and the bridge cannot be crossed without the torch. There cannot be more than two persons on the bridge at any time, and when two people cross the bridge together, they must move at the slower person’s pace. Can they all cross the bridge in 15 minutes?         Solution: They must cross the bridge in the following way:

  1. Step 1: A and B cross the bridge. A comes back. Time taken 3 minutes. Now B is on the other side.
  2. Step 2: C and D cross the bridge. B comes back. Time taken 8 + 2 = 10 minutes. Now C and D are on the other side.
  3. Step 3: A and B cross the bridge. Time taken is 2 minutes. All are on the other side.

Total time spent: 3 + 10 + 2 = 15 minutes.

To minimize the time:

The trick here is the persons with the fastest speeds only should come back (and that too only if there is a need to come back, as here we need to bring back the torch). A comes back in step-1 and B comes back in step-2. And, finally reduce the number of traveling back, like C, D does not come back.

 Please write comments if you find anything incorrect, or if you want to share more information about the topic discussed above

My Personal Notes arrow_drop_up
Last Updated : 19 Jan, 2023
Like Article
Save Article
Similar Reads