14 research outputs found

    Compressed Representations of Conjunctive Query Results

    Full text link
    Relational queries, and in particular join queries, often generate large output results when executed over a huge dataset. In such cases, it is often infeasible to store the whole materialized output if we plan to reuse it further down a data processing pipeline. Motivated by this problem, we study the construction of space-efficient compressed representations of the output of conjunctive queries, with the goal of supporting the efficient access of the intermediate compressed result for a given access pattern. In particular, we initiate the study of an important tradeoff: minimizing the space necessary to store the compressed result, versus minimizing the answer time and delay for an access request over the result. Our main contribution is a novel parameterized data structure, which can be tuned to trade off space for answer time. The tradeoff allows us to control the space requirement of the data structure precisely, and depends both on the structure of the query and the access pattern. We show how we can use the data structure in conjunction with query decomposition techniques, in order to efficiently represent the outputs for several classes of conjunctive queries.Comment: To appear in PODS'18; 35 pages; comments welcom

    Answering Conjunctive Queries under Updates

    Full text link
    We consider the task of enumerating and counting answers to kk-ary conjunctive queries against relational databases that may be updated by inserting or deleting tuples. We exhibit a new notion of q-hierarchical conjunctive queries and show that these can be maintained efficiently in the following sense. During a linear time preprocessing phase, we can build a data structure that enables constant delay enumeration of the query results; and when the database is updated, we can update the data structure and restart the enumeration phase within constant time. For the special case of self-join free conjunctive queries we obtain a dichotomy: if a query is not q-hierarchical, then query enumeration with sublinear^\ast delay and sublinear update time (and arbitrary preprocessing time) is impossible. For answering Boolean conjunctive queries and for the more general problem of counting the number of solutions of k-ary queries we obtain complete dichotomies: if the query's homomorphic core is q-hierarchical, then size of the the query result can be computed in linear time and maintained with constant update time. Otherwise, the size of the query result cannot be maintained with sublinear update time. All our lower bounds rely on the OMv-conjecture, a conjecture on the hardness of online matrix-vector multiplication that has recently emerged in the field of fine-grained complexity to characterise the hardness of dynamic problems. The lower bound for the counting problem additionally relies on the orthogonal vectors conjecture, which in turn is implied by the strong exponential time hypothesis. )^\ast) By sublinear we mean O(n1ε)O(n^{1-\varepsilon}) for some ε>0\varepsilon>0, where nn is the size of the active domain of the current database

    Decomposing quantified conjunctive (or disjunctive) formulas

    Get PDF
    Model checking---deciding if a logical sentence holds on a structure---is a basic computational task that is well known to be intractable in general. For first-order logic on finite structures, it is PSPACE-complete, and the natural evaluation algorithm exhibits exponential dependence on the formula. We study model checking on the quantified conjunctive fragment of first-order logic, namely, prenex sentences having a purely conjunctive quantifier-free part. Following a number of works, we associate a graph to the quantifier-free part; each sentence then induces a prefixed graph, a quantifier prefix paired with a graph on its variables. We give a comprehensive classification of the sets of prefixed graphs on which model checking is tractable based on a novel generalization of treewidth that generalizes and places into a unified framework a number of existing results

    First-Order Query Evaluation with Cardinality Conditions

    Full text link
    We study an extension of first-order logic that allows to express cardinality conditions in a similar way as SQL's COUNT operator. The corresponding logic FOC(P) was introduced by Kuske and Schweikardt (LICS'17), who showed that query evaluation for this logic is fixed-parameter tractable on classes of structures (or databases) of bounded degree. In the present paper, we first show that the fixed-parameter tractability of FOC(P) cannot even be generalised to very simple classes of structures of unbounded degree such as unranked trees or strings with a linear order relation. Then we identify a fragment FOC1(P) of FOC(P) which is still sufficiently strong to express standard applications of SQL's COUNT operator. Our main result shows that query evaluation for FOC1(P) is fixed-parameter tractable with almost linear running time on nowhere dense classes of structures. As a corollary, we also obtain a fixed-parameter tractable algorithm for counting the number of tuples satisfying a query over nowhere dense classes of structures

    FAQ

    Full text link

    Counting small induced subgraphs satisfying monotone properties

    Get PDF
    Given a graph property Φ\Phi, the problem #IndSub(Φ)\#\mathsf{IndSub}(\Phi) asks, on input a graph GG and a positive integer kk, to compute the number of induced subgraphs of size kk in GG that satisfy Φ\Phi. The search for explicit criteria on Φ\Phi ensuring that #IndSub(Φ)\#\mathsf{IndSub}(\Phi) is hard was initiated by Jerrum and Meeks [J. Comput. Syst. Sci. 15] and is part of the major line of research on counting small patterns in graphs. However, apart from an implicit result due to Curticapean, Dell and Marx [STOC 17] proving that a full classification into "easy" and "hard" properties is possible and some partial results on edge-monotone properties due to Meeks [Discret. Appl. Math. 16] and D\"orfler et al. [MFCS 19], not much is known. In this work, we fully answer and explicitly classify the case of monotone, that is subgraph-closed, properties: We show that for any non-trivial monotone property Φ\Phi, the problem #IndSub(Φ)\#\mathsf{IndSub}(\Phi) cannot be solved in time f(k)V(G)o(k/log1/2(k))f(k)\cdot |V(G)|^{o(k/ {\log^{1/2}(k)})} for any function ff, unless the Exponential Time Hypothesis fails. By this, we establish that any significant improvement over the brute-force approach is unlikely; in the language of parameterized complexity, we also obtain a #W[1]\#\mathsf{W}[1]-completeness result

    Counting small induced subgraphs satisfying monotone properties

    Get PDF
    Given a graph property Φ\Phi, the problem #IndSub(Φ)\#\mathsf{IndSub}(\Phi) asks, on input a graph GG and a positive integer kk, to compute the number of induced subgraphs of size kk in GG that satisfy Φ\Phi. The search for explicit criteria on Φ\Phi ensuring that #IndSub(Φ)\#\mathsf{IndSub}(\Phi) is hard was initiated by Jerrum and Meeks [J. Comput. Syst. Sci. 15] and is part of the major line of research on counting small patterns in graphs. However, apart from an implicit result due to Curticapean, Dell and Marx [STOC 17] proving that a full classification into "easy" and "hard" properties is possible and some partial results on edge-monotone properties due to Meeks [Discret. Appl. Math. 16] and D\"orfler et al. [MFCS 19], not much is known. In this work, we fully answer and explicitly classify the case of monotone, that is subgraph-closed, properties: We show that for any non-trivial monotone property Φ\Phi, the problem #IndSub(Φ)\#\mathsf{IndSub}(\Phi) cannot be solved in time f(k)V(G)o(k/log1/2(k))f(k)\cdot |V(G)|^{o(k/ {\log^{1/2}(k)})} for any function ff, unless the Exponential Time Hypothesis fails. By this, we establish that any significant improvement over the brute-force approach is unlikely; in the language of parameterized complexity, we also obtain a #W[1]\#\mathsf{W}[1]-completeness result

    Counting Small Induced Subgraphs Satisfying Monotone Properties

    Get PDF
    Given a graph property Φ\Phi, the problem #IndSub(Φ)\#\mathsf{IndSub}(\Phi) asks, on input a graph GG and a positive integer kk, to compute the number of induced subgraphs of size kk in GG that satisfy Φ\Phi. The search for explicit criteria on Φ\Phi ensuring that #IndSub(Φ)\#\mathsf{IndSub}(\Phi) is hard was initiated by Jerrum and Meeks [J. Comput. Syst. Sci. 15] and is part of the major line of research on counting small patterns in graphs. However, apart from an implicit result due to Curticapean, Dell and Marx [STOC 17] proving that a full classification into "easy" and "hard" properties is possible and some partial results on edge-monotone properties due to Meeks [Discret. Appl. Math. 16] and D\"orfler et al. [MFCS 19], not much is known. In this work, we fully answer and explicitly classify the case of monotone, that is subgraph-closed, properties: We show that for any non-trivial monotone property Φ\Phi, the problem #IndSub(Φ)\#\mathsf{IndSub}(\Phi) cannot be solved in time f(k)V(G)o(k/log1/2(k))f(k)\cdot |V(G)|^{o(k/ {\log^{1/2}(k)})} for any function ff, unless the Exponential Time Hypothesis fails. By this, we establish that any significant improvement over the brute-force approach is unlikely; in the language of parameterized complexity, we also obtain a #W[1]\#\mathsf{W}[1]-completeness result
    corecore