Papers
Topics
Authors
Recent
Search
2000 character limit reached

Free-Connex Queries: Tractability Frontier

Updated 5 July 2026
  • Free-connex queries are a class of conjunctive queries that remain acyclic after adding an atom covering all free variables, ensuring tractability.
  • They enable efficient output-sensitive tasks such as linear-time counting, constant-delay enumeration, and ranked answer retrieval under various aggregation settings.
  • Extensions to dynamic, union, and secure query processing highlight free-connexity as a canonical structural property for optimizing query evaluation.

Searching arXiv for recent and foundational papers on free-connex queries and closely related variants. Free-connex queries are a structural class of conjunctive queries and related query formalisms in which acyclicity is preserved after adding one atom or hyperedge containing all free variables. In the classical conjunctive-query setting, this condition identifies the tractable frontier for several output-sensitive tasks: unranked enumeration with linear preprocessing and constant delay, ranked any-kk enumeration with near-linear data complexity under suitable monotonicity assumptions, and linear-time counting for self-join-free acyclic queries under standard fine-grained assumptions (Tziavelis et al., 2022, Mengel, 2021). More recent work has generalized the same structural idea to join-aggregate queries, aggregate group-by queries, conjunctive regular path queries, dynamic maintenance, indexing, secure query processing, unions of conjunctive queries, and conjunctive queries with access patterns, while also clarifying where free-connexity remains exact, where it must be extended, and where it is superseded by richer structural notions (Hu, 2024, Figueira et al., 18 Jul 2025, Khamis et al., 11 Dec 2025, Riveros et al., 8 Jan 2026, Wang, 16 Mar 2026, Bringmann et al., 2022, Kara et al., 2022).

1. Definition and structural characterization

A conjunctive query QQ is presented as

Q(Z)  : ⁣  R1(X1),,R(X),Q(\mathbf{Z}) \;:\!- \; R_1(\mathbf{X}_1), \ldots, R_\ell(\mathbf{X}_\ell),

where the free variables are

Z=i[]XiY\mathbf{Z} = \bigcup_{i\in[\ell]} \mathbf{X}_i \setminus \mathbf{Y}

for existential variables Y\mathbf{Y} (Tziavelis et al., 2022). Its hypergraph has variables as vertices and atoms as hyperedges. The query is acyclic if the hypergraph is α\alpha-acyclic, equivalently if it admits a join tree satisfying the running intersection property (Tziavelis et al., 2022).

The standard free-connex condition is that an acyclic query remains acyclic after adding one extra atom containing all free variables (Tziavelis et al., 2022, Hu, 2024, Geck et al., 2022). In the hypergraph notation used across the literature, if Q=(V,E,y)Q=(V,E,y) with output or free attributes yy, then QQ is free-connex exactly when

(V,E{y},y)(V,E\cup\{y\},y)

is also acyclic (Hu, 2024). This same formulation is reused for join-aggregate queries and for rewriting problems over views, indicating that the notion is structurally stable across several semantics (Hu, 2024, Geck et al., 2022).

An equivalent characterization central to algorithmic reductions is that free-connexity implies the existence of a join tree with a connected subset of nodes containing precisely the free variables and no existential ones (Tziavelis et al., 2022). In graph-shaped binary settings, the literature also formulates the obstruction negatively: an acyclic CQ is not free-connex exactly when it contains a free-path, namely a chordless path whose endpoints are free variables and whose internal vertices are bound (Bringmann et al., 2022, Carmeli et al., 2018).

Several papers place free-connexity in a larger hierarchy. Every full acyclic CQ is trivially free-connex (Tziavelis et al., 2022, Hu, 2024). Free-connexity is stronger than acyclicity but weaker than q-hierarchicality in dynamic settings (Kara et al., 2022). In acyclic CRPQs, free-connexity is the width-QQ0 case of free-connex fractional hypertree width, while in acyclic join-aggregate queries it is the width-QQ1 case of out-width (Khamis et al., 11 Dec 2025, Hu, 2024). In aggregate group-by queries, free-connex decompositions appear as the one-level special case of project-connex decompositions (Figueira et al., 18 Jul 2025).

