DAG中的所有配对LCA:突破$O(n^{2.5})$障碍
All-Pairs LCA in DAGs: Breaking through the $O(n^{2.5})$ barrier
摘要:
设$G=(V,E)$是一个$n$ -顶点有向无环图(DAG).两个顶点$u$和$v$的最低共同祖先(LCA)是$u$和$v$的共同祖先$w$,使得没有$w$的后代具有相同的属性。在本文中,我们考虑的问题,计算LCA,如果有的话,在一个DAG中的所有顶点对。用于该问题的最快已知算法利用快速矩阵乘法子例程,并且具有范围从$O(n^{2.687})$ [Bender等人,SODA'01]降至$O(n^{2.615})$ [Kowaluk和Lingas~ICALP'05]和$O(n^{2.569})$ [Czumaj等人~ TCS'07]。有些令人惊讶的是,即使矩阵乘法可以被最佳地求解,所有这些界限仍然是$Ω(n^{2.5})$(即,PDMATHAMV)。这似乎是所有当前已知方法的固有障碍,这就提出了关于是否可以突破该问题的$O(n^{2.5})$障碍的自然问题。在本文中,我们肯定地回答这个问题:特别是,我们提出了一个$\tilde O(n^{2.447})$($\tilde O(n^{7/3})$为$ω=2$)的算法,找到一个LCA的所有对顶点的DAG,这是第一次改进的运行时间为这个问题在过去的13年。在我们的方法中的一个关键工具是一个快速的算法来分区$G$的传递闭包的顶点集的$O(\ell)$链和$O(n/\ell)$反链的集合,对于一个给定的参数$\ell$。通常,链是一条路,而反链是一个独立的集合。然后,我们发现,对于所有的顶点对,一个\emph{candidate} LCA之间的链和反链顶点,分别。第一组是通过减少到最小-最大矩阵乘法。第二组的计算可以减少到布尔矩阵乘法类似于以前的结果在这个问题上。最后,我们以一种谨慎的(非显而易见的)方式将这两种解决方案结合在一起。
英文摘要:
Let $G=(V,E)$ be an $n$-vertex directed acyclic graph (DAG). A lowest common ancestor (LCA) of two vertices $u$ and $v$ is a common ancestor $w$ of $u$ and $v$ such that no descendant of $w$ has the same property. In this paper, we consider the problem of computing an LCA, if any, for all pairs of vertices in a DAG. The fastest known algorithms for this problem exploit fast matrix multiplication subroutines and have running times ranging from $O(n^{2.687})$ [Bender et al.~SODA'01] down to $O(n^{2.615})$ [Kowaluk and Lingas~ICALP'05] and $O(n^{2.569})$ [Czumaj et al.~TCS'07]. Somewhat surprisingly, all those bounds would still be $Ω(n^{2.5})$ even if matrix multiplication could be solved optimally (i.e., $ω=2$). This appears to be an inherent barrier for all the currently known approaches, which raises the natural question on whether one could break through the $O(n^{2.5})$ barrier for this problem. In this paper, we answer this question affirmatively: in particular, we present an $\tilde O(n^{2.447})$ ($\tilde O(n^{7/3})$ for $ω=2$) algorithm for finding an LCA for all pairs of vertices in a DAG, which represents the first improvement on the running times for this problem in the last 13 years. A key tool in our approach is a fast algorithm to partition the vertex set of the transitive closure of $G$ into a collection of $O(\ell)$ chains and $O(n/\ell)$ antichains, for a given parameter $\ell$. As usual, a chain is a path while an antichain is an independent set. We then find, for all pairs of vertices, a \emph{candidate} LCA among the chain and antichain vertices, separately. The first set is obtained via a reduction to min-max matrix multiplication. The computation of the second set can be reduced to Boolean matrix multiplication similarly to previous results on this problem. We finally combine the two solutions together in a careful (non-obvious) manner.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。