In the paper "Computing strictly-second shortest paths" (1997), Lalgudi and Papaefthymiou consider the following problem:
Let $G$ be a directed graph with edge-weighting $w$. Let $u,v$ be vertices in $V(G)$. Let $p_1$ be a path of minimum weight from $u$ to $v$. Compute a simple path $p_2$ from $u$ to $v$ with $w(p_2) > w(p_1)$ and such that for any other path $p$ from $u$ to $v$ with $w(p) > w(p_1)$, we have $w(p) \ge w(p_2)$.
They prove that this problem is NP-hard. Their proof involves choosing a weight function that takes value $1$ on a certain edge and $0$ elsewhere, so it relies in a fundamental way on the possibility of there being edges of weight $0$.
Is anything known about whether the problem remains NP-hard when restricted to unweighted digraphs, that is directed graphs for which $w(e) = 1$ for each $e \in E(G)$?
EDIT: The variant in undirected graphs, and the variant where the goal is to find a (not-necessarily simple) walk (as opposed to a path), are known to be in P. Here's a summary:
graph type | edge weights | path or walk? | result | paper |
---|---|---|---|---|
directed | non-negative | path | NP-hard | [1997] |
either | non-negative | walk | in P | [1997] |
DAG | non-negative | path = walk | in P | [1997] |
undirected | non-negative | path | in P | [2004, 2006, 2011, 2012a,b] |
directed | strictly positive | path | open | [2011,2015] |
(Note that there is also a separate body of work on fast algorithms for finding $k\ge 2$ shortest paths, e.g. [1998], where distinct path lengths are not required.)
[1997] Lalgudi, Kumar N.; Papaefthymiou, Marios C., Computing strictly-second shortest paths, Inf. Process. Lett. 63, No. 4, 177-181 (1997). ZBL1336.68137.
[2004] Krasikov, I.; Noble, S. D., Finding next-to-shortest paths in a graph, Inf. Process. Lett. 92, No. 3, 117-119 (2004). ZBL1173.68609.
[2006] Li, Shisheng; Sun, Guangzhong; Chen, Guoliang, Improved algorithm for finding next-to-shortest paths, Inf. Process. Lett. 99, No. 5, 192-194 (2006). ZBL1185.68489.
[2011] Kao, Kuo-Hua; Chang, Jou-Ming; Wang, Yue-Li; Juan, Justie Su-Tzu, A quadratic algorithm for finding next-to-shortest paths in graphs, Algorithmica 61, No. 2, 402-418 (2011). ZBL1250.05108.
[2012a] Cong Zhang; Hiroshi Nagamochi, The next-to-shortest path in undirected graphs with nonnegative weights. In Proceedings of the Eighteenth Computing: The Australasian Theory Symposium - Volume 128 (CATS '12). Australian Computer Society, Inc., AUS, 13–20.
[2012b] B.Y. Wu, J.-L. Guo, and Y.-L. Wang, A linear time algorithm for the next-to-shortest path problem on undirected graphs with nonnegative edge lengths, 2012, arXiv:1203.5235 [cs.DS].
[2015] Wu, Bang Ye; Wang, Hung-Lung, The next-to-shortest path problem on directed graphs with positive edge weights, Networks 65, No. 3, 205-211 (2015). ZBL1386.05082, (pdf here).
[1998] Eppstein, David, Finding the k shortest paths, SIAM J. Comput. 28, No. 2, 652-673 (1998). ZBL0912.05057.