Back to Interview Games

Bridge Crossing

CombinatorialMedium
15 min
25 pts

Description

4 people cross bridge at night with one flashlight. Varying speeds, minimize total time.

Game Rules

Four people need to cross a bridge at night. They have one flashlight. Person A takes 1 min, B takes 2 min, C takes 5 min, D takes 10 min. Maximum 2 people can cross at once. What is the minimum time?

Examples

A and B cross (2 min), A returns (1 min)

C and D cross (10 min), B returns (2 min)

A and B cross again (2 min)

Total: 17 minutes

Hints

  • Minimize return trips

  • Fastest people should do the returning

Solution (Click to reveal)

Optimal: A+B cross (2), A returns (1), C+D cross (10), B returns (2), A+B cross (2). Total = 17 minutes.

Back