2. Classical tractability for enumeration and counting

For self-join-free conjunctive queries, free-connexity is the classical tractability criterion for linear-preprocessing, constant-delay enumeration. The unranked dichotomy, recalled and extended in later work, states that if QQ2 is free-connex, then unranked enumeration is possible with

QQ3

where QQ4 is input size; otherwise, if QQ5 is also self-join-free, such enumeration is not possible with

QQ6

assuming sparseBMM and Hyperclique (Tziavelis et al., 2022).

The same structural boundary appears in counting. For self-join-free acyclic CQs, free-connexity is exactly the condition that permits linear-time counting; if a query is acyclic but not free-connex, then under the assumption that SAT has no algorithm with runtime QQ7 for any QQ8, there is no algorithm counting answers in time QQ9 for any Q(Z)  : ⁣  R1(X1),,R(X),Q(\mathbf{Z}) \;:\!- \; R_1(\mathbf{X}_1), \ldots, R_\ell(\mathbf{X}_\ell),0, where Q(Z)  : ⁣  R1(X1),,R(X),Q(\mathbf{Z}) \;:\!- \; R_1(\mathbf{X}_1), \ldots, R_\ell(\mathbf{X}_\ell),1 is the number of tuples in the database (Mengel, 2021). More generally, quantified star size lower-bounds the counting exponent, and free-connex acyclic queries are exactly the quantified-star-size-Q(Z)  : ⁣  R1(X1),,R(X),Q(\mathbf{Z}) \;:\!- \; R_1(\mathbf{X}_1), \ldots, R_\ell(\mathbf{X}_\ell),2 case (Mengel, 2021).

Free-connexity also governs stronger indexability notions. For ordinary CQs, free-connex acyclic queries admit linear preprocessing together with constant-delay enumeration, logarithmic-time random access, constant-time inverted access, and therefore random-order enumeration through a lazy Fisher–Yates shuffle (Carmeli et al., 2019). For self-join-free CQs, the same paper uses prior hardness results to conclude that every non-free-connex query is intractable for enumeration, random-order enumeration, and random access under sparse-BMM, Triangle, and Hyperclique (Carmeli et al., 2019).

These results collectively establish the classical picture: once existential variables disconnect the free variables, acyclic join structure alone no longer suffices for output-sensitive processing.

3. Ranked and any-Q(Z)  : ⁣  R1(X1),,R(X),Q(\mathbf{Z}) \;:\!- \; R_1(\mathbf{X}_1), \ldots, R_\ell(\mathbf{X}_\ell),3 enumeration

Free-connexity continues to define the tractable frontier when answer ordering is introduced. For ranked enumeration under min-weight-projection semantics, the paper "Any-k Algorithms for Enumerating Ranked Answers to Conjunctive Queries" shows that the ranked analogue of the unranked dichotomy preserves the same structural boundary (Tziavelis et al., 2022).

The query answers are ranked by an aggregate ranking function Q(Z)  : ⁣  R1(X1),,R(X),Q(\mathbf{Z}) \;:\!- \; R_1(\mathbf{X}_1), \ldots, R_\ell(\mathbf{X}_\ell),4 composed with tuple weights. For projected CQs, the paper adopts min-weight-projection semantics: Q(Z)  : ⁣  R1(X1),,R(X),Q(\mathbf{Z}) \;:\!- \; R_1(\mathbf{X}_1), \ldots, R_\ell(\mathbf{X}_\ell),5 Under this semantics, naively enumerating the full CQ and projecting afterward can delay distinct projected answers by Q(Z)  : ⁣  R1(X1),,R(X),Q(\mathbf{Z}) \;:\!- \; R_1(\mathbf{X}_1), \ldots, R_\ell(\mathbf{X}_\ell),6 duplicates, so free-connexity is used to compile away existential branches while preserving ranked order (Tziavelis et al., 2022).

The main ranked dichotomy states that if Q(Z)  : ⁣  R1(X1),,R(X),Q(\mathbf{Z}) \;:\!- \; R_1(\mathbf{X}_1), \ldots, R_\ell(\mathbf{X}_\ell),7 is free-connex, then ranked enumeration with an s-monotone ranking function is possible with

