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?
The Solution
Let’s think about this. How many different ways can we add the numbers 1, 2, 5 and 10 together to get 17? There’s only one combination that works: 10, 2, 2, 2, 1. This tells us a few things.First, ten and five cross exactly once and they cross together (ten “masks” the five because ten is larger/slower). We also know that the exercise will take place in five steps. We know that two crosses three times and one crosses at least once (because it could cross with two and therefore be “masked”). I use the term masking, but it’s kinda like big-O notation in a way.
That all said, here are the two solutions.
Send over women one and two. Send back woman two. Woman two sends women three and four across the bridge together. Woman one then returns for woman two. Women one and two then cross back over together. Total time == 10 + 2 + 2 + 2 + 1 == 17 minutes.
Send over women one and two. Send back woman one. Woman one sends women three and four across the bridge together. Woman two then returns for woman one. Women one and two then cross back over together. Total time == 10 + 2 + 2 + 2 + 1 == 17 minutes.
I've got a masters degree in computer science and over 10 years of experience building web-based systems using Java/J2EE, Ruby, Rails and PHP. I'm a strong believer in the effectiveness of Agile Methods. Read more »
Bridge Crossing
The Problem
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.
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?
The Solution
Let’s think about this. How many different ways can we add the numbers 1, 2, 5 and 10 together to get 17? There’s only one combination that works: 10, 2, 2, 2, 1. This tells us a few things.First, ten and five cross exactly once and they cross together (ten “masks” the five because ten is larger/slower). We also know that the exercise will take place in five steps. We know that two crosses three times and one crosses at least once (because it could cross with two and therefore be “masked”). I use the term masking, but it’s kinda like big-O notation in a way.
That all said, here are the two solutions.
Send over women one and two. Send back woman two. Woman two sends women three and four across the bridge together. Woman one then returns for woman two. Women one and two then cross back over together. Total time == 10 + 2 + 2 + 2 + 1 == 17 minutes.
Send over women one and two. Send back woman one. Woman one sends women three and four across the bridge together. Woman two then returns for woman one. Women one and two then cross back over together. Total time == 10 + 2 + 2 + 2 + 1 == 17 minutes.