1
$\begingroup$

I'm trying to find an optimal solution that will work for the bridge crossing problem. In case you don't know it you can check out the Ted Ed video on it. They show how you can do it with 5 people but I'm trying to see if there is a way to do it with n number of people. The same rules apply but the optimal solution should be found regardless of how many people there are or what their individual walking speeds are.

These are the conditions of crossing the bridge:

  1. Only 1 or 2 people can cross the bridge at the same time in the same direction.

  2. The speed of the two people crossing is the same as the slower one.

  3. It is night and there is only one flashlight.

  4. The people passing the bridge must carry the flashlight.

  5. The flashlight cannot be thrown over the bridge so it must be carried back to the other end of the bridge.

$\endgroup$
  • $\begingroup$ It seems that you have two accounts, right? $\endgroup$ – Evil Sep 4 '16 at 18:03
  • $\begingroup$ What does this have to do with computer science? $\endgroup$ – Yuval Filmus Sep 4 '16 at 19:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.