Dynamic Programming solver for The bridge crossing problem
Sin licencia
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.
Citar como
Gianluca Dorini (2024). Dynamic Programming solver for The bridge crossing problem (https://www.mathworks.com/matlabcentral/fileexchange/21969-dynamic-programming-solver-for-the-bridge-crossing-problem), MATLAB Central File Exchange. Recuperado .
Compatibilidad con la versión de MATLAB
Compatibilidad con las plataformas
Windows macOS LinuxCategorías
Etiquetas
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Descubra Live Editor
Cree scripts con código, salida y texto formateado en un documento ejecutable.
Versión | Publicado | Notas de la versión | |
---|---|---|---|
1.0.0.0 |