Fine-Grained Dichotomies for Conjunctive Queries with Minimum or Maximum
Nofar Carmeli, Nikolaos Tziavelis
TL;DR
The paper tackles the fine-grained data complexity of direct access to Conjunctive Query ($Q$) answers under $\min$- or $\\,max$-based orderings, introducing min-predicate $x \leq \min X$ and predicate-elimination techniques. It proves a dichotomy: efficient min-ranked direct access, counting, and predicate elimination occur exactly when the CQ is acyclic free-connex and there is no long chordless path between free variables involved in the min predicate; enumeration, however, enjoys a broader tractable regime. The authors present a bottom-up aggregation framework on semirings, a direct-access construction MinDA with preparation, partition-elimination, secondary DA structures, and a Min-DA array, enabling linear preprocessing and $O(\log |D|)$ access. They also establish conditional lower bounds based on Hyperclique and Seth hypotheses. This work provides both a theoretical foundation and practical methods for efficient ranked CQ answering with min predicates, informing database engine design for ranking and forecasting tasks.
Abstract
We investigate the fine-grained complexity of direct access to Conjunctive Query (CQ) answers according to their position, ordered by the minimum (or maximum) value between attributes. We further use the tools we develop to explore a wealth of related tasks. We consider the task of ranked enumeration under min/max orders, as well as tasks concerning CQs with predicates of the form x <= min X , where X is a set of variables and x is a single variable: counting, enumeration, direct access, and predicate elimination (i.e., transforming the pair of query and database to an equivalent pair without min-predicates). For each task, we establish a complete dichotomy for self-join-free CQs, precisely identifying the cases that are solvable in near-ideal time, i.e., (quasi)linear preprocessing time followed by constant or logarithmic time per output.
