Listing, Verifying and Counting Lowest Common Ancestors in DAGs: Algorithms and Fine-Grained Lower Bounds
Abstract
The AP-LCA problem asks, given an -node directed acyclic graph (DAG), to compute for every pair of vertices and in the DAG a lowest common ancestor (LCA) of and if one exists. In this paper we study several interesting variants of AP-LCA, providing both algorithms and fine-grained lower bounds for them. The lower bounds we obtain are the first conditional lower bounds for LCA problems higher than , where is the matrix multiplication exponent. Some of our results include: - In any DAG, we can detect all vertex pairs that have at most two LCAs and list all of their LCAs in time. This algorithm extends a result of [Kowaluk and Lingas ESA'07] which showed an time algorithm that detects all pairs with a unique LCA in a DAG and outputs their corresponding LCAs. - Listing LCAs per vertex pair in DAGs requires time under the popular assumption that 3-uniform 5-hyperclique detection requires time. This is surprising since essentially cubic time is sufficient to list all LCAs (if ). - Counting the number of LCAs for every vertex pair in a DAG requires time under the Strong Exponential Time Hypothesis, and time under the -Clique hypothesis. This shows that the algorithm of [Echkardt, M\"{u}hling and Nowak ESA'07] for listing all LCAs for every pair of vertices is likely optimal. - Given a DAG and a vertex for every vertex pair , verifying whether all are valid LCAs requires time assuming 3-uniform 4-hyperclique requires time. This defies the common intuition that verification is easier than computation since returning some LCA per vertex pair can be solved in time [Grandoni et al. SODA'21].
Keywords
Cite
@article{arxiv.2204.10932,
title = {Listing, Verifying and Counting Lowest Common Ancestors in DAGs: Algorithms and Fine-Grained Lower Bounds},
author = {Surya Mathialagan and Virginia Vassilevska Williams and Yinzhan Xu},
journal= {arXiv preprint arXiv:2204.10932},
year = {2022}
}
Comments
To appear in ICALP 2022. Abstract shortened to fit arXiv requirement