14 research outputs found

    Expressivity Within Second-Order Transitive-Closure Logic

    Get PDF
    Second-order transitive-closure logic, SO(TC), is an expressive declarative language that captures the complexity class PSPACE. Already its monadic fragment, MSO(TC), allows the expression of various NP-hard and even PSPACE-hard problems in a natural and elegant manner. As SO(TC) offers an attractive framework for expressing properties in terms of declaratively specified computations, it is interesting to understand the expressivity of different features of the language. This paper focuses on the fragment MSO(TC), as well on the purely existential fragment SO(2TC)(exists); in 2TC, the TC operator binds only tuples of relation variables. We establish that, with respect to expressive power, SO(2TC)(exists) collapses to existential first-order logic. In addition we study the relationship of MSO(TC) to an extension of MSO(TC) with counting features (CMSO(TC)) as well as to order-invariant MSO. We show that the expressive powers of CMSO(TC) and MSO(TC) coincide. Moreover we establish that, over unary vocabularies, MSO(TC) strictly subsumes order-invariant MSO

    The Weisfeiler-Leman dimension of conjunctive queries

    Get PDF
    A graph parameter is a function on graphs with the property that, for any pair of isomorphic graphs 1 and 2, (1) = (2). The Weisfeiler–Leman (WL) dimension of is the minimum such that, if 1 and 2 are indistinguishable by the -dimensional WL-algorithm then (1) = (2). The WL-dimension of is ∞ if no such exists. We study the WL-dimension of graph parameters characterised by the number of answers from a fixed conjunctive query to the graph. Given a conjunctive query , we quantify the WL-dimension of the function that maps every graph to the number of answers of in . The works of Dvorák (J. Graph Theory 2010), Dell, Grohe, and Rattan (ICALP 2018), and Neuen (ArXiv 2023) have answered this question for full conjunctive queries, which are conjunctive queries without existentially quantified variables. For such queries , the WL-dimension is equal to the treewidth of the Gaifman graph of . In this work, we give a characterisation that applies to all conjunctive queries. Given any conjunctive query , we prove that its WL-dimension is equal to the semantic extension width sew(), a novel width measure that can be thought of as a combination of the treewidth of and its quantified star size, an invariant introduced by Durand and Mengel (ICDT 2013) describing how the existentially quantified variables of are connected with the free variables. Using the recently established equivalence between the WL-algorithm and higher-order Graph Neural Networks (GNNs) due to Morris et al. (AAAI 2019), we obtain as a consequence that the function counting answers to a conjunctive query cannot be computed by GNNs of order smaller than sew(). The majority of the paper is concerned with establishing a lower bound of the WL-dimension of a query. Given any conjunctive query with semantic extension width , we consider a graph of treewidth obtained from the Gaifman graph of by repeatedly cloning the vertices corresponding to existentially quantified variables. Using a modification due to Fürer (ICALP 2001) of the Cai-Fürer-Immerman construction (Combinatorica 1992), we then obtain a pair of graphs ( ) and ˆ( ) that are indistinguishable by the ( − 1)- dimensional WL-algorithm since has treewidth . Finally, in the technical heart of the paper, we show that has a different number of answers in ( ) and ˆ( ). Thus, can distinguish two graphs that cannot be distinguished by the ( − 1)-dimensional WL-algorithm, so the WL-dimension of is at least

    All You Need Is CONSTRUCT

    Get PDF
    In SPARQL, the query forms SELECT and CONSTRUCT have been the subject of several studies, both theoretical and practical. However, the composition of such queries and their interweaving when forming involved nested queries has not yet received much interest in the literature. We mainly tackle the problem of composing such queries. For this purpose, we introduce a language close to SPARQL where queries can be nested at will, involving either CONSTRUCT or SELECT query forms and provide a formal semantics for it. This semantics is based on a uniform interpretation of queries. This uniformity is due to an extension of the notion of RDF graphs to include isolated items such as variables. As a key feature of this work, we show how classical SELECT queries can be easily encoded as a particular case of CONSTRUCT queries

    The Logic of Counting Query Answers

    Full text link
    We consider the problem of counting the number of answers to a first-order formula on a finite structure. We present and study an extension of first-order logic in which algorithms for this counting problem can be naturally and conveniently expressed, in senses that are made precise and that are motivated by the wish to understand tractable cases of the counting problem

    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

    On foundational aspects of RDF and SPARQL

    Get PDF
    We consider the recommendations of the World Wide Web Consortium (W3C) about the Resource Description Framework (RDF) and the associated query language SPARQL. We propose a new formal framework based on category theory which provides clear and concise formal definitions of the main basic features of RDF and SPARQL. We propose to define the notions of RDF graphs as well as SPARQL basic graph patterns as objects of some nested categories. This allows one to clarify, in particular, the role of blank nodes. Furthermore, we consider basic SPARQL CONSTRUCT and SELECT queries and formalize their operational semantics following a novel algebraic graph transformation approach called POIM

    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