<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>On the Hardness of Counting the Solutions of SPARQL Queries?</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Reinhard Pichler</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Sebastian Skritek</string-name>
          <email>skritekg@dbai.tuwien.ac.at</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Vienna University of Technology, Faculty of Informatics</institution>
        </aff>
      </contrib-group>
      <abstract>
        <p>Counting, i.e. deriving the number of answers to a query, is a central feature of every query formalism | take for example the existence of a count() aggregate function in basically every major query language. For SPARQL, the W3C Recommendation for a dedicated query language for RDF data, aggregate functions have been introduced recently [15, 8]. However, despite the ever growing importance of SPARQL, with few exceptions [12, 1, 10], the counting problem for SPARQL queries has remained unexplored so far. The goal of this work is to initiate a systematic analysis of the complexity of counting the solutions of SPARQL queries. Towards this goal, we start by considering an important core fragment of the language, which extends (Unions of) Conjunctive Queries ((U)CQs) by the optional matching feature. This important feature of SPARQL, implemented by the OPT-operator, allows to return partial answers. This makes it possible to retrieve meaningful answers even over incomplete data. Regardless of its importance, counting in the presence of OPT has only been touched in [10]. The remaining research has focused on the SPARQL property paths [1, 12], thus being orthogonal to work on the optionality feature. (U)CQs on the other hand are the typical starting point for research on query formalisms. For instance, the counting problem #CQ is well-known to be intractable. However, unlike the decision problem it becomes harder when projection is allowed [2]. Recently, there has been renewed interest in #CQ, revealing interesting deviations between tractable instances for the decision and the counting problem in the presence of union and projection [3, 14, 5, 6]. We thus consider the SPARQL fragment of well-designed graph patterns [13], extended by projection. This fragment can be considered as an extension of UCQs by the OPT-operator while forbidding certain variable occurrences. Like UCQs in the relational case, well-designed graph patterns not only provide an ideal starting point for research, but constitute an interesting fragment of SPARQL on their own. However, the extension by the OPT-operator imposes new challenges compared to plain (U)CQs. For example, for many fragments containing the OPT-operator, several typical problems studied for query languages become harder (e.g. evaluation, enumeration, testing containment and equivalence). Moreover, even in cases where the complexity remains unchanged, the problems require much more involved algorithms [13, 10].</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>S
