We present practical linear and almost linear-time algorithms to compute a chain decomposition of a directed acyclic graph (DAG), $G=(V,E)$. The number of vertex-disjoint chains computed is very close to the minimum. The time complexity of our algorithm is $O(|E|+c*l)$, where $c$ is the number of path concatenations and $l$ is the length of a longest path of the graph. We give a comprehensive explanation on factors $c$ and $l$ in the following sections. Our techniques have important applications in many areas, including the design of faster practical transitive closure algorithms. We observe that $|E_{red}|\leq width*|V|$ ($E_{red}$: non-transitive edges) and show how to find a substantially large subset of $E_{tr}$ (transitive edges) using a chain decomposition in linear time, without calculating the transitive closure. Our extensive experimental results show the interplay between the width, $E_{red}$, $E_{tr}$ in various models of graphs. We show how to compute a reachability indexing scheme in $O(k_c*|E_{red}|)$ time, where $k_c$ is the number of chains and $|E_{red}|$ is the number of non-transitive edges. This scheme can answer reachabilitiy queries in constant time. The space complexity of the scheme is $O(k_c*|V|)$. The experimental results reveal that our methods are even better in practice than the theoretical bounds imply, indicating how fast chain decomposition algorithms can be applied to the transitive closure problem.
翻译:我们提出了实际的线性算法和几乎线性的时间算法, 以计算方向周期图( DAG) 的连锁分解, $G=( V, E) 美元。 我们的技术在许多领域都有重要的应用, 包括设计更快捷的实际过渡性结束算法。 我们观察到 $E\ red=leq glean_V}$( E ⁇ @ {*c*l) 的计算方法非常接近最小值。 我们算法的复杂度是 $O( E ⁇ E ⁇ c) 和 美元( 美元) 的分解方法非常复杂, 使用线性时间的链分解法, 而不计算过渡性结束。 我们的广泛实验结果显示, 宽度, $( red) 和 美元( $_ 美元) 实际操作性结束算法 。 在各种模型中, 美元( 美元) 的递增时间 表示, 美元( 美元) 自动递增 的计算法是 。