Computer Science > Data Structures and Algorithms
[Submitted on 5 Mar 2019]
Title:Semi-dynamic shortest-path tree algorithms for directed graphs with arbitrary weights
View PDFAbstract:Given a directed graph $G$ with arbitrary real-valued weights, the single source shortest-path problem (SSSP) asks for, given a source $s$ in $G$, finding a shortest path from $s$ to each vertex $v$ in $G$. A classical SSSP algorithm detects a negative cycle of $G$ or constructs a shortest-path tree (SPT) rooted at $s$ in $O(mn)$ time, where $m,n$ are the numbers of edges and vertices in $G$ respectively. In many practical applications, new constraints come from time to time and we need to update the SPT frequently. Given an SPT $T$ of $G$, suppose the weight on a certain edge is modified. We show by rigorous proof that the well-known {\sf Ball-String} algorithm for positively weighted graphs can be adapted to solve the dynamic SPT problem for directed graphs with arbitrary weights. Let $n_0$ be the number of vertices that are affected (i.e., vertices that have different distances from $s$ or different parents in the input and output SPTs) and $m_0$ the number of edges incident to an affected vertex. The adapted algorithms terminate in $O(m_0+n_0 \log n_0)$ time, either detecting a negative cycle (only in the decremental case) or constructing a new SPT $T'$ for the updated graph. We show by an example that the output SPT $T'$ may have more than necessary edge changes to $T$. To remedy this, we give a general method for transforming $T'$ into an SPT with minimal edge changes in time $O(n_0)$ provided that $G$ has no cycles with zero length.
References & Citations
Bibliographic and Citation Tools
Bibliographic Explorer (What is the Explorer?)
Connected Papers (What is Connected Papers?)
Litmaps (What is Litmaps?)
scite Smart Citations (What are Smart Citations?)
Code, Data and Media Associated with this Article
alphaXiv (What is alphaXiv?)
CatalyzeX Code Finder for Papers (What is CatalyzeX?)
DagsHub (What is DagsHub?)
Gotit.pub (What is GotitPub?)
Hugging Face (What is Huggingface?)
Papers with Code (What is Papers with Code?)
ScienceCast (What is ScienceCast?)
Demos
Recommenders and Search Tools
Influence Flower (What are Influence Flowers?)
CORE Recommender (What is CORE?)
arXivLabs: experimental projects with community collaborators
arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.
Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.
Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs.