A Polynomial-Time Algorithm for the Next-to-Shortest Path Problem on Positively Weighted Directed Graphs

πŸ“… 2025-11-06
πŸ“ˆ Citations: 0
✨ Influential: 0
πŸ“„ PDF
πŸ€– AI Summary
This paper resolves a nearly 30-year-old open problem: the polynomial-time solvability of the *strictly second-shortest path*β€”i.e., the shortest simple path strictly longer than the shortest pathβ€”in directed graphs with positive edge weights. We present the first deterministic algorithm for this problem, running in $O(mn + n^2 log n)$ time. Our method integrates an enhanced Dijkstra framework, structural analysis of path relaxation, and a constrained path enumeration strategy that avoids explicit enumeration of all paths. We prove rigorously that the strictly second-shortest path in positively weighted directed graphs is computable in polynomial time, thereby refuting prior conjectures of NP-hardness. This result closes a long-standing theoretical gap in graph algorithms and combinatorial optimization. Moreover, it establishes a new methodological paradigm and provides foundational tools for related problems, including $k$-shortest paths and robust path planning.

Technology Category

Application Category

πŸ“ Abstract
Given a graph and a pair of terminals $s$, $t$, the next-to-shortest path problem asks for an $s! o !t$ (simple) path that is shortest among all not shortest $s! o !t$ paths (if one exists). This problem was introduced in 1996, and soon after was shown to be NP-complete for directed graphs with non-negative edge weights, leaving open the case of positive edge weights. Subsequent work investigated this open question, and developed polynomial-time algorithms for the cases of undirected graphs and planar directed graphs. In this work, we resolve this nearly 30-year-old open problem by providing an algorithm for the next-to-shortest path problem on directed graphs with positive edge weights.
Problem

Research questions and friction points this paper is trying to address.

Develops polynomial-time algorithm for next-to-shortest path problem
Solves directed graphs with positive edge weights case
Addresses nearly 30-year-old open problem in graph theory
Innovation

Methods, ideas, or system contributions that make the work stand out.

Polynomial-time algorithm for directed graphs
Solves next-to-shortest path problem
Works on positively weighted directed graphs
πŸ”Ž Similar Papers
K
Kuowen Chen
IIIS, Tsinghua University
Nicole Wein
Nicole Wein
Assistant Professor, University of Michigan
theoretical computer science
Y
Yiran Zhang
IIIS, Tsinghua University