We study the enumeration of answers to Unions of Conjunctive Queries (UCQs) with optimal time guarantees. More precisely, we wish to identify the queries that can be solved with linear preprocessing time and constant delay. Despite the basic nature of this problem, it was shown only recently that UCQs can be solved within these time bounds if they admit free-connex union extensions, even if all individual CQs in the union are intractable with respect to the same complexity measure. Our goal is to understand whether there exist additional tractable UCQs, not covered by the currently known algorithms. As a first step, we show that some previously unclassified UCQs are hard using the classic 3SUM hypothesis, via a known reduction from 3SUM to triangle listing in graphs. As a second step, we identify a question about a variant of this graph task which is unavoidable if we want to classify all self-join free UCQs: is it possible to decide the existence of a triangle in a vertex-unbalanced tripartite graph in linear time? We prove that this task is equivalent in hardness to some family of UCQs. Finally, we show a dichotomy for unions of two self-join-free CQs if we assume the answer to this question is negative. Our conclusion is that, to reason about a class of enumeration problems defined by UCQs, it is enough to study the single decision problem of detecting triangles in unbalanced graphs. Without a breakthrough for triangle detection, we have no hope to find an efficient algorithm for additional unions of two self-join free CQs. On the other hand, if we will one day have such a triangle detection algorithm, we will immediately obtain an efficient algorithm for a family of UCQs that are currently not known to be tractable.
翻译:本文研究具有最优时间保证的合取查询并集(UCQs)答案枚举问题。具体而言,我们旨在识别可通过线性预处理时间和常数延迟求解的查询。尽管该问题具有基础性,但直到最近才证明:若UCQs具有自由连接并集扩展,即使并集中所有单个合取查询(CQs)在相同复杂度度量下均难解,仍可在上述时间界限内求解。我们的目标是理解是否存在当前已知算法未覆盖的其他可解UCQs。第一步,我们通过已知的从3SUM到图中三角形列出的归约,基于经典3SUM假设证明某些先前未分类的UCQs是难解的。第二步,我们提出一个关于图任务变体的关键问题——若要对所有无自连接UCQs进行分类,该问题不可避免:是否可能在线性时间内判断顶点非平衡三分图中是否存在三角形?我们证明该任务与某类UCQs在难度上等价。最后,若对该问题的回答为否定,我们展示两个无自连接CQs并集的一个二分法。结论是:要推理由UCQs定义的枚举问题类,只需研究非平衡图中检测三角形的单一判定问题。若三角形检测无突破性进展,则无法为两个无自连接CQs的更多并集找到高效算法。反之,若某日获得此类三角形检测算法,我们将立即为当前未知可解性的UCQs系列获得高效算法。