Q(Z)  : ⁣  R1(X1),,R(X),Q(\mathbf{Z}) \;:\!- \; R_1(\mathbf{X}_1), \ldots, R_\ell(\mathbf{X}_\ell),8

If Q(Z)  : ⁣  R1(X1),,R(X),Q(\mathbf{Z}) \;:\!- \; R_1(\mathbf{X}_1), \ldots, R_\ell(\mathbf{X}_\ell),9 is not free-connex and is self-join-free, then the same near-linear bound is conditionally impossible under sparseBMM and Hyperclique (Tziavelis et al., 2022). The free-connex condition is therefore still necessary and sufficient in data complexity.

The ranking-side assumptions are expressed via subset-monotonicity and strong-subset-monotonicity: Z=i[]XiY\mathbf{Z} = \bigcup_{i\in[\ell]} \mathbf{X}_i \setminus \mathbf{Y}0 and

Z=i[]XiY\mathbf{Z} = \bigcup_{i\in[\ell]} \mathbf{X}_i \setminus \mathbf{Y}1

These properties make it possible to push ranking into the join via dynamic programming and deviation-based successor generation rather than materializing all answers first (Tziavelis et al., 2022).

Algorithmically, the free-connex reduction turns a projected ranked CQ into a full acyclic CQ on a linear-size transformed database by using the connected subset of free-variable nodes in a join tree and absorbing the best completion cost of pruned existential branches into weighted terminal edges (Tziavelis et al., 2022). This reduction is then combined with three any-Z=i[]XiY\mathbf{Z} = \bigcup_{i\in[\ell]} \mathbf{X}_i \setminus \mathbf{Y}2 algorithms—anyK-part, anyK-rec, and anyK-part+—whose tradeoffs are resolved asymptotically by anyK-part+ under strong-subset-monotonicity (Tziavelis et al., 2022).

4. Aggregate, semiring, and group-by generalizations

Free-connexity remains central when joins are combined with aggregation. For acyclic join-aggregate queries over commutative semirings, the classical Yannakakis framework gives output-optimal

Z=i[]XiY\mathbf{Z} = \bigcup_{i\in[\ell]} \mathbf{X}_i \setminus \mathbf{Y}3

time exactly for free-connex queries, where Z=i[]XiY\mathbf{Z} = \bigcup_{i\in[\ell]} \mathbf{X}_i \setminus \mathbf{Y}4 is input size and Z=i[]XiY\mathbf{Z} = \bigcup_{i\in[\ell]} \mathbf{X}_i \setminus \mathbf{Y}5 is output size (Hu, 2024). The 2024 output-sensitive theory generalizes this with a width parameter Z=i[]XiY\mathbf{Z} = \bigcup_{i\in[\ell]} \mathbf{X}_i \setminus \mathbf{Y}6, proving matching upper and lower bounds

Z=i[]XiY\mathbf{Z} = \bigcup_{i\in[\ell]} \mathbf{X}_i \setminus \mathbf{Y}7

and showing

Z=i[]XiY\mathbf{Z} = \bigcup_{i\in[\ell]} \mathbf{X}_i \setminus \mathbf{Y}8

for acyclic queries (Hu, 2024). Thus free-connex queries are exactly the width-Z=i[]XiY\mathbf{Z} = \bigcup_{i\in[\ell]} \mathbf{X}_i \setminus \mathbf{Y}9 case and exactly the case where the general bound collapses to the classical Y\mathbf{Y}0 regime (Hu, 2024).

The aggregate group-by setting pushes this further. Project-connex decompositions are introduced as the natural extension of free-connex decompositions to nested projection and aggregation: Y\mathbf{Y}1 A tree decomposition is project-connex if it contains nested witness subtrees Y\mathbf{Y}2 whose bag unions are exactly the projection sets Y\mathbf{Y}3 (Figueira et al., 18 Jul 2025). In the one-level case, this reduces exactly to free-connexness. The paper shows that project-connex generalized hyperwidth is equal to the generalized hyperwidth of an augmented query, making project-connex decompositions computable through classical decomposition algorithms (Figueira et al., 18 Jul 2025).

