arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2108.03455cs.DS
收藏

有向无环图中所有对最短路的输出敏感算法

An output-sensitive algorithm for all-pairs shortest paths in directed acyclic graphs

Andrzej Lingas, Mia Persson, Dzmitry Sledneu

摘要:

针对边加权有向无环图(DAG)中的单源最短路径问题(SSSP),提出了一种简单的动态规划方法。首先,我们类似地将该方法交替地以宽度优先搜索排序顺序和相反顺序在具有正实边权重和负实边权重、$n$顶点和$m$边的输入有向图上进行搜索。对于在$O(tm)$时间中$O(t)$迭代之后的正整数$t,$,我们对于每个顶点$v$获得从源到$v$的路径距离,该路径距离不超过由所谓的{ \em $ t+$光路}中从源到$v$的最短路径产生的路径距离。两个顶点之间的有向路径是$t+$轻,如果它包含至多$t$比这些顶点之间的最小边基数有向路径更多的边。经过$O(n)$迭代,我们得到了一个$O(nm)$ -时间的解决方案,SSSP在有向图与真正的边权重匹配的贝尔曼和福特。我们的主要结果是一个输出敏感算法的所有对最短路径问题(APSP)的DAG与正负实边权重。它在时间上运行$O(\min \{n^ω, nm+n^2\log n\}+\sum_{v\in V}\text{indeg}(v)|\text{leaf}(T_v)|),$,其中$n$是顶点的数目,$m$是边的数目,$ω$是快速矩阵乘法的指数,$\text{indeg}(v)$代表$v,$的入度$T_v$是从$v$的所有祖先到$v$的词典第一最短有向路径的树,并且$\text{leaf}(T_v)$是$T_v.$中的叶的集合。最后,我们讨论了一个扩展的假设改进的时间上界APSP在非负边加权DAG包括有向图与多项式数量的大有向圈。

英文摘要:

A straightforward dynamic programming method for the single-source shortest paths problem (SSSP) in an edge-weighted directed acyclic graph (DAG) processes the vertices in a topologically sorted order. First, we similarly iterate this method alternatively in a breadth-first search sorted order and the reverse order on an input directed graph with both positive and negative real edge weights, $n$ vertices and $m$ edges. For a positive integer $t,$ after $O(t)$ iterations in $O(tm)$ time, we obtain for each vertex $v$ a path distance from the source to $v$ not exceeding that yielded by the shortest path from the source to $v$ among the so called {\em$ t+$light paths}. A directed path between two vertices is $t+$light if it contains at most $t$ more edges than the minimum edge-cardinality directed path between these vertices. After $O(n)$ iterations, we obtain an $O(nm)$-time solution to SSSP in directed graphs with real edge weights matching that of Bellman and Ford. Our main result is an output-sensitive algorithm for the all-pairs shortest paths problem (APSP) in DAGs with positive and negative real edge weights. It runs in time $O(\min \{n^ω, nm+n^2\log n\}+\sum_{v\in V}\text{indeg}(v)|\text{leaf}(T_v)|),$ where $n$ is the number of vertices, $m$ is the number of edges, $ω$ is the exponent of fast matrix multiplication, $\text{indeg}(v)$ stands for the indegree of $v,$ $T_v$ is a tree of lexicographically-first shortest directed paths from all ancestors of $v$ to $v$, and $\text{leaf}(T_v)$ is the set of leaves in $T_v.$ Finally, we discuss an extension of hypothetical improved upper time-bounds for APSP in non-negatively edge-weighted DAGs to include directed graphs with a polynomial number of large directed cycles.

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

↑