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

07/17/2020
by   Fabrizio Grandoni, et al.
0

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 Õ(n^2.447) (Õ(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(ℓ) chains and O(n/ℓ) 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 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.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
08/16/2021

Computing and Listing Avoidable Vertices and Paths

A simplicial vertex of a graph is a vertex whose neighborhood is a cliqu...
research
04/23/2020

Directed Girth

It is known that a better than 2-approximation algorithm for the girth i...
research
04/23/2020

Conditionally optimal approximation algorithms for the girth of a directed graph

It is known that a better than 2-approximation algorithm for the girth i...
research
01/14/2020

Efficient parameterized algorithms for computing all-pairs shortest paths

Computing all-pairs shortest paths is a fundamental and much-studied pro...
research
07/16/2018

Faster Algorithms for All-Pairs Bounded Min-Cuts

Given a directed graph, the vertex connectivity from u to v is the maxim...
research
04/16/2020

Centralized and Parallel Multi-Source Shortest Paths via Hopsets and Fast Matrix Multiplication

Consider an undirected weighted graph G = (V,E,w). We study the problem ...
research
05/07/2019

Even Faster Elastic-Degenerate String Matching via Fast Matrix Multiplication

An elastic-degenerate (ED) string is a sequence of n sets of strings of ...

Please sign up or login with your details

Forgot password? Click here to reset