## Section: New Results

### Processing Conjunctive Queries with Negation

Participants : Marie-Laure Mugnier, Michel Leclère, Khalil Ben Mohamed, Michaël Thomazo.

Conjunctive queries have long been recognized as the basic queries in database and knowledge-based systems. The fundamental decision problems on these queries, namely query inclusion checking (given two queries ${q}_{1}$ and ${q}_{2}$, is ${q}_{1}$ included in ${q}_{2}$, i.e., is the set of answers to ${q}_{1}$ included in the set of answers to ${q}_{2}$ for all databases) and query entailment (is a given query entailed by the database) are NP-complete. When atomic negation is added to queries and databases, these problems become ${\Pi}_{2}^{P}$-complete (with the open world assumption for the query entailment problem). Note that these problems can be recast as entailment in the FOL fragment of existentially closed conjunction of literals (without function symbols except constants). On the one hand, we have led a theoretical complexity study: we have investigated the role of pairs of literals called “exchangeable” (which generalizes the notion of unifiable literals) in the complexity increase. The main results are that when the number of exchangeable pairs is bounded, say by $k$, then the complexity falls from ${\Pi}_{2}^{P}$-complete to ${P}_{\left|\right|}^{NP}$-complete for any $k\ge 3$, and is NP-complete for $k\le 1$ (the case $k=2$ being open).

**In collaboration with:** Geneviève Simonet (LIRMM Algeco team)

- $\u22b3\phantom{\rule{3.33333pt}{0ex}}$
*Research Report [65] . Long version accepted at*Information and Computation*.*

On the other hand, we have proposed, refined and compared experimentally several algorithms. This study follows first results of us in [61] and is the core of Khalil Ben Mohamed's PhD thesis defended in December 2010 [64] .

- $\u22b3\phantom{\rule{3.33333pt}{0ex}}$
*Results published DEXA 2011 [24] (extending our work in RFIA 2010 [48] , DEXA 2010 [46] , AIMSA 2010 [47] ).*

Let us point out that both theoretical and practical results still hold when the predicates are preordered, which allows to take very light ontologies into account, i.e., where concepts and relations are organized in a specialization preorder.