This framework recovers and unifies older free-connex results. In particular, bounded free-connex width of the core of a counting CQ is equivalent to the classical tractability characterization for counting under bounded arity: Y\mathbf{Y}4 for recursively enumerable bounded-arity classes Y\mathbf{Y}5, assuming Y\mathbf{Y}6 (Figueira et al., 18 Jul 2025). A plausible implication is that free-connexness is not merely one tractable case among many, but a canonical interface through which counting, enumeration, and semiring aggregation can be understood uniformly.

Free-connexity also appears in secure multi-party computation. The LINQ protocol supports all free-connex select-join-aggregate queries with

Y\mathbf{Y}7

running time and communication in a semi-honest 3PC model, where Y\mathbf{Y}8 is input size and Y\mathbf{Y}9 is output size (Luo et al., 2024). The protocol explicitly mirrors the plaintext free-connex frontier by realizing a secure Yannakakis/AJAR-style plan over a free-connex join tree, thereby matching the largest query class currently known to admit linear-time evaluation in plaintext (Luo et al., 2024).

5. Extensions to CRPQs, UCQs, rewriting, and indexing

Free-connexity has been extended far beyond ordinary CQs.

For acyclic CRPQs, free-connex fractional hypertree width α\alpha0 is the width-α\alpha1 case: α\alpha2 and the 2025 result on acyclic CRPQs shows that output-sensitive complexity is governed by α\alpha3, with runtime

α\alpha4

(Khamis et al., 11 Dec 2025). The same paper emphasizes that recursion does not create additional output-sensitive complexity beyond the corresponding acyclic CQ structure (Khamis et al., 11 Dec 2025). A complementary 2025 CRPQ result uses free-connexity as a target normal form: general acyclic CRPQs are contracted into free-connex acyclic ones by eliminating bound variables through RPQ composition or promotion, yielding a free-connex-based output-sensitive pipeline (Khamis et al., 24 Sep 2025).

For unions of conjunctive queries, free-connexity must be generalized. A union may be tractable even if one or all disjuncts are individually intractable, because one CQ can provide auxiliary variable combinations for another (Carmeli et al., 2018). The relevant notion is a free-connex union extension, where virtual atoms supplied by one disjunct are added to another so that every difficult CQ in the union becomes free-connex (Carmeli et al., 2018, Bringmann et al., 2022). For unions of two self-join-free CQs, the 2022 paper identifies a dichotomy under the vertex-unbalanced triangle detection hypothesis: a union is tractable exactly when it has a free-connex union extension (Bringmann et al., 2022). Thus plain free-connexity of each constituent CQ is no longer sufficient as a classification principle; it survives only through the union-extension generalization.

In the rewriting problem, free-connexness behaves as a preservation property. If a query α\alpha5 is free-connex acyclic and has any rewriting over a set of views, then it has a free-connex acyclic rewriting (Geck et al., 2022). On the complexity side, bounded-arity acyclic rewriting remains NP-hard when the views are merely acyclic or hierarchical, but becomes tractable when the views are free-connex acyclic: α\alpha6 (Geck et al., 2022). This is one of the clearest demonstrations that the head-connectedness encoded by free-connexness is algorithmically decisive even when only the views, rather than the input query, are structurally restricted.

Database indexing introduces yet another angle. The 2026 structural indexing result constructs, for a fixed database α\alpha7, a color-refinement-based auxiliary database α\alpha8 such that every later free-connex acyclic CQ can be counted or enumerated with preprocessing proportional to α\alpha9 rather than Q=(V,E,y)Q=(V,E,y)0 (Riveros et al., 8 Jan 2026). The core theorem states that after Q=(V,E,y)Q=(V,E,y)1 indexing time, every Boolean acyclic query can be answered in Q=(V,E,y)Q=(V,E,y)2, and every Q=(V,E,y)Q=(V,E,y)3 can be enumerated with delay Q=(V,E,y)Q=(V,E,y)4 after Q=(V,E,y)Q=(V,E,y)5 preprocessing (Riveros et al., 8 Jan 2026). This suggests that free-connexity is also the right query-side condition for exploiting structural symmetries in the data via quotient-like indexes.

