skip to main content
research-article

A near-linear-time algorithm for computing replacement paths in planar directed graphs

Published: 03 September 2010 Publication History

Abstract

Let (G = (V(G),E(G))) be a directed graph with nonnegative edge lengths and let P be a shortest path from s to t in G. In the replacement paths problem we are required to compute for every edge e in P, the length of a shortest path from s to t that avoids e. The fastest known algorithm for solving the problem in weighted directed graphs is the trivial one: each edge in P is removed from the graph in its turn and the distance from s to t in the modified graph is computed. The running time of this algorithm is O(m n + n2 log n), where n = |V(G)| and m = |E(G)|.
The replacement paths problem is strongly motivated by two different applications. First, the fastest algorithm to compute the k simple shortest paths from s to t in directed graphs [Yen 1971; Lawler 1972] repeatedly computes the replacement paths from s to t. Its running time is O(kn (m + n log n)). Second, the computation of Vickrey pricing of edges in distributed networks can be reduced to the replacement paths problem. An open question raised by Nisan and Ronen [2001] asks whether it is possible to compute the Vickrey pricing faster than the trivial algorithm described in the previous paragraph.
In this article we present a near-linear time algorithm for computing replacement paths in weighted planar directed graphs. In particular, the algorithm computes the lengths of the replacement paths in O (n log3 n) time (recall that in planar graphs m = O (n)). This result immediately improves the running time of the two applications mentioned before by almost a linear factor. Our algorithm is obtained by combining several new ideas with a data structure of Klein [2005] that supports multisource shortest paths queries in planar directed graphs in logarithmic time.
Our algorithm can be adapted to address the variant of the problem in which one is interested in the replacement path itself (rather than the length of the path). In that case the algorithm is executed in a preprocessing stage constructing a data structure that supports replacement path queries in time Õ (h), where h is the number of hops in the replacement path. In addition, we can handle the variant in which vertices should be avoided instead of edges.

References

[1]
Aggarwal, A., Klawe, M., Moran, S., Shor, P., and Wilber, R. 1986. Geometric applications of a matrix searching algorithm. In Proceedings of the ACM Symposium on Computational geometry (SCG). 285--292.
[2]
Bernstein, A. and Karger, D. 2008. Improved distance sensitivity oracles via random sampling. In Proceedings of the ACM-SIAM Symposium on Discrete Algorithms (SODA). 34--43.
[3]
Cormen, T., Leiserson, C., and Rivest, R. 2009. Introduction to Algorithms, 3rd Ed. The MIT Press.
[4]
de Fraysseix, H., Pach, J., and Pollack, R. 1988. Small sets supporting fary embeddings of planar graphs. In Proceedings of the ACM Symposium on Theory of Computing (STOC). 426--433.
[5]
Demetrescu, C., Thorup, M., Chaudhury, R. A., and Ramachandran, V. Oracles for distances avoiding a link-failure. http://scitation.aip.org/getabs/servlet/GetabsServlet?prog-normalGrid=SMJ@AT00003700000500129000001@idtype=cvips@gifs=yes
[6]
Dijkstra, E. 1959. A note on two problems in connexion with graphs. Numerische Mathematik 1, 269--271.
[7]
Eppstein, D. 1998. Finding the K shortest paths. SIAM J. Comput. 28, 2, 652--673.
[8]
Fakcharoenphol, J. and Rao, S. 2001. Planar graphs, negative weight edges, shortest paths, near linear time. In Proceedings of the IEEE Symposium on Foundations of Computer Science (FOCS). 232--241.
[9]
Fáry, I. 1948. On straight-line representation of planar graphs. Acta Sci. Math. (Szeged) 11, 229--233.
[10]
Hershberger, J. and Suri, S. 2001. Vickrey prices and shortest paths: what is an edge worth. In Proceedings of the IEEE Symposium on Foundations of Computer Science (42nd) (FOCS). 252--259.
[11]
Hershberger, J., Suri, S., and Bhosle, A. 2003. On the difficulty of some shortest path problems. In Proceedings of the 20th Annual Symposium on Theoretical Aspects of Computer Science (STACS). 343--354.
[12]
Karger, D., Koller, D., and Phillips, S. 1993. Finding the hidden path: time bounds for all-pairs shortest paths. SIAM J. Comput. 22, 1199--1217.
[13]
Katoh, N., Ibaraki, T., and Mine, H. 1982. An efficient algorithm for K shortest simple paths. Netw. 12, 4, 411--427.
[14]
Klein, P. 2005. Multiple-Source shortest paths in planar graphs. In Proceedings of the ACM-SIAM Symposium on Discrete Algorithms (SODA). 146--155.
[15]
Klein, P., Mozes, S., and Weimann, O. 2009. Shortest paths in directed planar graphs with negative lengths: A linear-space o(n log2 n)-time algorithm. In Proceedings of the ACM-SIAM Symposium on Discrete Algorithms (SODA). 236--245.
[16]
Lawler, E. 1971/72. A procedure for computing the K best solutions to discrete optimization problems and its application to the shortest path problem. Manag. Sci. 18, 401--405.
[17]
Malik, K., Mittal, A., and Gupta, S. 1989. The k most vital arcs in the shortest path problem. Oper. Res. Lett. 8, 4, 223--227.
[18]
Nardelli, E., Proietti, G., and Widmayer, P. 2001. A faster computation of the most vital edge of a shortest path. Inf. Process. Lett. 79, 2, 81--85.
[19]
Nisan, N. and Ronen, A. 2001. Algorithmic mechanism design. Games Econom. Behav. 35, 166--196.
[20]
Roditty, L. 2007. On the k-simple shortest paths in weighted directed graphs. In Proceedings of the ACM-SIAM Symposium on Discrete Algorithms (SODA).
[21]
Roditty, L. and Zwick, U. 2005. Replacement paths and k simple shortest paths in unweighted directed graphs. In Proceedings of the 32nd International Colloquium on Automata, Languages and Programming (ICALP). 249--260.
[22]
Thorup, M. 1999. Undirected single-source shortest paths with positive integer weights in linear time. J. ACM 46, 362--394.
[23]
Thorup, M. 2004. Compact oracles for reachability and approximate distances in planar digraphs. J. ACM 51, 6, 993--1024.
[24]
Yen, J. 1970/71. Finding the k shortest loopless paths in a network. Manag. Sci. 17, 712--716.

