BE_Graphes/Marathon.md

34 lines
949 B
Markdown
Raw Normal View History

# Marathon open problem
We are given a graph `G` and a starting node `S` and must find a path of marathon length (42.195 km)
with an end node close to `S`.
## Constraints
Constraints for an acceptable path :
- Path is valid
- Path is accessible by foot
- Path nodes are not visited twice
- Path length is 42 195 +/- 40 meters
- Starting node is less than 200 m away from end node.
Constraints for an optimal path :
- Path is acceptable
- Path length is as close as possible to 42 195 meters
AND/OR start and end node are as close as possible
Note : the [Toulouse 2024 marathon][toulouse-2024] start and end points are roughly 200 meters apart.
The algorithm should fail if no acceptable path can be found.
[toulouse-2024]: https://toulouserunexperience.fr/marathon/
## Algo ideas
Use A* with an heuristic taking into account :
- Path Length
- and distance to end node.
Score : `42 195 + | 42 195 - pathLength | + distance end to node`.