;
f[g
f g
f[; g</p>
      <p>
        (
        <xref ref-type="bibr" rid="ref3">3</xref>
        )
#P-c. [10]
      </p>
      <p>#P-c.
# NP-c.
# NP-c.</p>
      <p>
        (
        <xref ref-type="bibr" rid="ref4">4</xref>
        )
in FP
#P-c.
#P-c.
#P-c.
      </p>
      <p>
        (
        <xref ref-type="bibr" rid="ref5">5</xref>
        )
in FP
#P-c.
#P-c.
#P-c.
      </p>
      <p>The main contribution of this paper is a detailed complexity analysis
of the counting problem for various fragments of well-designed graph patterns.
Guided by the experience from #CQ that projection and union have a severe
impact on the complexity, we consider the following classes of queries. The core
language consists of well-designed graph patterns containing only the AND- and
OPT-operator, while UNION and projection are considered as extensions. We
use wdSPARQL[S] to denote the class of queries from the core language extended
by the features from S f[; g: [ to denotes UNION and projection.</p>
      <p>Since in the general case, the complexity turns out to be rather high, we look
for tractable fragments by considering various restrictions on the structure of the
graph patterns (as described in the next section). Our results are summarized
in Table 1, with #wdSPARQL[S] denoting the counting problem for a query
from wdSPARQL[S], and \c." to abbreviate \completeness". Overall, our results
suggest that the count operator makes SPARQL evaluation signi cantly harder.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Problem De nitions and Counting Classes</title>
      <p>Following [13], we consider RDF triples as tuples in U3, where U is an in nite
set of URIs. An RDF graph is a nite set of RDF triples. The active domain
dom(G) U of an RDF graph G is the set of URIs appearing in G.
Well-Designed Graph Patterns. Graph patterns (GPs) form the core of
SPARQL. We next formalize (following [13]) the class of well-designed graph
patterns (wdGPs) as considered in this paper. Let V be an in nite set of
variables with U \ V = ;. A SPARQL triple pattern (TP) is a tuple in (U [ V)3. A
conjunctive pattern is either a TP or a pattern (P1 AND P2) where P1; P2 are
conjunctive patterns. An optional pattern is either a conjunctive pattern or a
pattern (P1 OPT P2) where P1; P2 are optional patterns. An optional pattern P
is well-designed if for every subpattern P 0 = (P1 OPT P2) of P , every variable
that occurs in P2 and outside P 0 also occurs in P1. A well-designed graph
pattern (wdGP) is either a well-designed optional pattern or a pattern of the form
P1 UNION : : : UNION Pn where each Pi is a well-designed optional pattern. For
a wdGP P we refer to the conjunctive subpatterns of P as \the conjunctions of
P ". We note that we actually de ned the class of wdGP in OPT normal form
only. However, observe that every wdGP is equivalent to one in OPT normal
form [13]. We refer to [13] for further information.</p>
      <p>
        We write vars(P ) to denote the set of variables occurring in a GP P . Two
variable mappings 1 and 2 are compatible (
        <xref ref-type="bibr" rid="ref12">1 2</xref>
        ) if they agree on the
shared variables. The semantics of evaluating a GP P over an RDF graph G is
a set of variable mappings JP KG that is de ned recursively as [13]:
1. JtKG = f : vars(t) ! dom(G) j (t) 2 Gg for a triple pattern t.
2. JP1 AND P2KG = f 1 [ 2 j 1 2 JP1KG; 2 2 JP2KG; and 1 2g.
3. JP1 OPT P2K:G: :=UJPN1IOANNDPnPKG2K=G [Snf 1 2 JP1KG j 8 2 2 JP2KG : 1 6 2g.
4. JP1 UNION i=1JPiKG.
fThjeXrjesul2t oJPfpKrGogj,ecwtihnegrea GjXP dPentootaessetthXeroesftvraicrtiaiobnleosfis dteo nthede vaasrJi(aPb;leXs )iKnGX=.
We thus consider projection as a result modi er on top of a GP. Finally, note
that, as usual [13, 10, 5, 14], we consider set semantics instead of bag semantics.
      </p>
      <p>We can now formalize the classes wdSPARQL[S] of GPs studied in this article
(with S f[; g). S = ; denotes the (well-designed) optional patterns which
may be extended by union (if [ 2 S) and/or by projection (if 2 S).
Counting Problem. Formally, we study the problem #wdSPARQL[S]:</p>
      <p>
        INSTANCE: P 2 wdSPARQL[S], RDF graph G; QUESTION: jJP KGj?
Restrictions on GPs. It remains to describe the settings in columns (
        <xref ref-type="bibr" rid="ref1">1</xref>
        ){(
        <xref ref-type="bibr" rid="ref5">5</xref>
        )
of Table 1. Case (
        <xref ref-type="bibr" rid="ref1">1</xref>
        ) is the general case, i.e. GPs from wdSPARQL[S] without
further restrictions. Looking for fragments with a lower complexity, we start by
investigating how tractable fragments of #CQ { i.e. acyclicity [16] and quanti ed
star-size [6] (whose de nitions naturally carry over) { behave in our setting.
      </p>
      <p>A CQ (and also a set of triple patterns) is acyclic i it has a join tree [7]. In
the presence of projection however, the existence of a join tree does not guarantee
tractability for the counting problem. The idea behind quanti ed star-size is to
divide the atoms in the query into certain components, and to replace each of
these components by a new atom only containing free variables. In addition, a
new relation for each of these atoms is introduced. The star-size basically denotes
the maximal number of \input" relations that need to be joined in order to get
these new relations, and thus bounds their size.</p>
      <p>
        Case (
        <xref ref-type="bibr" rid="ref2">2</xref>
        ), already described in [10], assumes that counting can be done
efciently for every conjunction P 0 in the GP. I.e., without projection the set of
triple patterns for P 0 is assumed to be acyclic, while for queries with projection
in addition also bounded quanti ed star-size is assumed. Case (
        <xref ref-type="bibr" rid="ref3">3</xref>
        ) assumes in
addition that the same properties are satis ed by the set of all TPs occurring
in the GP. Since this does not give tractability, case (
        <xref ref-type="bibr" rid="ref4">4</xref>
        ) assumes the number of
variables in each conjunction to be bounded by some constant (without
imposing any additional constraints). This is further strengthened in case (
        <xref ref-type="bibr" rid="ref5">5</xref>
        ) where
every conjunct must consist of a single TP only and in addition the set of all
TPs occurring in the GP is from a tractable fragment of #CQ (like in (
        <xref ref-type="bibr" rid="ref3">3</xref>
        )).
Counting complexity. Counting problems can be presented using a witness
function R which for every input x returns a set R(x) of witnesses for x.
According to [9], if C is a complexity class of decision problems, we de ne # C as
the class of all counting problems whose witness function R satis es the following
conditions: (
        <xref ref-type="bibr" rid="ref1">1</xref>
        ) there is a polynomial p(n) s.t. for every x and every y 2 R(x) we
have jyj p(jxj); (
        <xref ref-type="bibr" rid="ref2">2</xref>
        ) the problem \given x and y, is y 2 R(x)?" is in C. For #P
{ the best known counting complexity class { we have #P = # P. Moreover,
the inclusions FP #P # NP # coNP # 2P hold [9].
      </p>
    </sec>
    <sec id="sec-3">
      <title>Main Results</title>
      <p>
        We next discuss the results presented in Table 1 in more detail. Of course it is
not necessary to prove the entry in every cell separately: Clearly, membership
carries over from #wdSPARQL[S2] to #wdSPARQL[S1] whenever S1 S2,
while hardness follows along the other direction. Concerning the di erent cases
(
        <xref ref-type="bibr" rid="ref1">1</xref>
        ){(
        <xref ref-type="bibr" rid="ref5">5</xref>
        ), in general, hardness carries over to cases with a lower number, while
membership also holds for settings with higher numbers. The only exception
here is that (
        <xref ref-type="bibr" rid="ref2">2</xref>
        ) and (
        <xref ref-type="bibr" rid="ref3">3</xref>
        ) are incomparable with (
        <xref ref-type="bibr" rid="ref4">4</xref>
        ), i.e. no results carry over
between these cases. We note that all hardness results provided in this paper
are w.r.t. subtractive reductions, which have been identi ed as a suitable tool
for showing hardness for classes beyond #P [4].
      </p>
      <p>
        Counting in the general setting. We start with presenting the complexity in
the general case (column (
        <xref ref-type="bibr" rid="ref1">1</xref>
        )). For #wdSPARQL[;], the complexity was already
classi ed in [10]. Membership for #wdSPARQL[[] follows from [13, Corollary
4.9], where the corresponding decision problem was shown to be in coNP.
Corollary 1. #wdSPARQL[f[g] is # coNP-complete.
      </p>
      <p>Analogously to the behaviour of CQs, allowing for projection increases the
complexity of the problem. Intuitively, the reason for this is that verifying if
some variable mapping is indeed a solution now requires to identify a suitable
witness on the existential variables rst.</p>
      <p>Theorem 1. The problems #wdSPARQL[f[; g] and #wdSPARQL[f g] are
# 2P -complete.</p>
      <p>The membership follows from the 2P -completeness of the corresponding
decision problem, which can be achieved by an extension of [11, Theorem 6.6]. The
hardness already holds for GPs containing a single OPT-operator. The main
idea of the subtractive reduction (from # 2SAT [4]) is to use partial answers
to distinguish between satisfying and unsatisfying truth assignments: The rst
query returns one answer for every possible truth assignment (partial if
satisfying, complete otherwise). The other query only returns the complete answers for
the unsatisfying assignments. The subtraction thus gives the required solutions.</p>
      <p>
        These results show that counting is highly intractable. Next we thus consider
the in uence of the restrictions (
        <xref ref-type="bibr" rid="ref2">2</xref>
        ){(
        <xref ref-type="bibr" rid="ref5">5</xref>
        ) on the complexity of the problem.
Complexity of the restricted cases. The rst presumably easier case, (
        <xref ref-type="bibr" rid="ref2">2</xref>
        ),
was actually already considered in [10] for #wdSPARQL[;]. There it was shown
that although the problem becomes easier, it remains intractable. An inspection
of the hardness proof provided in [10] reveals that the constructed GPs already
satisfy the additional restriction from case (
        <xref ref-type="bibr" rid="ref3">3</xref>
        ), leading to the following result.
Theorem 2 ([10]). Assume that we only consider GPs where each conjunct is
acyclic. Then #wdSPARQL[;] is #P-complete. It remains #P-hard even if in
addition the set of all triple patterns occurring in the GP is acyclic.
      </p>
      <p>A di erent approach is to restrict the number of variables that are allowed
to occur within each conjunct. This allows one to e ciently enumerate all the
answers for every conjunct. These local solutions can then be used to compute
the overall number of solutions by a traversal of the GP in the style of the
Yannakakis algorithm for acyclic CQs [16].
Theorem 3. #wdSPARQL[;] is in polynomial time if the number of variables
in every conjunction of the graph pattern is bounded by some constant k.</p>
      <p>
        Adding UNION does not change the complexity of the corresponding decision
problem. For the #P-hard cases (
        <xref ref-type="bibr" rid="ref2">2</xref>
        ) and (
        <xref ref-type="bibr" rid="ref3">3</xref>
        ), the complexity of #wdSPARQL[;]
thus carries over to #wdSPARQL[f[g]. However, tractability is no longer given
for (
        <xref ref-type="bibr" rid="ref4">4</xref>
        ) and (
        <xref ref-type="bibr" rid="ref5">5</xref>
        ). Intuitively, the hardness stems from the problem of detecting
duplicate answers returned by di erent disjuncts (since we assume set-semantics).
Proposition 1. Assume that we only consider GPs where every conjunction is
acyclic. Then #wdSPARQL[f[g] is in #P.
      </p>
      <p>Theorem 4. Assume that we only consider GPs without AND operator and
such that the set of all triple patterns occurring in a GP is acyclic. Then
#wdSPARQL[f[g] is #P-hard.</p>
      <p>
        Also for the settings with projection, all membership results can be derived
via the corresponding decision problem. For case (
        <xref ref-type="bibr" rid="ref2">2</xref>
        ) of #wdSPARQL[f g], the
NP-membership of the decision problem was already shown in [11, Theorem 6.7].
Proposition 2. Assume that we only consider GPs where each conjunction is
acyclic. Then #wdSPARQL[f[; g] is in # NP.
      </p>
      <p>The main reason for the #P-membership in the next result is again that the set of
answers to each conjunct can be e ciently computed. However, since projection
may introduce duplicates, this no longer leads to a tractable counting algorithm.
Theorem 5. Assume that we only consider GPs where the number of variables
within each conjunction is bounded by some constant k. Then
#wdSPARQL[f[; g] is in #P.</p>
      <p>
        One of the obstacles for showing hardness (which is required for the cases (
        <xref ref-type="bibr" rid="ref3">3</xref>
        ) and
(
        <xref ref-type="bibr" rid="ref5">5</xref>
        )) is that the set of all triple patterns occurring in the query has to be acyclic
and of bounded quanti ed star-size. This is achieved by using the optionality
feature to simulate an if/then/else behaviour by which we make sure that the
output variables never share a triple pattern with any other variable. This has
the e ect that certain variables in the GP are never part of the same answer.
This way of circumventing an unbounded star-size is not possible in CQs.
Theorem 6. Assume that we only consider GPs where both, every conjunction
as well as the set of all triple patterns in the GP are acyclic and have a quanti ed
star-size of one. Then #wdSPARQL[f g] is # NP-hard.
      </p>
      <p>Theorem 7. Assume that we only consider GPs that do not contain the
ANDoperator and where in addition the set of all triple patterns is acyclic and has a
quanti ed star-size of one. Then #wdSPARQL[f g] is #P-hard.
Intuitively, the di erent complexities in these two settings stem from the fact
that with a limited number of variables in each conjunct, it is not possible to
propagate information arbitrarily throughout the complete query. Instead, every
conjunct is restricted to some \local" information.
Our study of the counting problem for well-designed graph patterns reveals that
counting in the presence of the OPT-operator is signi cantly harder than for
CQs. First, the complexity rises in the general cases. Second, structural
parameters that allow for e cient counting for CQs are not su cient any more:
Restrictions based on these properties decrease the complexity, but do not lead to
tractability. Third, even quite restrictive assumptions (like forbidding the AND
operator) only lead to tractability for queries without UNION and projection.</p>
      <p>Our results thus suggest that future work comprising the search for tractable
fragments is a very interesting and probably challenging task. One possibility
would be to look for suitable adaptations of parameters like quanti ed star-size
to the OPT-operator: The hardness proofs of our results suggest that the current
de nition of star-size is not suited to deal with all possibilities of partial answers.
Other lines of research include restrictions on the nesting structure of OPT.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>M.</given-names>
            <surname>Arenas</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Conca</surname>
          </string-name>
          , and
          <string-name>
            <given-names>J.</given-names>
            <surname>Perez</surname>
          </string-name>
          .
          <article-title>Counting beyond a yottabyte, or how SPARQL 1.1 property paths will prevent adoption of the standard</article-title>
          .
          <source>In Proc. WWW</source>
          , pages
          <volume>629</volume>
          {
          <fpage>638</fpage>
          . ACM,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>M.</given-names>
            <surname>Bauland</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Chapdelaine</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Creignou</surname>
          </string-name>
          , M. Hermann, and
          <string-name>
            <given-names>H.</given-names>
            <surname>Vollmer</surname>
          </string-name>
          .
          <article-title>An algebraic approach to the complexity of generalized conjunctive queries</article-title>
          .
          <source>In SAT 2004 - Revised Selected Papers</source>
          , volume
          <volume>3542</volume>
          <source>of LNCS</source>
          , pages
          <volume>30</volume>
          {
          <fpage>45</fpage>
          . Springer,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>V.</given-names>
            <surname>Dalmau</surname>
          </string-name>
          and
          <string-name>
            <given-names>P.</given-names>
            <surname>Jonsson</surname>
          </string-name>
          .
          <article-title>The complexity of counting homomorphisms seen from the other side</article-title>
          .
          <source>Theo. Comp. Sci.</source>
          ,
          <volume>329</volume>
          (
          <issue>1-3</issue>
          ):
          <volume>315</volume>
          {
          <fpage>323</fpage>
          ,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>A.</given-names>
            <surname>Durand</surname>
          </string-name>
          , M. Hermann, and
          <string-name>
            <given-names>P. G.</given-names>
            <surname>Kolaitis</surname>
          </string-name>
          .
          <article-title>Subtractive reductions and complete problems for counting complexity classes</article-title>
          .
          <source>Theo. Comp. Sci.</source>
          ,
          <volume>340</volume>
          (
          <issue>3</issue>
          ):
          <volume>496</volume>
          {
          <fpage>513</fpage>
          ,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>A.</given-names>
            <surname>Durand</surname>
          </string-name>
          and
          <string-name>
            <given-names>S.</given-names>
            <surname>Mengel</surname>
          </string-name>
          .
          <article-title>Structural tractability of counting of solutions to conjunctive queries</article-title>
          .
          <source>In Proc. ICDT</source>
          , pages
          <volume>81</volume>
          {
          <fpage>92</fpage>
          . ACM,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>A.</given-names>
            <surname>Durand</surname>
          </string-name>
          and
          <string-name>
            <given-names>S.</given-names>
            <surname>Mengel</surname>
          </string-name>
          .
          <article-title>The complexity of weighted counting for acyclic conjunctive queries</article-title>
          .
          <source>J. Comput. Syst. Sci.</source>
          ,
          <volume>80</volume>
          (
          <issue>1</issue>
          ):
          <volume>277</volume>
          {
          <fpage>296</fpage>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>R.</given-names>
            <surname>Fagin</surname>
          </string-name>
          .
          <article-title>Degrees of acyclicity for hypergraphs and relational database schemes</article-title>
          .
          <source>J. ACM</source>
          ,
          <volume>30</volume>
          (
          <issue>3</issue>
          ):
          <volume>514</volume>
          {
          <fpage>550</fpage>
          ,
          <year>1983</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>S.</given-names>
            <surname>Harris</surname>
          </string-name>
          and
          <string-name>
            <given-names>A.</given-names>
            <surname>Seaborne</surname>
          </string-name>
          .
          <source>SPARQL 1</source>
          .1
          <string-name>
            <given-names>Query</given-names>
            <surname>Language. W3C Working</surname>
          </string-name>
          <string-name>
            <surname>Draft</surname>
          </string-name>
          , W3C, Jan.
          <year>2012</year>
          . http://www.w3.org/TR/sparql11-query/.
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <given-names>L. A.</given-names>
            <surname>Hemaspaandra</surname>
          </string-name>
          and
          <string-name>
            <given-names>H.</given-names>
            <surname>Vollmer</surname>
          </string-name>
          .
          <article-title>The satanic notations: counting classes beyond #P and other de nitional adventures</article-title>
          .
          <source>SIGACT News</source>
          ,
          <volume>26</volume>
          (
          <issue>1</issue>
          ):2{
          <fpage>13</fpage>
          ,
          <year>1995</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <given-names>A.</given-names>
            <surname>Letelier</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Perez</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Pichler</surname>
          </string-name>
          , and
          <string-name>
            <given-names>S.</given-names>
            <surname>Skritek</surname>
          </string-name>
          .
          <article-title>Static analysis and optimization of semantic web queries</article-title>
          .
          <source>In Proc. PODS</source>
          , pages
          <volume>89</volume>
          {
          <fpage>100</fpage>
          . ACM,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <given-names>A.</given-names>
            <surname>Letelier</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Perez</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Pichler</surname>
          </string-name>
          , and
          <string-name>
            <given-names>S.</given-names>
            <surname>Skritek</surname>
          </string-name>
          .
          <article-title>Static analysis and optimization of semantic web queries</article-title>
          .
          <source>ACM Trans. Database Syst</source>
          .,
          <volume>38</volume>
          (
          <issue>4</issue>
          ):
          <fpage>25</fpage>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <given-names>K.</given-names>
            <surname>Losemann</surname>
          </string-name>
          and
          <string-name>
            <given-names>W.</given-names>
            <surname>Martens</surname>
          </string-name>
          .
          <article-title>The complexity of evaluating path expressions in SPARQL</article-title>
          .
          <source>In Proc. PODS</source>
          , pages
          <volume>101</volume>
          {
          <fpage>112</fpage>
          . ACM,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>J. Perez</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Arenas</surname>
            , and
            <given-names>C.</given-names>
          </string-name>
          <string-name>
            <surname>Gutierrez</surname>
          </string-name>
          .
          <article-title>Semantics and complexity of SPARQL</article-title>
          .
          <source>ACM Trans. Database Syst</source>
          .,
          <volume>34</volume>
          (
          <issue>3</issue>
          ),
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <given-names>R.</given-names>
            <surname>Pichler</surname>
          </string-name>
          and
          <string-name>
            <given-names>S.</given-names>
            <surname>Skritek</surname>
          </string-name>
          .
          <article-title>Tractable counting of the answers to conjunctive queries</article-title>
          .
          <source>J. Comput. Syst. Sci.</source>
          ,
          <volume>79</volume>
          (
          <issue>6</issue>
          ):
          <volume>984</volume>
          {
          <fpage>1001</fpage>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15. E. Prud0hommeaux and
          <string-name>
            <given-names>A.</given-names>
            <surname>Seaborne. SPARQL Query</surname>
          </string-name>
          <article-title>Language for RDF. W3C Recommendation, W3C</article-title>
          , Jan.
          <year>2008</year>
          . http://www.w3.org/TR/rdf-sparql-query/.
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <given-names>M.</given-names>
            <surname>Yannakakis</surname>
          </string-name>
          .
          <article-title>Algorithms for acyclic database schemes</article-title>
          .
          <source>In Proc. VLDB</source>
          <year>1981</year>
          , pages
          <fpage>82</fpage>
          {
          <fpage>94</fpage>
          . IEEE Computer Society,
          <year>1981</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>