3 research outputs found
All-Pairs LCA in DAGs: Breaking through the barrier
Let be an -vertex directed acyclic graph (DAG). A lowest common
ancestor (LCA) of two vertices and is a common ancestor of and
such that no descendant of 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
[Bender et al.~SODA'01] down to [Kowaluk and Lingas~ICALP'05]
and [Czumaj et al.~TCS'07]. Somewhat surprisingly, all those
bounds would still be even if matrix multiplication could be
solved optimally (i.e., ). 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 barrier for this problem.
In this paper, we answer this question affirmatively: in particular, we
present an ( for ) 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 into a collection of chains and
antichains, for a given parameter . 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
A path cover technique for LCAs in dags
As a second major result we show how to combine the path cover technique with LCA solutions for dags with small depth [9]. Our algorithm attains the best known upper time bound for this problem of O(n 2.575). However, most notably, the algorithm performs better on a vast amount of input dags, i.e. dags that do not have an almost linear-sized subdag of extremely regular structure. Finally, we apply our technique to improve the general upper time bounds on the worst case time complexity for the problem of reporting LCAs for each triple of vertices recently established by Yuster[26]