arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1903.01756cs.DS
收藏

任意权值有向图的半动态最短路树算法

Semi-dynamic shortest-path tree algorithms for directed graphs with arbitrary weights

Sanjiang Li, Yongming Li

摘要:

给定具有任意实值权重的有向图$G$,单源最短路径问题(SSSP)要求,给定$G$中的源$s$,找到从$s$到$G$中的每个顶点$v$的最短路径。经典的SSSP算法检测$G$的负循环或在$O(mn)$时间内构造以$s$为根的最短路径树(SPT),其中$m,n$分别为$G$中的边数和顶点数。在许多实际应用中,新的约束条件不时出现,我们需要频繁地更新SPT。给定$G$的SPT $T$,假设修改了某条边上的权重。通过严格的证明,我们证明了著名的正赋权图的{ \sf Ball-String}算法可以适用于求解任意权的有向图的动态SPT问题.令$n_0$为受影响的顶点的数目(即,与$s$或输入和输出SPT中的不同父节点具有不同距离的顶点)和$m_0$与受影响顶点关联的边的数量。适配算法在$O(m_0+n_0 \log n_0)$时间终止,或者检测负循环(仅在递减情况下)或者为更新的图构建新的SPT $T'$。我们通过一个例子表明,输出SPT $T'$可能有超过必要的边缘变化$T$。为了弥补这一点,我们给出了一个通用的方法将$T'$到SPT的最小边缘变化的时间$O(n_0)$提供的$G$有没有零长度的周期。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