Dynamic Programming solver for The bridge crossing problem

The bridge crossing problem is here modelled and solved as undiscounted Dynamic Programming problem.

您现在正在关注此提交

The bridge-crossing problem is a mathematical puzzle where
a group of N persons have to cross a bridge at night. It is dark and they can only cross the bridge if they carry a lamp. Only one lamp is available and at most two persons can cross at the same time. It is not possible to cross from a side if the lamp is not on that side. The time of crossing is the time of the slowest person crossing.

In this simple exercise, the bridge crossing problem is modelled as
undiscounted Dynamic Programming problem with termination state. I know very little about this problem, and I made this script just for fun I guess other approaches exist which are more computationally efficient than this.

Anyway, this one works and can it be used to solve problems up to 10~15 persons in reasonable time.

引用格式

Gianluca Dorini (2026). Dynamic Programming solver for The bridge crossing problem (https://ww2.mathworks.cn/matlabcentral/fileexchange/21969-dynamic-programming-solver-for-the-bridge-crossing-problem), MATLAB Central File Exchange. 检索时间: .

类别

Help CenterMATLAB Answers 中查找有关 Get Started with Optimization Toolbox 的更多信息

一般信息

MATLAB 版本兼容性

  • 兼容任何版本

平台兼容性

  • Windows
  • macOS
  • Linux
版本 已发布 发行说明 Action
1.0.0.0