This paper tackles the \(\mathcal{N}\mathcal{P}\) -hard problem of finding paths of a prescribed length between a source and a target node in weighted directed and undirected graphs. To address this problem, we propose and analyse two algorithms: a heuristic method based on local search, and an exact backtracking algorithm that utilises several problem-specific operators to improve runtimes. We also present several general methods for reducing problem size. These involve removing nodes that can never be in any path from the source to the target, smoothing nodes that can be replaced with an arc, and removing nodes whose shortest path sum from the source and the target exceeds the prescribed length. Analysis on real-world street networks shows that the local search algorithm achieves solutions within a few metres of the prescribed length and consistently yields lower costs than the backtracking algorithm, even under a more restricted time limit. In contrast, some of our backtracking operators achieve lower-cost solutions on random and dense planar graphs.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Methods for Finding Paths of a Prescribed Length in Weighted Graphs

  • Daniel Hambly,
  • Rhyd Lewis,
  • Padraig Corcoran

摘要

This paper tackles the \(\mathcal{N}\mathcal{P}\) -hard problem of finding paths of a prescribed length between a source and a target node in weighted directed and undirected graphs. To address this problem, we propose and analyse two algorithms: a heuristic method based on local search, and an exact backtracking algorithm that utilises several problem-specific operators to improve runtimes. We also present several general methods for reducing problem size. These involve removing nodes that can never be in any path from the source to the target, smoothing nodes that can be replaced with an arc, and removing nodes whose shortest path sum from the source and the target exceeds the prescribed length. Analysis on real-world street networks shows that the local search algorithm achieves solutions within a few metres of the prescribed length and consistently yields lower costs than the backtracking algorithm, even under a more restricted time limit. In contrast, some of our backtracking operators achieve lower-cost solutions on random and dense planar graphs.