29:2 K. Bringmann and N. Carmeli Vol. 21:1
size of the database itself, we cannot hope to generate all answers in linear time in the size
of the input. Instead, we use enumeration measures. Since we must read the entire input to
verify whether the query has answers, and we must print all answers, the measure of linear
preprocessing time and constant delay between two successive answers can be seen as the
optimal time complexity for answering queries. The class of queries that can be answered
within these time bounds is denoted
DelayClin
, and recent research asks which queries are in
this class [Dur20, BGS20].
Proving that a query belongs to the class
DelayClin
can be achieved by a variety of
algorithmic techniques, coupled with insights into the query structure. However, proving
that a query is unconditionally not contained in this class is beyond the state-of-the-art
lower bound techniques for the RAM model. Therefore, one must resort to conditional lower
bounds. That is, start from a hypothesis on the time complexity of a well-studied problem
and design a reduction from your problem of choice; this proves a lower bound that holds
conditional on the starting hypothesis. While such a conditional lower bound is no absolute
impossibility result, it identifies an algorithmic breakthrough that is necessary to find better
algorithms for your problem of choice, and thus it yields strong evidence that no better
algorithm exists. This paradigm has been successfully applied in the field of fine-grained
complexity theory to obtain tight conditional lower bounds for many different problems, see,
e.g., [
Wil18
,
Bri19
]. When searching for dichotomies (that characterize which problems in
a class admit efficient algorithms), research aiming for lower bounds (conditional or not)
has another advantage. The reductions showing hardness often succeed only in some cases.
This brings out the other cases, directing us to focus our attention where we have hope for
finding efficient algorithms without a major computational breakthrough. This approach
has been useful for finding tractable cases that were previously unknown [CK21].
When considering Conjunctive Queries (CQs) without self-joins, the tractability of
enumerating query answers with respect to
DelayClin
is well understood. The queries with a
free-connex structure are tractable [
BDG07
]; these are acyclic queries that remain acyclic
with the addition of an atom containing the free variables. This tractability result is
complemented by conditional lower bounds forming a dichotomy: a self-join-free CQ is in
DelayClin
if and only if it is free-connex [
BB13
,
BDG07
]. The hardness of cyclic CQs assumes
the hardness of finding hypercliques in a hypergraph [
BB13
], while the hardness of acyclic
non-free-connex CQs assumes the hardness of Boolean matrix multiplication [
BDG07
]. This
dichotomy assumes that the CQ does not contain self-joins (that is, every relation appears
in at most one atom of the query), which enables assigning different atoms with different
relations when reducing a hard problem to query answering. Not much is known regarding
the case with self-joins, but we do know that there are cases where self-joins affect the
complexity [BGS20, CS23].
The next natural class of queries to consider is Unions of Conjunctive Queries (UCQs),
which is equivalent to positive relational algebra. A union of tractable CQs is known to be
tractable [
DS11
]. However, when the union contains an intractable CQ, the picture gets
much more complex. Note that a union that contains an intractable CQ may be equivalent to
a union of tractable CQs; in which case, the UCQ is tractable [
CK21
]. This can happen for
example if the union is comprised of an intractable CQ
Q1
and a tractable CQ
Q2
subsuming
it; then the entire union is equivalent to
Q2
. Thus, it makes sense to consider non-redundant
UCQs. It was claimed that a non-redundant UCQ that contains an intractable CQ is
necessarily intractable [
CJN18
]. This claim was disproved in a surprising result showing that
a UCQ may be tractable even if it consists solely of intractable CQs [
CK21
]. Specifically,