论文标题

dags中的全对LCA:突破$ o(n^{2.5})$屏障

All-Pairs LCA in DAGs: Breaking through the $O(n^{2.5})$ barrier

论文作者

Grandoni, Fabrizio, Italiano, Giuseppe F., Łukasiewicz, Aleksander, Parotsidis, Nikos, Uznański, Przemysław

论文摘要

令$ g =(v,e)$为$ n $ vertex有向无环图(DAG)。两个顶点$ u $和$ v $的最低共同祖先(LCA)是$ u $和$ v $的共同祖先$ w $,因此,$ w $的后代没有相同的财产。在本文中,我们考虑了计算DAG中所有顶点的LCA(如果有)的问题。此问题的最快已知算法可利用快速矩阵乘法子例程,并且运行时间从$ O(N^{2.687})$ [Bender等人[Bender等人〜Soda'01]降低到$(N^{2.615})$(n^{2.615})$等人〜tcs'07]。令人惊讶的是,即使可以最佳地求解矩阵乘法(即$ω= 2 $),所有这些界限仍将是$ω(n^{2.5})$。对于所有当前已知的方法来说,这似乎是一个固有的障碍,这提出了一个自然的问题,即是否可以突破$ o(n^{{2.5})$障碍。 在本文中,我们肯定地回答了这个问题:特别是,我们提出了一个$ \ tilde o(n^{2.447})$($ \ tilde o(n^{7/3})$(n^{7/3})$ $ω= 2 $)algorithm,用于在所有DAG中找到LCA的LCA,这是一个DAG中的所有成对的LCA,这代表了在运行时的第一次改进,以实现这一时间的13个问题。我们方法中的一个关键工具是一种快速算法,将$ g $的传递闭合顶点集划分为$ o(\ ell)$链的集合和$ o(n/\ ell)$ andichains,用于给定参数$ \ ell $。像往常一样,链条是一条路径,而抗小节是独立组。然后,对于所有顶点,我们都会分别在链和抗抗逆性顶点之间找到\ emph {候选} 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.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源