Skip to main content
Log in

A Quadratic Algorithm for Finding Next-to-Shortest Paths in Graphs

  • Published:
Algorithmica Aims and scope Submit manuscript

Abstract

Given an edge-weighted undirected graph G and two prescribed vertices u and v, a next-to-shortest (u,v)-path is a shortest (u,v)-path amongst all (u,v)-paths having length strictly greater than the length of a shortest (u,v)-path. In this paper, we deal with the problem of computing a next-to-shortest (u,v)-path. We propose an \({\mathcal{O}}(n^{2})\) time algorithm for solving this problem, which significantly improves the bound of a previous one in \({\mathcal{O}}(n^{3})\) time where n is the number of vertices in G.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Barman, S.C., Mondal, S., Pal, M.: An efficient algorithm to find next-to-shortest path on trapezoid graphs. Adv. Appl. Math. Anal. 2, 97–107 (2007)

    MATH  Google Scholar 

  2. Dijkstra, E.W.: A note on two problems in connection with graphs. Numer. Math. 1, 269–271 (1959)

    Article  MathSciNet  MATH  Google Scholar 

  3. Krasiko, I., Noble, S.D.: Finding next-to-shortest paths in a graph. Inf. Process. Lett. 92, 117–119 (2004)

    Article  Google Scholar 

  4. Lalgudi, K.N., Papaefthymiou, M.C.: Computing strictly-second shortest paths. Inf. Process. Lett. 63, 177–181 (1997)

    Article  MathSciNet  Google Scholar 

  5. Li, S., Sun, G., Chen, G.: Improved algorithm for finding next-to-shortest paths. Inf. Process. Lett. 99, 192–194 (2006)

    Article  MathSciNet  MATH  Google Scholar 

  6. Mondal, S., Pal, M.: A sequential algorithm to solve next-to-shortest path problem on circular-arc graphs. J. Phys. Sci. 10, 201–217 (2006)

    Google Scholar 

  7. Tarjan, R.: Finding dominators in directed graphs. SIAM J. Comput. 3, 62–89 (1974)

    Article  MathSciNet  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Yue-Li Wang.

Additional information

This research was partially supported by National Science Council of Taiwan under the Grants NSC96-2221-E-260-014 and NSC97-2115-M-141-001-MY2.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Kao, KH., Chang, JM., Wang, YL. et al. A Quadratic Algorithm for Finding Next-to-Shortest Paths in Graphs. Algorithmica 61, 402–418 (2011). https://doi.org/10.1007/s00453-010-9402-4

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00453-010-9402-4

Keywords

Navigation