6. Dynamic, access-pattern, and parameterized perspectives

Dynamic maintenance reveals a limitation of free-connexity as a complete tractability notion. In static evaluation and insertion-only updates, free-connex queries remain easy, but under mixed insertions and deletions the class is far from uniform (Wang, 16 Mar 2026). The 2026 parameterized hardness paper introduces height Q=(V,E,y)Q=(V,E,y)6 and dimension Q=(V,E,y)Q=(V,E,y)7 and proves that even free-connex queries can require amortized update time

Q=(V,E,y)Q=(V,E,y)8

under standard conjectures (Wang, 16 Mar 2026). Star queries are the canonical example: they are free-connex and height Q=(V,E,y)Q=(V,E,y)9, yet dimension yy0 can be arbitrarily large, yielding update lower bounds approaching linear (Wang, 16 Mar 2026). A plausible implication is that free-connexity is a static tractability frontier but not a sufficient dynamic invariant beyond the q-hierarchical subclass.

This picture is sharpened further in conjunctive queries with free access patterns. There, the relevant object is not free-connexity but the fracture of the query together with access-top variable orders, free-dominance, and input-dominance (Kara et al., 2022). The paper explicitly states that its general width theorem recovers known results for free-connex acyclic queries—linear preprocessing, linear update, constant delay—but the exact dynamic constant-update/constant-delay frontier is a stricter class, CQAPyy1, and not a free-connex analogue (Kara et al., 2022). In the no-input case, the tractable dynamic fragment collapses to q-hierarchical queries, not to free-connex queries (Kara et al., 2022).

Finally, the MATLANG correspondence shows that free-connexity has an expressive counterpart in sparse linear algebra. Binary free-connex CQs are exactly the yy2 queries, and these are exactly the yy3-MATLANG fragment in which matrix multiplication is allowed only when one factor is a row or column vector (Muñoz et al., 2023). Over semi-integral domains, this yields linear-time preprocessing and constant-delay enumeration for the nonzero output entries of the corresponding sparse linear algebra programs (Muñoz et al., 2023). Thus free-connexity is not merely a database-theoretic artifact; it identifies a structurally tractable fragment across two-variable logic and linear algebra query languages.

7. Conceptual significance and limitations

Free-connexity is best understood as the condition that the free-variable interface can be embedded into an acyclic decomposition without being separated by existential structure. That interpretation explains why it repeatedly appears as the exact tractable frontier for output-sensitive tasks centered on the free variables: enumeration, random access, ranked projection, counting, and output-optimal grouped aggregation (Tziavelis et al., 2022, Mengel, 2021, Carmeli et al., 2019, Hu, 2024). It also explains why the same idea must be generalized when the interface becomes more elaborate, as in nested group-by (project-connex), UCQ disjunction (free-connex union extensions), or CRPQ contraction (free-connex targets after elimination and promotion) (Figueira et al., 18 Jul 2025, Carmeli et al., 2018, Khamis et al., 24 Sep 2025).

At the same time, free-connexity is not universal. Dynamic maintenance under deletions requires finer structure, such as q-hierarchicality, height, and dimension (Wang, 16 Mar 2026, Kara et al., 2022). In UCQs, tractability is not determined CQ-by-CQ and may depend on whether difficult structures are guarded or provided by other disjuncts (Bringmann et al., 2022). In aggregate settings, free-connexness is only the width-yy4 base case of broader quantitative hierarchies such as out-width or project-connex width (Hu, 2024, Figueira et al., 18 Jul 2025).

The cumulative literature therefore supports a stable synthesis. Free-connexity is the canonical structural notion for the tractability of projected outputs in acyclic query processing. It remains exact for several core tasks, survives as the width-yy5 case of more general theories, and frequently serves as the normal form to which harder query classes are reduced. Where it fails to be exact, the reason is typically not that the notion becomes irrelevant, but that the query model introduces additional interfaces—disjunction, recursion, nested aggregation, updates, or access asymmetry—that require a strictly richer version of the same connectivity principle.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Free-Connex Queries.