Cited By

View all
  • (2022)Exact Distance Oracles for Planar Graphs with Failing VerticesACM Transactions on Algorithms10.1145/351154118:2(1-23)Online publication date: 30-Mar-2022
  • (2022)Algorithms and Lower Bounds for Replacement Paths under Multiple Edge Failure2022 IEEE 63rd Annual Symposium on Foundations of Computer Science (FOCS)10.1109/FOCS54457.2022.00090(907-918)Online publication date: Oct-2022
  • (2022)Fault-tolerant distance labeling for planar graphsTheoretical Computer Science10.1016/j.tcs.2022.03.020918:C(48-59)Online publication date: 29-May-2022
  • Show More Cited By

Index Terms

  1. A near-linear-time algorithm for computing replacement paths in planar directed graphs

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Transactions on Algorithms
    ACM Transactions on Algorithms  Volume 6, Issue 4
    August 2010
    308 pages
    ISSN:1549-6325
    EISSN:1549-6333
    DOI:10.1145/1824777
    Issue’s Table of Contents
    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 03 September 2010
    Accepted: 01 July 2009
    Received: 01 February 2009
    Published in TALG Volume 6, Issue 4

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. Planar graphs
    2. replacement paths

    Qualifiers

    • Research-article
    • Research
    • Refereed

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)6
    • Downloads (Last 6 weeks)2
    Reflects downloads up to 20 Jan 2025

    Other Metrics

    Citations

    Cited By

    View all
    • (2022)Exact Distance Oracles for Planar Graphs with Failing VerticesACM Transactions on Algorithms10.1145/351154118:2(1-23)Online publication date: 30-Mar-2022
    • (2022)Algorithms and Lower Bounds for Replacement Paths under Multiple Edge Failure2022 IEEE 63rd Annual Symposium on Foundations of Computer Science (FOCS)10.1109/FOCS54457.2022.00090(907-918)Online publication date: Oct-2022
    • (2022)Fault-tolerant distance labeling for planar graphsTheoretical Computer Science10.1016/j.tcs.2022.03.020918:C(48-59)Online publication date: 29-May-2022
    • (2021)Fault-Tolerant Distance Labeling for Planar GraphsStructural Information and Communication Complexity10.1007/978-3-030-79527-6_18(315-333)Online publication date: 20-Jun-2021
    • (2019)Exact distance oracles for planar graphs with failing verticesProceedings of the Thirtieth Annual ACM-SIAM Symposium on Discrete Algorithms10.5555/3310435.3310562(2110-2123)Online publication date: 6-Jan-2019
    • (2015)Optimal shortest path set problem in undirected graphsJournal of Combinatorial Optimization10.1007/s10878-014-9766-529:3(511-530)Online publication date: 1-Apr-2015
    • (2014)Replacement Paths via Row Minima of Concise MatricesSIAM Journal on Discrete Mathematics10.1137/12089714628:1(206-225)Online publication date: Jan-2014
    • (2013)The Online Replacement Path ProblemAlgorithms – ESA 201310.1007/978-3-642-40450-4_1(1-12)Online publication date: 2013
    • (2013)The Optimal Rescue Path Set Problem in Undirected GraphsFrontiers in Algorithmics and Algorithmic Aspects in Information and Management10.1007/978-3-642-38756-2_14(118-129)Online publication date: 2013
    • (2012)Improved Distance Sensitivity Oracles via Fast Single-Source Replacement PathsProceedings of the 2012 IEEE 53rd Annual Symposium on Foundations of Computer Science10.1109/FOCS.2012.17(748-757)Online publication date: 20-Oct-2012

    View Options

    Login options

    Full Access

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media