The Bridge Crossing Problem

There is a group of people who want to cross a bridge. The bridge is very narrow so only two people can cross the bridge a time. Two people on the bridge at the same time will travel at the speed of the slower person. There is only one flashlight and no one can cross the bridge without the flashlight, so somebody has to bring the light back for others to cross.

Your job is to determine who should cross first, who should bring the light back, and continue this process until the entire party has crossed the bridge.

The time it takes a person to cross the bridge is given by their time in a square to the left of the bridge. To make people cross, first click the person's time. Their square will become red indicating they are a part of the crossing party. When you have determined who you would like to cross the bridge, press the cross button. When the cross button is pressed, the parties will cross the bridge and the sum at that point will be calculated, and you will be able to select a person from the opposite side of the bridge to bring the light back, unless all parties have crossed the bridge, in which case you will have completed the problem.