Wednesday, September 3, 2008

Four women cross bridge

Q: There are 4 women who want to cross a bridge. They all begin on the same side. You have 17 minutes to get all of them across to the other side. It is night. There is one flashlight. A maximum of two people can cross at one time. Any party who crosses, either 1 or 2 people, must have the flashlight with them. The flashlight must be walked back and forth, it cannot be thrown, etc. Each woman walks at a different speed. A pair must walk together at the rate of the slower woman's pace.
Woman 1: 1 minute to cross
Woman 2: 2 minutes to cross
Woman 3: 5 minutes to cross
Woman 4: 10 minutes to cross
For example if Woman 1 and Woman 4 walk across first, 10 minutes have elapsed when they get to the other side of the bridge. If Woman 4 then returns with the flashlight, a total of 20 minutes have passed and you have failed the mission. What is the order required to get all women across in 17 minutes? Now, what's the other way?

A: The key of this question is that two people are allowed to cross the bridge in opposite direction, as long as one of them have the flashlight.
So, lets say four women are on side A initially, and they want to go to the side B of the bridge.
1. 1, 4 and flashlight: A->B, 10min
2. 1 and flashlight: B->A, 3: A->B, 5min
3. 1, 2 and flashlight: A->B, 2 min

Alternatively, switch the roles of 1 and 2, or switch 3 and 4.

No comments: