Reasoning about Explanations for Negative Query Answers in DL-Lite

In order to meet usability requirements, most logic-based applications provide explanation facilities for reasoning services. This holds also for Description Logics, where research has focused on the explanation of both TBox reasoning and, more recently, query answering. Besides explaining the presence of a tuple in a query answer, it is important to explain also why a given tuple is missing. We address the latter problem for instance and conjunctive query answering over DL-Lite ontologies by adopting abductive reasoning; that is, we look for additions to the ABox that force a given tuple to be in the result. As reasoning tasks we consider existence and recognition of an explanation, and relevance and necessity of a given assertion for an explanation. We characterize the computational complexity of these problems for arbitrary, subset minimal, and cardinality minimal explanations.


Introduction
Ontology-based data access (OBDA) systems are a new form of information systems that use an ontology, a set of logical constraints, to mediate the access to data.The role of the ontology in an OBDA system is twofold.On the one hand, it is an intermediate layer between the domain user and the physical data providing a unified view of the information held in the various data sources.In many cases, the ontology extends the data vocabulary by introducing new intensional predicates that can be used to query information in a more succinct and declarative way.On the other hand, the ontology provides constraints, which are taken into account while answering queries and which may contribute to enrich the obtained answers.Hence, potentially relevant implicit knowledge that can be derived from the data, plus the ontology, can be made explicit by using specifically tailored reasoning algorithms.Most existing OBDA systems are based on the DL-Lite family of lightweight Description Logics (DLs), introduced by Calvanese, De Giacomo, Lembo, Lenzerini, and Rosati (2007), which is also the basis for the QL profile of the OWL 2 ontology language (Motik, Fokoue, Horrocks, Wu, Lutz, & Grau, 2009).
As argued by McGuinness and Patel-Schneider (1998), in order to meet usability requirements set by domain users, knowledge-based systems should be equipped with explanation algorithms for reasoning services.This holds also for Description Logics, where c 2013 AI Access Foundation.All rights reserved.
research has focused on the explanation of TBox reasoning (cf., McGuinness & Borgida, 1995;Borgida, Franconi, & Horrocks, 2000;Penaloza & Sertkaya, 2010;Horridge, Parsia, & Sattler, 2008).Additionally, Borgida, Calvanese, and Rodriguez-Muro (2008) studied the problem of explaining positive query answers to conjunctive queries over DL-Lite ontologies.In particular, they outlined a procedure for computing the reasons for a tuple to be in the answer to a query, and for minimizing the corresponding explanation shown to the user.In addition, Borgida et al. (2008) suggested that OBDA systems, besides explaining positive query answers, should also explain negative query answers; that is, those tuples that a user expects to be in the result but actually do not occur there.As OBDA systems answer queries under ontological constraints, explaining negative query answers is not trivial: these constraints need to be taken into account to understand why a required tuple is missing from the answers.A procedure for explaining negative query answers would then improve the usability of OBDA systems.
For this reason, we formalize this explanation problem in the context of query answering over DL ontologies.Following Eiter and Gottlob (1995), we adopt abductive reasoning; that is, explanations are set of facts that need to be asserted in the ABox to force the required tuple to be in the result.Such explanations help users in debugging a negative answer by giving an effective way of repairing the OBDA system in terms of updates to the data layer.Since ontologies can be used to enrich the data vocabulary, we consider also restrictions to the vocabulary over which the additional assertions can be constructed.More precisely, given a DL TBox T , an ABox A, a query q, and a set Σ of predicates, an explanation for a given tuple c is a new ABox E, all whose predicates occur in Σ, such that the answer to q over the ontology T , A ∪ E contains c.According to the Occam's razor principle, an important aspect in explanations is to provide users with solutions that are simple to understand and free of redundancy, hence as small as possible.To address this requirement, we study various restrictions on explanations, in particular, we focus on subset minimal and cardinality minimal ones.We consider standard decision problems associated to logic-based abduction: (i) existence of an explanation, (ii) recognition of a given ABox as being an explanation, and (iii) relevance and (iv) necessity of an ABox assertion-that is, whether it occurs in some or all explanations.At first, the latter two problems may appear rather artificial, however, they provide valuable information to the user when debugging negative answers.Relevance can be used to test whether an assertion the user deems related to the negative answer is indeed so; whereas, necessity can be used to test whether an assertion is intrinsically related to the negative answer.
The idea of restricting the vocabulary of explanations is an adaptation of a concept introduced by Baader, Bienvenu, Lutz, and Wolter (2010), who study among others the query emptiness problem.That is, given a query q over a TBox T decide whether for all ABoxes A over a given signature Σ, we have that evaluating q over T , A leads to an empty result.In Section 3, we shall see that in our framework deciding the existence of an explanation relates to the query non-emptiness problem.In fact, for many DLs, deciding whether a query is non-empty w.r.t. a TBox reduces to checking whether there exists an explanation for a missing answer.
The purpose of this paper is to shed light on the computational complexity of explaining missing answers to queries over ontologies formulated in DL-Lite A -an expressive member of the DL-Lite family of DLs.To this end, we consider two important classes of queries-that is, instance queries and unions of conjunctive queries (UCQs)-and we provide computational complexity results for the four decision problems defined above.Moreover, we perform our complexity analysis under two different explanation settings.We consider the case in which the explanation vocabulary is a strict subset of the vocabulary of the ontology and the data, as well as the case in which explanations can be constructed over arbitrary predicates.In Section 4, we show that when we consider instance queries as input, the relevant decision problems are NL-complete, irrespective of the chosen explanation setting and of the particular minimality criterion applied over explanations.In Section 5, we analyze the complexity of the problem when we admit UCQs as input, and we show that the complexity varies with respect to both the chosen explanation setting and the minimality criterion.Our complexity results for UCQs are summarized in Table 5.1.

Preliminaries
In this section, we first introduce ontologies formulated in DLs, with a particular focus on the DL DL-Lite A .We then introduce the languages for querying ontologies that we consider, and we recall some important properties of DL-Lite A that will be used throughout the paper.Finally, we briefly present some of the less known complexity classes that will be mentioned later.

Description Logic Ontologies
As usual in DLs, we consider countably infinite sets N C , N R , and N I of atomic concepts, atomic roles, and individuals, respectively.Whenever the distinction between atomic concepts and roles is immaterial, we call an element of N C ∪ N R a predicate.
A DL TBox T is a finite set of axioms, whose form depends on the specific DL being considered; for DL-Lite A , the DL adopted in this paper, the definition is given below.A DL ABox A is a finite set of ABox assertions, which are expressions of the form A(c) or P (c, d), where A is an atomic concept, P is an atomic role, and c and d are individuals.A DL ontology is a pair O = T , A , where T is a DL TBox and A is a DL ABox.
The semantics of DL ontologies is based on first-order interpretations I = ∆ I , • I , where ∆ I is a non-empty set called the domain and • I is the interpretation function mapping each individual c ∈ N I to an object c I ∈ ∆ I , each atomic concept A ∈ N C to a set A I ⊆ ∆ I , and each atomic role P ∈ N R to a binary relation An interpretation I satisfies an ABox assertion A(c) if c I ∈ A I , and it satisfies an assertion P (c, d) if c I , d I ∈ P I .Satisfaction of TBox axioms is also defined according to their form in each specific DL; we define it below for DL-Lite A .An interpretation I is a model of T , A , if it satisfies all the axioms in T and all the assertions in A. We call T , A consistent if it admits at least one model, and inconsistent otherwise.Also, an ABox A is consistent with a TBox T if the ontology T , A is consistent.

DL-Lite A
DL-Lite A is a member of the DL-Lite family of DLs (Calvanese et al., 2007;Calvanese, De Giacomo, Lembo, Lenzerini, Poggi, Rodriguez-Muro, & Rosati, 2009), which has been designed for dealing efficiently with large amounts of extensional information.In DL-Lite A , concept expressions (or, concepts) C, denoting sets of objects, and role expressions (or, roles) R, denoting binary relations between objects, are formed according to the following syntax, where A denotes an atomic concept and P an atomic role.1 A DL-Lite A TBox consists of axioms of the following form.
Axioms in the first column are called positive inclusions (among concepts and roles, respectively), those in the second column disjointness axioms, and those in the third column functionality assertions on roles.In order to retain tractability of reasoning, DL-Lite A TBoxes must satisfy the additional restriction that roles that are functional or inverse functional cannot be specialized.Formally, if a DL-Lite A TBox contains (funct P ) or (funct P − ), then for each role R it does not contain R P or R P − (Calvanese et al., 2007).The semantics of concept expressions is specified as follows. (∃R) Following the common practice for the DLs of the DL-Lite family (Calvanese et al., 2007), we usually adopt the unique name assumption (UNA)-that is, for each interpretation I and individual pair c = d, we require that c I = d I .Whenever we drop this assumption, we will explicitly say so.Under the UNA, the problem of checking whether a DL-Lite A ontology is consistent is NL-complete, whereas without the UNA, the problem becomes PTime-complete (Artale, Calvanese, Kontchakov, & Zakharyaschev, 2009).

Instance Queries and Conjunctive Queries
Let N V be a countably infinite set of variables.Together N I and N V form the set of terms.Expressions of the form A(t) or P (t, t ), where A is an atomic concept, P is an atomic role, and t, t are terms, are called atoms.
A conjunctive query (CQ) q of arity n ≥ 0 is an expression q(x 1 , . . ., x n ) ← a 1 , . . ., a m , where, for each i ∈ {1, . . ., m}, we have that a i is an atom.The tuple x 1 , . . ., x n is the tuple of answer variables of q.Let N V (q) be the set of variables occurring in q, let N I (q) be the set of individuals in q, let at(q) = {a 1 , . . ., a m }, and let |q| be the number of terms occurring in q.We consider safe CQs-that is, each answer variable x i of q occurs in at least one of the atoms of q.A Boolean conjunctive query is a CQ with arity 0, and we shall write it simply as a set of atoms.An instance query q(x) is a conjunctive query whose body consists of a single unary atom A(x).A union of conjunctive queries (UCQ) is a set of CQs of the same arity, and we assume w.l.o.g. that all CQs in a UCQ have the same tuple of answer variables.In the following, we denote with IQ the set of all instance queries and with CQ the set of all UCQs.
A match for an n-ary CQ q in an interpretation I is a mapping π : (ii) π(t) ∈ A I , for each A(t) ∈ at(q), and (iii) π(t), π(t ) ∈ P I , for each P (t, t ) ∈ at(q).
An n-tuple of individuals c 1 , . . ., c n is an answer to q in I, if there exists a match π for q in I such that c I 1 , . . ., c I n = π(x 1 ), . . ., π(x n ) .We let ans(q, I) denote the set of all answers to q in I.A Boolean CQ returns as answer either ∅, representing the value 'false', or the empty tuple , representing the value 'true'.For a UCQ q, we let ans(q, I) = q ∈q ans(q , I).The certain answer to a UCQ q of arity n over ontology T , A is defined as

Query Answering in DL-Lite A
The problem of query answering in DLs is the problem of computing the certain answer to a given query over a given DL ontology.Formulated in this way, query answering is a computation problem and not a decision problem.Since in this paper we are interested in establishing computational complexity results, we identify query answering with its decision problem, sometimes called the recognition problem, in which the input is constituted by a DL ontology T , A , a query q( x), and a tuple c of arity | x|, and the task is to determine whether c ∈ cert(q, T , A).In the special case of instance queries, this problem is also known as instance checking.Notice that, since we consider both the ontology and the query as part of the input, we are considering so-called combined complexity (Vardi, 1982).
In many DLs, instance checking can be reduced to the problem of deciding ontology consistency.This holds also for DL-Lite A and, thus, answering an instance query can be done in nondeterministic logarithmic space.In contrast, the problem of answering a UCQ (and hence a CQ) q over a DL-Lite A ontology T , A can be solved in nondeterministic polynomial time by adopting a pure query rewriting approach (Calvanese et al., 2007(Calvanese et al., , 2009)).This technique works in two steps.In the first step, we compute the perfect reformulation R q,T of q w.r.t.T -that is, we rewrite the input query q with respect to the TBox T into a UCQ R q,T .In this rewriting step, the portion of the TBox relevant for answering q is compiled into R q,T .In the second step, we simply evaluate the computed rewriting R q,T over the ABox A-seen as a first order interpretation.This is captured by the proposition below, which makes use of the notion of interpretation associated to an ABox, formalized in the following definition.
Definition 2.1.Given an ABox A, let DB A be the interpretation whose domain ∆ DB A is the set of individuals occurring in A, and (i) c DB A = c, for all individuals c occurring in A; (ii) The following proposition summarizes the results about query answering based on rewriting that have been shown for the logics of the DL-Lite family (and for DL-Lite A in particular) and that we will exploit in the following.
Proposition 2.1.(Calvanese et al., 2007(Calvanese et al., , 2009) ) Let T , A be a DL-Lite A ontology, let q be a UCQ, and let max(q) = max q i ∈q |at(q i )|.It is possible to construct a UCQ R q,T , called the perfect reformulation of q w.r.t.T , such that cert(q, T , A) = ans(R q,T , DB A ).
Moreover, R q,T satisfies the following properties.
• All predicates occurring in R q,T occur in T or in q.
• Each q r ∈ R q,T has at most max(q) atoms and at most 2 • max(q) terms.
• If q consists of a single instance query, then each q r ∈ R q,T has only one atom.
• Each q r ∈ R q,T can be obtained in nondeterministic polynomial time in the combined size of T and q. • Deciding whether a given tuple of individuals is in ans(R q,T , DB A ) can also be achieved in nondeterministic polynomial time in the combined size of T and q.

Complexity Theory
We briefly outline the definition of some non-canonical complexity classes used in the paper; for more details, we refer the reader to standard textbooks on computational complexity (e.g., Papadimitriou, 1994).The class Σ P 2 is a member of the Polynomial Hierarchy: it is the class of all decision problems solvable in nondeterministic polynomial time using an NP oracle.The class P NP contains all decision problems that can be solved in polynomial time with an NP oracle, where all oracle calls must be first prepared and then issued in parallel.The class DP contains all problems that, considered as languages, can be characterized as the intersection of a language in NP and a language in coNP.Additionally, the class NL contains all decision problems that can be solved by a nondeterministic Turing machine using a logarithmic amount of space.It is believed that NL ⊆ PTime ⊆ NP ⊆ DP ⊆ P NP ⊆ Σ P 2 is a strict hierarchy of inclusions.Here we make such an assumption.
As usual, we use reductions between problems to infer complexity bounds throughout the paper.Unless stated otherwise, these are all many-one logarithmic space reductions.

Explaining Negative Query Answers
In this section, we formalize as an abductive task the problem of finding explanations for negative answers to queries over DL ontologies.
For a DL TBox T , a DL ABox A, and a query q from IQ ∪ CQ, we let Σ(T , A, q) denote the set of all those predicates that occur in T , A, or q.A signature Σ is a non-empty finite subset of N C ∪ N R .Furthermore, an ABox A is a Σ-ABox if all the assertions in A use only predicates from Σ; that is, if Σ(∅, A, ∅) ⊆ Σ. Definition 3.1.Let T , A be a DL ontology, q( x) a query from IQ ∪ CQ, c a tuple of individuals of arity | x|, and Σ a signature.We call P = T , A, q, c, Σ a Query Abduction Problem (QAP).An explanation for (or, a solution to) P is a Σ-ABox E such that (i) the ontology T , A ∪ E is consistent, and The set of all explanations for P is denoted by expl(P).The predicates in Σ are the ones allowed in explanations, hence we call them abducible predicates.If Σ(T , A, q) ⊆ Σ, we say that P has unrestricted explanation signature; otherwise, if Σ does not contain all symbols in Σ(T , A, q), we say that P has restricted explanation signature.
For such a QAP, we call tuple c a negative answer to q over T , A , if c / ∈ cert(q, T , A).Clearly, query q over ontology T , A admits a negative answer only if T , A is consistent.Also, by condition (i), if the ontology is inconsistent, then P does not admit explanations.
Ontology languages, such as DL-Lite A , which allow for the specification of existential restrictions and negative constraints (e.g., disjointness axioms), sometimes require explanations to introduce fresh individuals that do not occur within the QAP.We next precisely characterize these individuals.Definition 3.2.Let P = T , A, q, c, Σ be a QAP and let E be a solution to P. An arbitrary individual u occurring in E is anonymous if it does not occur in T , A, q, and in c.Now, we use an example to highlight how query abduction problems can be useful in debugging negative query answers.
Example 3.1.Let A u be the following set of assertions about a particular university.T u models that objects in the domain of enroll are Students, and objects in the domain of teach are Lecturers, whereas objects in the range of enroll or of teach are Courses.Among the students we have DPhil students.Finally, every Course must be taught by someone.Now, assume that the university administration is interested in finding all those who are teaching a course in which at least one of the enrolled students is a doctoral student, which is captured by the following query.q u (x) ← teach(x, y), enroll(z, y), DPhil(z) Assume that Carlo is expected to be part of the result.This is not the case, as Luca is the only student of Carlo and he is not known to be a DPhil student.Hence Carlo / ∈ cert(q, T , A) and Carlo is a negative answer.Suppose that we have complete information on all the predicates but enroll and teach-that is, only the latter predicates are abducible.It is easy to see that E u = {teach(Carlo, c), enroll(Beppe, c), enroll(Luca, c)} is an explanation for the QAP P u = T u , A u , q u , Carlo, {enroll, teach} , which suggests the existence of a course, represented by the anonymous individual c, that does not occur in the ABox A u .

DPhil
The above example shows that certain explanations may be too assumptive in that they include assertions that are not required to solve the problem.Indeed, in the example's explanation there is no reason to assume that Luca is enrolled in the anonymous course c.In the following, we will examine various restrictions to expl(P) to reduce redundancy in explanations, achieved by introducing a preference relation among explanations.This relation is reflexive and transitive-that is, we have a pre-order among explanations.For such a pre-order on expl(P), we write E ≺ E if E E and E E.
Definition 3.3.The preferred explanations expl (P) of a QAP P under the pre-order , called -explanations or ( -solutions), are defined as follows.
We consider two preference orders that are commonly adopted when comparing abductive solutions: the subset-minimality order, denoted by ⊆, and the minimum explanation size order, denoted by ≤.The latter order is defined by E ≤ E iff |E| ≤ |E |.Considering that, by the definition, explanations are finite, for an arbitrary QAP P, we have that each ≤-solution to P is also a ⊆-solution to P; that is, expl ≤ (P) ⊆ expl ⊆ (P).
Example 3.2.As we already argued, the ABox E u is a redundant solution to the QAP P u introduced in Example 3.1.Next, we introduce two minimal solutions.First, we consider the solution asserting Carlo to teach an anonymous course c and Beppe to be enrolled in that course.This ABox E u = {teach(Carlo, c), enroll(Beppe, c)} is a ⊆-explanation.Second, we consider the solution asserting Beppe to be enrolled in the IDB course.This ABox E u = {enroll(Beppe, IDB )} is a ≤-explanation (and hence also a ⊆-explanation).
In the context of logic-based abduction, four main decision problems have been considered of interest (Eiter & Gottlob, 1995), and they are parametrized according to the chosen preference order .Definition 3.4.Given a QAP P, an ABox assertion ϕ( d) over abducible predicate ϕ, and an ABox E, we define the following decision problems.
• -exist(ence): Does there exist a -explanation for P?
• -rec(ognition): Is ABox E a -explanation for P? Whenever no preference is applied (i.e., when is the identity), we omit to write in front of the problems' names.
In this paper, we study the complexity of the above reasoning problems for query abduction.We start by highlighting, in the remaining part of this section, interesting properties of query abduction problems and important connections between reasoning tasks.

Reductions between Reasoning Problems
We now show that some of the introduced problems can be reduced to each other.Unless otherwise stated, the reductions we present work for all DLs, for both instance queries and UCQs, and for both restricted and unrestricted explanation signatures.
We start by showing that nec is at least as hard as non-exist (i.e., the complement of the exist problem).
Proposition 3.1.For every DL, non-exist is reducible to nec.
Proof.Assume a QAP P = T , A, q, c, Σ and let ϕ( d) be an arbitrary ABox assertion, such that ϕ and d do not occur in P. The following holds: P has no explanation iff ϕ( d) is necessary for P = T , A, q, c, Σ ∪ {ϕ} .By the construction, it follows that each solution to P is also a solution to P ; furthermore, for each solution E to P , ϕ ∈ Σ(∅, E , ∅) implies that E is a solution to P. By the definition of P and since ϕ and d are globally fresh, for each ABox E, we have that E is an explanation for P if and only if E \ {ϕ( d)} is an explanation for P .The correctness of the reduction immediately follows.
For QAPs with restricted explanation signatures, we next show that nec reduces to non-exist.The reduction works for every DL that allows for disjointness axioms.
Proposition 3.2.For every DL that allows for concept and role disjointness axioms, and under restricted explanation signatures, nec is reducible to non-exist.
Proof.Consider an instance of nec given by a QAP P = T , A, q, c, Σ where Σ might be restricted, and by an ABox assertion ϕ( d).Next, we show how to construct a QAP P such that ϕ( d) is necessary for P iff P does not admit solutions.To this end, let ϕ and φ be two globally fresh predicates of the same arity as ϕ; furthermore, let TBox T , ABox A , and signature Σ be as follows.
Finally, let P := T , A , q, c, Σ .Now, we show the correctness of the reduction; that is, ϕ( d) is necessary for P iff P does not admit solutions.
(⇒) We prove the contrapositive.Suppose that P has a solution E .By the definition of T , A and of Σ , we have that ϕ ( d) ∈ E and that predicate ϕ does not occur in E .Let ABox E be defined as follows.
By the construction, E is a Σ-ABox that does not contain ϕ( d).It remains to show that E is a solution to P. To this end, please observe that each model ) and that q is over T , A , we obtain that c ∈ cert(q, T , A ∪ E).Furthermore, since T , A ∪ E is consistent, we also have that T , A ∪ E is consistent; so E is a solution to P that does not contain assertion ϕ( d), as required.
(⇐) We prove the contrapositive.Suppose that a solution E to P exists such that ϕ( d) ∈ E. Let ABox E be defined as follows.
By the construction, E is a Σ -ABox which does not contain ϕ ( d).It remains to show that E is a solution to P .As we have seen before, T , A ∪ E is a conservative extension of T , A ∪ E .Given that c ∈ cert(q, T , A ∪ E), we obtain that c ∈ cert(q, T , A ∪ E ).Furthermore, since T , A ∪ E is consistent and ϕ ( d) ∈ E , we also have that T , A ∪ E is consistent; so E is a solution to P , as required.
A simple modification of Proposition 3.2 shows that this result applies also to DLs that allow for negative ABox assertions of the form ¬A(c) and ¬P (c, c ) instead of disjointness axioms.We next show that rel and exist are mutually reducible.Proposition 3.3.For every DL, rel and exist are mutually reducible.
Proof.First, we show that we can reduce rel to exist.Let P be an arbitrary QAP of the form T , A, q, c, Σ and let ϕ( d) be an arbitrary ABox assertion such that ϕ ∈ Σ.We construct a QAP P such that ϕ( d) is relevant to P if and only if P admits a solution.To this end, let A be the ABox defined as A = A ∪ {ϕ( d)}.Then, we define QAP P as P = T , A , q, c, Σ .Next, we prove the correctness of the reduction.The only-if direction is immediate.For the if direction, suppose that P admits a solution E .It follows, by the definition of P , that Σ-ABox E ∪ {ϕ( d)} is consistent with TBox T .Moreover, this latter ABox is also a solution to P and, therefore, the given assertion is relevant.
Second, we prove that exist is reducible to rel.Let P be an arbitrary QAP of the form T , A, q, c, Σ , let ϕ be an arbitrary predicate from Σ, and let d be an arbitrary tuple of individuals not occurring in P such that d is of the same arity as predicate ϕ.We prove that P admits a solution iff ϕ( d) is relevant for P. The if direction follows by the definition of relevance.To show the only-if direction, suppose that P admits a solution E. If ϕ( d) occurs in E, it is relevant for P. Otherwise, since individuals d do not occur in P and ϕ ∈ Σ, ABox E ∪ {ϕ( d)} is also a solution to P, and hence ϕ( d) is relevant for P.
Proof.For an arbitrary QAP P and an arbitrary ABox assertion ϕ( d), we have that ϕ( d) occurs in all ⊆-minimal explanations for P iff ϕ( d) occurs in all explanations for P. Thus, nec and ⊆-nec are equivalent problems.
Finally, since our preference orders prefer 'smaller' explanations and, by the definition, explanations are finite, our orders are well-founded.It immediately follows that there exists an explanation for an arbitrary QAP P if and only if P admits a minimal explanation under both our preference orders.

QAPs and the Query Emptiness Problem
As mentioned in the introduction, deciding the existence of an explanation is related to the query emptiness problem studied by Baader et al. (2010).Since we will rely on that problem to infer some complexity bounds throughout the paper, we briefly introduce it here.
Definition 3.5.Let T be a DL TBox, Q ∈ {IQ, CQ} a query language, and Σ a signature.We say that a Q-query q is empty for Σ given T if for every Σ-ABox A that is consistent with T we have that cert(q, T , A) = ∅.Otherwise, we say that q is non-empty for Σ given T .The Q non-emptiness problem consists in deciding, for input T , q, and Σ, whether q is non-empty for Σ given T .
Next, we first show that, for every DL, and for both instance queries and Boolean UCQs, query non-emptiness reduces to exist.Then, we show that for the DL-Lite A case this holds even for arbitrary UCQs.
Proposition 3.6.For every DL and both instance queries and Boolean UCQs, Q nonemptiness is reducible to exist.
Proof.Let T be an arbitrary DL TBox, let q ∈ IQ ∪ CQ be an arbitrary query such that q ∈ CQ implies that q is a Boolean UCQ, and let Σ be an arbitrary signature.We show how to construct a QAP P such that q is non-empty for Σ given T iff P admits a solution.To this end, let c be an arbitrary tuple such that q ∈ CQ implies that c = , and q ∈ IQ implies that c = a where a is a globally fresh individual.Clearly, we have that q is non-empty for Σ given T iff P = T , ∅, q, c, Σ admits a solution.
The relationship between CQ non-emptiness and exist can tightened, when we restrict our attention to DL-Lite A TBoxes.
Proposition 3.7.For DL-Lite A , CQ non-emptiness is reducible to exist.
Proof.Consider a DL-Lite A TBox T , a signature Σ, and this time an n-ary query q ∈ CQ.W.l.o.g., we assume that q is a CQ.Then, we cannot immediately extend the proof given for Boolean CQs by introducing n (distinct) individuals since we might be forced to match distinct answer variables of q to the same individual in an ABox witnessing non-emptiness of q.However, we can adapt the proof to this case as follows.We let N be a fresh atomic concept not occurring in Σ(T , ∅, q)∪Σ.We define Σ = Σ∪{N } and we let q be the Boolean CQ such that at(q ) = at(q) ∪ {N (x 1 ), . . ., N (x n )}.Finally, we let P = T , ∅, q , , Σ be a QAP.In the following, we show that q is non-empty for Σ given T iff P admits a solution.
(⇒) Suppose that q is non-empty for Σ given T .That is, there exists a Σ-ABox A such that T , A is consistent and there exists some n-ary tuple a = a 1 , . . ., a n of individuals such that a ∈ cert(q, T , A).Now, consider the Σ -ABox Since N is a fresh predicate, we have that T , E is a conservative extension of T , A .That is, each model of T , A can be extended to be a model of T , E , and every model of T , E is also a model of T , A .By the assumption that T , A is consistent and that a ∈ cert(q, T , A), we conclude that E is a solution to P.
(⇐) Suppose that P admits a solution E. It follows that T , E is consistent and that for each model I of T , E , there exists a match π for q such that I |= π q .Since N is a fresh predicate not occurring in T and for each answer variable x i of q the atom N (x i ) is contained in q , we have that π(x i ) = a I i for some a i ∈ N I such that N (a i ) ∈ E. It follows that a ∈ cert(q, T , E).Consider the Σ-ABox A obtained from E by removing all the assertions over N ; it immediately follows that T , E is a conservative extension of T , A .Therefore, also a ∈ cert(q, T , A) and, thus, q is non-empty for Σ given T .Proposition 3.7 can be generalized to Horn DLs-that is, to all those DLs for which answering instance and conjunctive queries reduces to evaluating the input query over a single, canonical model of the ontology.It follows that for DL-Lite A and, more in general, for all Horn-DLs, deciding exist generalizes the query non-emptiness problem.Hence, all the hardness results for non-emptiness obtained by Baader et al. (2010) that hold for instance queries and UCQs apply also to the exist problem under restricted explanation signatures.However, since we also consider ABoxes and we require a specific tuple to be in the query answer, the converse does not hold and we can not always transfer their upper bounds to our setting.

Canonical Explanations
Before studying the complexity of reasoning over query abduction problems, we first show that we can restrict the search for explanations.In order to do so, we define the notion of instantiation of a conjunctive query.Definition 3.6.Let q be an n-ary CQ with answer variables x 1 , . . ., x n ; furthermore, let c = c 1 , . . ., c n be a tuple of individuals.Let ξ be a mapping from the terms of q to N I such that ξ is identity over N I and for each answer variable x j of q we have that ξ(x j ) = c j .Then, we call the ABox Given a DL ontology O, if we additionally have that, for each quantified variable y, ξ(y) is a distinct anonymous individual u y not occurring in q and O, then we say that E ξ is direct for O.
Note that in the following we do not distinguish between instantiations that differ only in the assignment of anonymous individuals to variables.Hence, a CQ has only a finite number of distinct instantiations, and a unique direct one.

Unrestricted Explanation Signature
To obtain an explanation for a QAP P with unrestricted explanation signature, we can iterate over the set of all possible instantiations to the input query, searching for one such instantiation that is consistent with the input ontology.In the absence of the UNA, we can even consider one single instantiation of each CQ: the direct instantiation, where all existentially quantified variables are mapped to distinct anonymous individuals.In the presence of the UNA, if our underlying DL is expressive enough to enforce inequalities over the individuals occurring in P (e.g., by means of disjointness axioms), we can again reduce the problem to searching for a CQ whose direct instantiation is consistent with the input ontology, when the UNA is dropped.
Proposition 3.8.Let O = T , A be an arbitrary DL ontology and let P = T , A, q, c, Σ be an arbitrary QAP with unrestricted explanation signature.Furthermore, for each q i ∈ q, let E q i be the direct c-instantiation of q i for O.The following hold: 1.Under the UNA, a solution to P exists iff a c-instantiation E ξ of some q i ∈ q exists such that T , A ∪ E ξ is consistent.
2. Without the UNA, a solution to P exists iff a query q i ∈ q exists such that T , A ∪ E q i is consistent.
3. Furthermore, suppose that the DL supports concept disjointness axioms.Under the UNA, a solution to P exists iff a query q i ∈ q exists such that T , A ∪ E q i is consistent without the UNA, where A and T extend A and T with a quadratic number of assertions and axioms, respectively.
Proof.Consider an arbitrary q i ∈ q and let E ξ be an arbitrary c-instantiation of q i .We first prove that consistency of T , A ∪ E ξ (with or without the UNA) implies that E ξ is a solution to P (with or without the UNA, resp.).This shows the if direction of 1 and 2. Let ξ be the mapping generating E ξ and suppose that T , A ∪ E ξ is consistent.Let I be an arbitrary model of T , A ∪ E ξ .Then we build a match π for q i in I by setting π(t) = ξ(t) I for each term t in q i .As π(x j ) = ξ(x j ) I = c I j for each answer variable x j , the match π witnesses c ∈ ans(q, I).Hence c ∈ cert(q, T , A ∪ E ξ ) and E ξ is a solution to P, as desired.
For the only-if direction of 1, we assume an arbitrary solution E to P, and use it to show that there exists a c-instantiation E ξ of some q i ∈ q such that T , A ∪ E ξ is consistent.Since E is a solution to P, by definition, there exists a model I of T , A ∪ E under the UNA.Without loss of generality, we assume that ∆ I = N I and that for each c ∈ N I we have that c I = c.Moreover, the interpretation I admits a match π for some q i ∈ q witnessing c ∈ ans(q i , I).To define the mapping ξ, we let ξ(t) = π(t) for each term t occurring in q i .Then I is a model of E ξ .Since it is also a model of T , A , it is a model of T , A ∪ E ξ and shows that the latter is consistent, as desired.
The only-if direction of 2 is shown similarly.Suppose that P admits a solution E. Then there exists a model I of T , A ∪ E (without the UNA) that admits a match π for some q i ∈ q witnessing c ∈ ans(q i , I).To obtain an interpretation J that is a model of T , A ∪ E q i , we extend I as follows.For every anonymous individual u y that was introduced in E q i due to an existentially quantified variable y, we let u y J = π(y).The resulting interpretation is a model of E q i , and since these individuals u y do not occur in the ontology, modelhood for T , A is preserved.
For 3, we use the extended ABox A and TBox T to enforce the UNA over the individuals occurring in P. The ABox A extends A with an assertion A c (c) for each individual c occurring in P, where each A c is a fresh concept name.The TBox T consists of axioms A c ¬A c for all pairs c = c of individuals occurring in P. Since the interpretations of T , A under the UNA and of T , A without the UNA coincide, the claim easily follows from statement 2 above.
A direct consequence of this proposition is that, for all DLs, we can restrict our search to explanations that result from instantiating the input query.
Corollary 3.9.Let P = T , A, q, c, Σ be a QAP with unrestricted explanation signature, let max(q) = max q i ∈q |at(q i )|, and let max-terms(q) = max q i ∈q |q i |.If P has an explanation, then P has an explanation with concepts and roles only from q, at most max(q) atoms, and at most max-terms(q) individuals.

Restricted Explanation Signature
If we allow for restricted explanation signatures, then Proposition 3.8 does not hold anymore, and the search space for possible explanations becomes significantly larger.As we will see in the following sections, this has a notable effect on the complexity of the different decision problems.However, in the case of DL-Lite A , we can still show a weaker version of the proposition that allows us to restrict our search to the instantiations of the queries in the perfect reformulation of the input query q.Moreover, every ⊆-minimal explanation can be obtained this way.
Proposition 3.10.Let P = T , A, q, c, Σ be a QAP where T , A is a DL-Lite A ontology, and let R q,T be the perfect reformulation of q w.r.t.T .A solution to P exists if and only if a c-instantiation E ξ of some q r ∈ R q,T exists such that (i) T , A ∪ E ξ is consistent, and (ii) E ξ \ A is a Σ-ABox.Moreover, E is a ⊆-minimal explanation implies that query q r ∈ R q,T and ABox E ξ exist such that E ξ is a c-instantiation of q r and E = E ξ \ A.
Proof.The first part of the claim is shown analogously to item 1 of Proposition 3.8 (recall that in DL-Lite A we make the UNA).For the if direction, consider an arbitrary q r ∈ R q,T and let E ξ be a c-instantiation of q r generated from a mapping ξ.We assume that T , A ∪ E ξ is consistent and that E ξ \ A is a Σ-ABox.Then, to show that E ξ \ A is a solution to P, it suffices to show the existence of a match π for q r in DB A∪E ξ witnessing c ∈ cert(q, T , A∪E ξ ).This π is easily obtained by setting π(t) = ξ(t) I for each term t in q r .For the only-if direction, we assume an arbitrary solution E to P and use it to show that there exists a cinstantiation E ξ of some q r ∈ R q,T that satisfies conditions (i) and (ii).Since E is a solution to P, by definition, E is a Σ-ABox, T , A ∪ E is consistent, and c ∈ cert(q, T , A ∪ E).By Proposition 2.1, it follows that there exists a query q r ∈ R q,T and a match π for q r in DB A∪E that witness c ∈ ans(q r , DB A∪E ).We define a mapping ξ by setting ξ(t) = π(t) for each term t in q r .Then, for the resulting c-instantiation E ξ we have that E ξ ⊆ E ∪ A, which implies the consistency of T , A ∪ E ξ and that E ξ \ A is also a Σ-ABox as desired.
To show the second part of the claim, suppose E is a ⊆-minimal solution to P. By Proposition 2.1, we have that there exists some q r ∈ R q,T for which there exists a match π witnessing c ∈ ans(q r , DB A∪E ).We construct a c-instantiation E ξ of q r as follows: By the minimality of E, we have that E = E ξ \ A.
Similarly as above, this implies that we can consider only small explanations whose size is linear in the size of the input query q, but now their signature depends not only on q, but also on the signature of the input TBox T .
Corollary 3.11.Let P = T , A, q, c, Σ be a QAP where T , A is a DL-Lite A ontology.Furthermore, let max(q) = max q i ∈q |at(q i )|.If P = T , A, q, c, Σ has an explanation, then P has an explanation with concepts and roles only from T and q, at most max(q) atoms, and at most 2 • max(q) individuals.

Complexity for Instance Queries
We now study the complexity of reasoning over query abduction problems.We consider the complexity under both unrestricted and restricted explanation signatures, and we consider the different minimality criteria over abductive solutions.We measure the complexity of a QAP P = T , A, q, c, Σ in terms of the combined size of T , A, q, and Σ-that is, we consider combined complexity.In this section, we investigate the complexity of reasoning over QAPs when the body of the input query consists of a single unary atom-that is, we consider instance queries.In the following section, we shall turn our attention to UCQs.

Existence of Explanations
Before giving the first complexity results, we show that, for instance queries, ⊆-minimal and ≤-minimal explanations coincide.To see this, consider an arbitrary QAP P = T , A, q, c, Σ such that q ∈ IQ and let q r be an arbitrary CQ in the perfect reformulation R q,T .By Propositions 2.1 and 3.10, it follows that each c-instantiation of q r that is consistent with T , A contains an explanation for P; moreover, each ⊆-minimal explanation for P can be obtained in this way.As these explanations contain at most one assertion (cf.Proposition 2.1), ≤and ⊆-minimal explanations are both of size at most one, and we obtain the following result.
Proposition 4.1.Let P = T , A, q, c, Σ be a QAP such that T , A is a DL-Lite A ontology and q ∈ IQ, and let E be an arbitrary Σ-ABox.Then, E is a solution to P implies that a solution E ⊆ E to P exists such that |E | ≤ 1.Hence, expl ≤ (P) = expl ⊆ (P).Now we consider the complexity of deciding existence of an explanation.
Theorem 4.2.For DL-Lite A , instance queries, and under both unrestricted and restricted explanation signatures, exist, ⊆-exist, and ≤-exist are NL-complete.
Proof.By Proposition 3.5, it suffices to show the result for exist.We first provide an algorithm that yields the desired upper bound, even with restricted explanation signatures.Then we show that the problem is NL-hard already for the case of unrestricted signatures.
(membership) Let P = T , A, q, c, Σ be a QAP such that q ∈ IQ.To decide exist in non-deterministic logarithmic space, we can exploit Proposition 4.1 and test all candidate singleton explanations by iterating over Σ, the individuals occurring in P, and at most two anonymous individuals.This results in at most polynomially many candidate solutions E of constant size.For each of them we test whether T , A ∪ E is consistent and c ∈ cert(q, T , A ∪ E).Since for DL-Lite A both ontology consistency and instance checking can be solved in non-deterministic logarithmic space, exist is in NL.
1: Let φ be a globally fresh predicate of the same arity as ϕ.
(hardness) We reduce the DL-Lite A ontology consistency problem (under the UNA) to exist.Consider an arbitrary DL-Lite A ontology T , A .Furthermore, consider an arbitrary atomic concept A not occurring in T , A , let q = A(x), let c ∈ N I be an arbitrary individual, and let P = T , A, q, c, Σ be a QAP with unrestricted Σ.We show that T , A is consistent if and only if P admits a solution.The if direction is trivial.For the onlyif direction, suppose that T , A is consistent, and consider E = {A(c)}.Since T , A is consistent and A is fresh, T , A ∪ E is also consistent.As each model I of T , A ∪ E satisfies the assertion A(c), E is a solution to P.

Deciding Necessity
In Section 3.1, we have seen that for QAPs with restricted explanation signatures and DLs that allow for disjointness axioms, nec reduces to non-exist.For the case of QAPs with unrestricted explanation signatures but ontologies restricted to DL-Lite A , we provide in Algorithm 1 a Turing reduction to (non-)exist; that is, a procedure that solves nec by employing a subroutine for solving exist.The following proposition proves its correctness.
Proposition 4.3.For DL-Lite A , instance queries and UCQs, and under unrestricted explanation signatures, algorithm isNEC decides nec.
Proof.Let P = T , A, q, c, Σ be a QAP such that T , A is a DL-Lite A ontology, query q ∈ IQ ∪ CQ, and signature Σ is unrestricted; furthermore, let ϕ( d) be an assertion over abducible predicate ϕ ∈ Σ.We prove that ϕ( d) is necessary for P iff isNEC returns "yes".
For the only-if direction, we prove the contrapositive.Suppose that isNEC returns "no" on the given instance; we show that a solution E to P exists such that ϕ( d) ∈ E. According to the construction of isNEC, we consider two alternative cases.
• QAP T , A , q, c, Σ admits a solution E. For DL-Lite A , Calvanese et al. (2009) showed that negative inclusion axioms affect only the consistency of the given ontology, but do not contribute towards computing the certain answer; that is, c ∈ cert(q, T , A ) iff T , A is consistent and c ∈ cert(q, T , A ).Then, since assertion φ( d) is over a predicate not occurring in P and T , A is consistent, we have that E is also a solution to P = T , A, q, c, Σ .By the definition, such solution does not contain ϕ( d), since T , A |= φ( d) and φ ¬ϕ ∈ T .
• QAP T , A , q, c, Σ has no solution.Since isNEC returns "no", a Σ-ABox E * exists such that , and QAP T , A ∪ E * , q, c, Σ has a solution E. Given that assertion ϕ( d) is entailed by T , A ∪ E * we have that E := E \ {ϕ( d)} is also a solution to T , A ∪ E * , q, c, Σ .We conclude that E ∪ E * is a solution to T , A, q, c, Σ that does not contain ϕ( d), as required.
For the if direction, we prove the contrapositive.Suppose that a Σ-ABox E exists such that E is a solution to P and ϕ( d) ∈ E; we show that isNEC returns "no".W.l.o.g., the individual u of Algorithm 1 does not occur in E. Now, if T , A ∪ E |= ϕ( d), we have that E is a solution to QAP T , A , q, c, Σ , so isNEC returns "no", as required.Otherwise, consider the case in which T , A ∪ E |= ϕ( d) and take the conjunctive query q ( x) ← ϕ( x).By the assumption, we have that d ∈ cert(q , T , A ∪ E).By Proposition 2.1, a query r ∈ R q ,T and a match π for r exist such that r contains a single atom and d ∈ ans(r, DB A∪E ) is witnessed by π.Let ψ( y) be the unique atom occurring in r such that x ⊆ y and let ψ( t) be the assertion obtained from ψ( y) by replacing each variable y ∈ y with π(y).Clearly, we have that ψ( t) ∈ A ∪ E. Next, we distinguish among two cases.
• For each variable y ∈ y we have that π(y) ∈ I.Then, let and let and that E * ⊆ E. Hence, E is a solution to QAP T , A ∪ E * , q, c, Σ ; so isNEC returns "no", as required.
• At last, since E * ⊆ E and E is a solution to P, we conclude that ABox E is a solution to T , A ∪ E * , q, c, Σ .Hence, isNEC returns "no", as required.
Next, we use Algorithm 1 and Propositions 3.1 and 3.2 to characterize the complexity of nec in the presence of instance queries.
Theorem 4.4.For DL-Lite A , instance queries, and under both unrestricted and restricted explanation signatures, nec, ≤-nec, and ⊆-nec are NL-complete.
Proof.For the NL upper bound for nec and under restricted signatures, observe that, by Proposition 3.2, nec reduces to non-exist.In Theorem 4.2, we proved that exist is in NL.
- whether E ∈ expl(P) in three steps: (i) check that E is a Σ-ABox, (ii) check that T , A ∪ E is consistent, and (iii) check that c ∈ cert(q, T , A ∪ E).For DL-Lite A ontologies, we can perform these three steps in non-deterministic logarithmic space.Thus, for instance queries and under both restricted and unrestricted signatures, rec is in NL.
(hardness) We provide a reduction from the consistency problem of DL-Lite A ontologies.Consider an arbitrary ontology T , A .Then, we let A be a fresh concept name not occurring in the ontology and we let c be a fresh individual.Furthermore, let q(x) ← A(x) be our instance query.Finally, we let P = T , A, q, c, Σ be our query abduction problem with unrestricted explanation signature and we let E = {A(c)} be our target ABox.It is not too difficult to see that T , A is consistent iff E is a solution to P.
Unsurprisingly, the complexity does not change when we consider a minimality criterion over solutions.
Theorem 4.8.For DL-Lite A , instance queries, and under both unrestricted and restricted explanation signatures, ≤-rec and ⊆-rec are NL-complete Proof.By Proposition 4.1, we focus only on ≤-rec.
(membership) In order to decide whether E ∈ expl ≤ (P) we first check that E is indeed a solution to P, which we can do in non-deterministic logarithmic space (see Theorem 4.7).Then, by Proposition 4.1, we need to check that |E| ≤ 1 and that E is the empty ABox whenever c ∈ cert(q, T , A).Since instance checking in DL-Lite A is in NL, we conclude that ≤-rec is in NL as well.
(hardness) We can reuse the reduction to consistency in DL-Lite A provided in Theorem 4.7 to show that, for instance queries and under unrestricted explanation signatures, ≤-nec is NL-hard.We conclude that, under both restricted and unrestricted explanation signature, ≤-nec and ⊆-nec are NL-complete.

Complexity for Unions of Conjunctive Queries
In this section, we consider the more general problem of reasoning over query abduction problems that admit UCQs in the input.We establish the complexity of the various rea-DL-Lite A known as DL-Lite core given in Theorem 17 by Baader et al. (2010).For showing hardness in the second setting, we reduce the following NP-complete problem: given a pair of directed graphs G = (V, E) and G = (V , E ), decide whether there exists an homomorphism from G to G .To this end, let A = {e(c a , c b ) | (a, b) ∈ E } be an ABox.Furthermore, for B an arbitrary atomic concept and c a globally fresh individual, let q = {e(x a , x b ) | (a, b) ∈ E} ∪ {B(c)} be a Boolean CQ and Σ = {B} be a signature.Finally, let P G,G = ∅, A, q, Σ be a QAP; we show that there exists a homomorphism from G to G iff there is a solution to P G,G .Indeed, if there is a homomorphism from G to G , then {B(c)} is a solution to P. For the other direction, assume there is an explanation E for P. Since binary atoms are prohibited from occurring in E by the selection of Σ, there must exist a match π from q to DB A .Such a mapping π also witnesses the existence a homomorphism from G to G .

Deciding Necessity
Now, we consider the problem of checking whether an assertion occurs in all the solutions to a QAP P; that is, whether an assertion is necessary for P. For the case of restricted explanation signatures, we use the reductions from Section 3.1 and Theorem 5.2 to derive that nec and ⊆-nec are coNP-complete.For the case of unrestricted explanation signatures, we use the procedure for solving nec described in Algorithm 1 to show that nec and ⊆-nec are PTime-complete.
Proof.In Theorem 5.1 and Theorem 5.2, we proved that the problems of deciding the existence of a solution to a QAP with unrestricted and with restricted explanation signatures are PTime-complete and NP-complete, respectively.By applying the reduction in Proposition 3.1, we have that nec is PTime-hard under unrestricted and coNP-hard under restricted explanation signatures.
For the upper bound, we first consider the case of restricted explanation signatures.By Proposition 3.2, nec reduces to non-exist.By Theorem 5.2, this latter problem can be solved in nondeterministic polynomial time.We readily obtain that nec is in coNP.For the case of unrestricted signatures, Proposition 4.3 states that algorithm isNEC solves nec, even when we consider UCQs in input.By the definition, isNEC requires checking whether polynomially many QAPs do not admit a solution, and whether polynomially many DL-Lite A ontologies entail a given assertion.Since for DL-Lite A , instance checking is in PTime and, by Theorem 5.1, non-exist is in PTime, we conclude that isNEC runs in polynomial time.Thus, nec under unrestricted signatures is in PTime.
We conclude that nec is PTime-complete under unrestricted and coNP-complete under restricted explanation signatures.
Finally, Proposition 3.4 states that nec and ⊆-nec are equivalent and, thus, also ⊆-nec is PTime-complete under unrestricted and coNP-complete under restricted explanation signatures.Now, we consider the complexity of ≤-nec and we show that, under common assumptions, the problem is harder than nec.Intuitively, this is because one has to first compute the minimal size of an explanation, and then inspect all the explanations of that size.In the following, we will use [i..j] to denote the integer interval {i, . . ., j}.
Theorem 5.4.For DL-Lite A , UCQs, and under both unrestricted and restricted explanation signatures, ≤-nec is P NP -complete.The hardness holds already for QAPs with an empty TBox and a CQ.
Proof.We structure the proof as follows.First, we show that ≤-nec is in P NP .Then, we prove that the problem is P NP -hard under restricted signatures.Finally, we argue that the same reduction can also be used in the particular case of unrestricted signatures.
(membership) Consider an arbitrary QAP P = T , A, q, c, Σ (where the signature may be restricted) and let α be an arbitrary ABox assertion.From Corollary 3.9, we know that if P has an explanation, then there exists an explanation whose size m is bounded by max(q) = max q i ∈q |at(q i )|.Observe that P, α is a negative instance of ≤-nec iff there is an i ∈ [0..m] such that (a) P has an explanation E with |E| = i and α ∈ E, and (b) E is ≤-minimal.Thus, we use an auxiliary problem size-out, which is to decide given a tuple P , α , n , where P is a QAP, α is an assertion, and n is an integer, whether there exists an explanation E for P such that |E | = n and α ∈ E .Furthermore, the problem no-smaller is to decide, given a tuple P , n of a QAP and an integer, whether there is no explanation E for P such that |E | < n .Observe that size-out is in NP, while no-smaller is in coNP.Take the tuple S = A 0 , B 0 , . . ., A m , B m , where A i = P, α, i and B i = P, i , for all i ∈ [0..m].Due to the above observation, α occurs in all ≤-minimal explanations E for P iff for all i ∈ [0..m], one of the following holds: (i) A i is a negative instance of size-out, or (ii) B i is a negative instance of no-smaller.S can be built in polynomial time in the size of the input, and whether all instances instances in S satisfy (i) and (ii) above can be decided by making 2m parallel calls to an NP oracle.Thus we obtain membership in P NP .
(hardness) We give a reduction from OddMinVertexCover, which is P NP -complete (Wagner, 1987).An instance of this problem is given by a graph G = (V, E), and we are asked whether the least cardinality over all vertex covers in G is odd.That is, is there an odd integer k ∈ [1..|V |] such that G has a vertex cover C with |C| = k, and there is no vertex cover C in G with |C | < k?
In the reduction we exploit the following property.Given an integer k and a directed graph G = (V, E) with m vertices, construct a new graph G = ([1..m], E ) such that there exist two symmetric edges between each i ∈ [1..k] and j ∈ [1..m].The following holds: if there is an injective homomorphism h from G to G , then G has a vertex cover of size k.
Assume an arbitrary graph G = (V, E) with vertices V = {v 1 , . . ., v m }.W.l.o.g., G is connected, directed, and has at least 2 nodes.We construct next a QAP P G = ∅, A |V | , q G , , Σ G and an assertion α G such that G is a positive instance of OddMinVer-texCover iff α G is ≤-necessary for P G .In the reduction we use individuals odd , even, c i j , where i, j ∈ [0..m], concept names M , L, and roles P , =, Edge.Let q G be the Boolean query consisting of atoms
Intuitively, in (i) we represent the graph G in the query.We will use atoms in (ii) to ensure that different variables are mapped to distinct elements.The atoms L(x i ) will be used to measure the size of vertex covers, while the atoms P (x 1 , y) and M (y) will be used to determine their parity.We allow explanations only over concept names, and thus set Σ G = {M, L}.
To define A |V | , we first construct a collection A 0 , . . ., A m of ABoxes, where each A j consists of the assertions For an integer k, let par (k) = odd if k is odd, and See Figure 1 for an example.Finally, we let α G = M (odd ).To prove the correctness of the reduction, we define up(k) = {L(c k 1 ), . . ., L(c k k ), M (par (k))}, and claim the following: It suffices to show the existence of a match π for q G in DB A * .Take an enumeration z 1 , . . ., z m of variables x 1 , . . ., x m such that {z 1 , . . ., .m], and π(y) = par (k).Assume an atom Edge(x i 1 , x i 2 ) in q G .Due to (b) in the definition of A j , it suffices to show that π( properly mapped due to (c) in the construction of A j and the fact that π is injective by construction.For an atom L(x i ) in q G we have two options.If π(x i ) = c k with ≤ k, then L(c k ) ∈ up(k) by the definition of up(k).Otherwise, if > k, then L(c k ) ∈ A k by the definition of A k .The atom P (π(x 1 ), π(y)) belongs to A * due to the definition of A , while M (π(y)) ∈ up(k) by construction of up(k).
claim 2: Assume up(k) is an explanation for P G .Then G has a vertex cover of size k.Let A * = A |V | ∪up(k) and let π be a match for q G in DB A * .Observe that due irreflexivity of the role = and the atoms (ii) in q G , π must be injective.Observe also that for all ∈ [1..m], where = k, we have |{c i | L(c i ) ∈ A }| < m.Due to the connectedness of G and atoms L(x 1 ), . . ., L(x m ) in q G , π must use only the atoms in .m] by the definition of A , we have by cardinality minimality that E ⊆ {L(c 1 ), . . ., L(c ), M (par ( ))}.By the definition of A , |{c i | L(c i ) ∈ A }| = m − .Thus, due to the injectivity of any match π for q G , we must have We can now finalize the correctness proof: (⇒) Suppose there exists an odd integer k ∈ [1..|V |] such that G has a vertex cover C with |C| = k, and there is no vertex cover C in G with |C | < k.By claim 1, up(k) is an explanation for P G .We make sure that up(k) is ≤-minimal.Suppose there exists an explanation E with size |E | < |up(k)|, i.e., |E | = for some ≤ k.We can assume that E is ≤-minimal.Then by claim 3, E = up( − 1).It follows from claim 2 that G has a vertex cover of size − 1.Since − 1 < k, we arrive at a contradiction to the assumption that G has no vertex cover of size < k.Thus up(k) is ≤-minimal.Since k is odd, we have M (odd ) ∈ up(k).By claim 3, apart from up(k) there is no other ≤-minimal explanation for P G .That is, M (odd ) occurs in all ≤-minimal explanations for P G .
(⇐) Assume M (odd ) occurs in all ≤-minimal explanations for P G .By claim 3, we know that up(k) is the unique ≤-minimal explanation, for some integer k.Since M (odd ) ∈ up(k), we get that k is odd.Then, by claim 2, there is a vertex cover C with size k.It remains to ensure that there is no vertex cover C of size < k.Assume the opposite.Then by claim 1 we have that up( ) is an explanation with size |up( )| < |up(k)|, which contradicts the assumption that up(k) is ≤-minimal.Thus G is a positive instance of OddMinVertexCover.
The definition of Σ G prohibits binary atoms from occurring in ≤-minimal explanations.The same effect can be achieved by using Σ G = Σ(∅, A |V | , q G ) and by modifying A |V | and q G to make it prohibitively expensive to have binary atoms in ≤-minimal explanations.Simply replace each binary assertion r(c, d) in A |V | by fresh assertions r 1 (c, d), . . ., r m+2 (c, d), and each binary r(x, y) in q G by r 1 (x, y), . . ., r m+2 (x, y).In this way the lower-bound can be shown for unrestricted explanation signatures.

Deciding Relevance
Using Theorems 5.1 and 5.2, and the reductions in Section 3, we obtain the following results.
Theorem 5.5.For DL-Lite A , UCQs, and under unrestricted explanation signatures, rel is PTime-complete.Under restricted explanation signatures, rel is NP-complete.
Unsurprisingly, for UCQs, ≤-rel has the same complexity as ≤-nec.Indeed, the two problems share the same source of complexity, namely the need to inspect all explanations up to a computed size, which allows us to reduce the OddMinVertexCover problem.In fact, P NP -hardness can be shown using the same reduction as in the proof of Theorem 5.4, and a matching upper bound can be obtained by slightly modifying the algorithm for ≤-nec.
Theorem 5.6.For DL-Lite A , UCQs, and under both unrestricted and restricted explanation signatures, ≤-rel is P NP -complete.P NP -hardness holds already for QAPs with an empty TBox and a CQ.
Proof.First, we show that, under restricted explanation signatures, the problem ≤-rel is in P NP .Second, we argue that, under unrestricted explanation signatures, ≤-rel is P NP -hard.
(membership) ≤-rel can be tackled in a way similar to ≤-nec.In fact, the algorithm described in Theorem 5.4 can be modified in order to solve this problem.Let size-in solve the following problem: given a tuple P, α, n , where P is a QAP, α an assertion, and n an integer, decide whether there exists an explanation E, with |E| = n and α ∈ E.Then, we change the positivity condition of the ≤-nec algorithm as follows: α occurs in some ≤-minimal explanation E for P iff for some i ∈ [0..m] it holds that: (i) A i is a positive instance of size-in, and (ii) B i is a positive instance of no-smaller.It is easy to see that size-in is solvable in NP, hence the whole problem is again in P NP .
(hardness) Recall the reduction from OddMinVertexCover to ≤-nec in the proof of Theorem 5.4.We argue that exactly the same reduction also shows P NP -hardness of ≤-rel.Assume a directed graph G and let P G and α G be the QAP and the assertion resulting in the reduction.To prove the claim it suffices to show the following equivalence: α G is ≤-necessary for P G iff α G is ≤-relevant for P G .This equivalence follows directly from claim 3, which states that P G has a unique ≤-minimal explanation.
We now turn our attention to ⊆-rel.For this problem we obtain a precise complexity characterization for the case of restricted explanation signatures, but we leave it open whether for unrestricted signatures the Σ P 2 upper bound shown below is tight. 2 We note that for the latter case, a coNP lower bound can be easily shown, for instance, by a reduction from the non-existence of a homomorphism between two graphs.
Theorem 5.7.For DL-Lite A , UCQs, and under both unrestricted and restricted explanation signatures, ⊆-rel is in Σ P 2 .Under restricted explanation signatures, ⊆-rel is Σ P 2 -hard, and the hardness holds already for QAPs with an empty TBox and a CQ.
Proof.(membership) Let P = T , A, q, c, Σ be a QAP and let α be an ABox assertion.We now provide an extended version of the algorithm solving existence, which decides whether α is ⊆-relevant for P. Let has-subexpl solve the problem of deciding whether a given explanation E has a subset which is itself an explanation.In our modified algorithm, similarly to Algorithm 2, first we non-deterministically guess a CQ q r in the perfect reformulation R q,T of q w.r.t.T and a c-instantiation E ξ of q r such that α ∈ E ξ .Additionally to the consistency test and to checking that E ξ is a Σ-ABox, we also check the complement of has-subexpl for E, in order to assure that E is ⊆-minimal.It follows that α is ⊆-relevant.Since checking the complement of has-subexpl can be done in coNP, the problem is solvable in Σ P 2 .(hardness) We reduce the Σ P 2 -complete problem non-cert3col (Stewart, 1991, see also Bonatti, Lutz, & Wolter, 2009).An instance of non-cert3col is given by a graph G = (V, E) with vertices V = {1, . . ., n} such that every edge is labelled with a disjunction of two literals over the Boolean propositions {p (i,j) | 1 ≤ i, j ≤ n}.We say that edge e ∈ E evaluates to true under truth assignment τ if τ satisfies the disjunction labelling e.Then, graph G is a positive instance to non-cert3col iff a truth assignment τ exists such that graph τ (G)-obtained from G by including only those edges that evalute to true under τ -is not 3-colorable.Assume an instance G of non-cert3col.We show how to build in polynomial time a QAP P G = T G , A G , q G , c G , Σ G and an ABox assertion α G .We first present all relevant definitions, after which we discuss the intuition behind the reduction and prove its correctness.
In the construction, we use an empty TBox and a Boolean CQ, thus T G = ∅ and c G = .In order to define the ABox A G , let L be a function that assigns to each edge e ∈ E the set {l 1 , l 2 } of literals occurring in its label.Moreover, we let T(e) (resp., F(e)) be the set containing each truth assignment τ to the literals in L(e) such that edge e evaluates to true (resp., false) under τ .Finally, for each truth assignment τ and each literal l occurring in G, we define the image of l w.r.t.τ , written img τ (l), as follows.
We are now ready to define the ABox A G .In the definition, we use individuals a 1 , . . ., a 4 ; moreover, for each literal l in G, we use individuals l and l to denote l's truth value.Also, for all 1 ≤ k ≤ ≤ 4, each edge e ∈ E, and each truth assignment τ ∈ T(e) ∪ F(e), we let σ e,τ k, be a fresh individual.ABox A G consists of four distinct components A * , A t T , A f T , and A C which we introduce next.Next, we define the Boolean query q G .To this end, for each vertex i ∈ V , let x i be a distinct variable; for each edge i, j ∈ E, let y i,j be a distinct variable; and, for each literal l occurring in G, let z l and zl be two distinct variables.Then, for each edge i, j ∈ E, let q G contain the following atoms.
{B(x i ), R e (x i , y i,j ), R e (y i,j , x j ), B(x j )} ∪ {P (y i,j , z l ), A l (z l ), d(z l , zl ) | l ∈ L(e)} Finally, we let α G = B(a 4 ) be the assertion we want to show to be relevant and let Σ G = {A l | literal l occurs in G} ∪ {B} be the signature.Now, we outline the main idea behind this construction.ABox A G encodes two structures: a triangular structure A t T ∪ A f T and a cyclic structure A C .The former structure over individuals a 1 , a 2 , and a 3 is such that edges in G that evaluate to true according to an arbitrary truth assignment τ can be mapped only to non-reflexive edges (cf.A t T ).In contrast, edges of G that evaluate to false according to τ can be mapped to an arbitrary edge (cf.A f T ).The latter, cyclic, structure A C over individual a 4 (which is not asserted to be member of B) is such that G can be mapped over A C under all possible truth assignments.
Query q G is obtained from graph G by requiring that each vertex of the graph is a member of concept B, by reifying edges of the graph, and by incorporating the disjunction over literals.In particular, for each literal l in G, variables z l and zl represent the truth values of l and atom A l (z l ) is used to enforce a particular truth assignment.Since ABox A G does not contain assertions over concept A l , each minimal explanation E τ for P G corresponds to a truth assignment τ for G.That is, such E τ contains, for each literal l in G, either A l (l) or A l ( l).Also, by the definition of the ABox, query q G can be mapped over A t T ∪ A f T under minimal explanation E τ implies that τ (G) is 3-colorable.In contrast, for every truth assignment τ , we can map query q G over the cyclic structure A C , provided that explanation E τ asserts the individual a 4 to be a member of B. We are now ready to formally prove the correctness of our reduction.
(⇒) Suppose there is a truth assignment τ such that τ (G) is not 3-colorable; we show that assertion B(a 4 ) is ⊆-relevant for P G .Consider the Σ-ABox E = {B(a 4 )} ∪ E τ , where Clearly, E is an explanation.Indeed, we can match the query q G over the cyclic structure A C by mapping all variables x i of q G to (interpretation of) a 4 .Suppose there is a smaller explanation E ⊂ E. Observe that E τ ⊆ E .This is because, for each literal l, concept A l does not occur in A G but does occur in q G .Then, E \ {B(a 4 )} must be an explanation.Then q G can be matched over the triangular structure encoded in A G .Thus, τ (G) is 3-colorable which contradicts the assumption.
(⇐) Let E be a ⊆-minimal explanation for P G containing B(a 4 ); we show that there exists a truth assignment τ such that τ (G) is not 3-colorable.We first argue that for each literal l we have that either A l (l) ∈ E or A l ( l) ∈ E. This follows from three considerations.First, due to the signature restriction, predicate d cannot occur in E. Second, for each literal l, query q G contains atoms A l (z l ) and d(z l , zl ), whereas ABox A G contains assertions d(l, l) and d( l, l).Third, for each literal l, concept A l occurs in q G with one and only variable z l .Therefore, since E is a minimal solution, we know that exactly one of A l (l) ∈ E and A l ( l) ∈ E holds.Next, we define the truth assignment τ to the literals occurring in G.For each literal l in G, let τ (l) = t if A l (l) ∈ E, and τ (l) = f if A l ( l) ∈ E. It is not difficult to argue that t(G) is not 3-colorable and thus G is a positive instance of non-cert3col.
(hardness) DP-hardness is shown by a reduction from the problem HP-noHP.An instance of HP-noHP is given by two directed graphs G = (V, E) and G = (V , E ), where G, G is a positive instance iff G has an Hamilton path and G does not have one.For such a pair G, G , we define a QAP P = ∅, A, q, , Σ and a Σ-ABox E such that: (a) G, G is a positive instance of HP-noHP iff E is a ≤-minimal explanation for P, and (b) G, G is a positive instance of HP-noHP iff E is a ⊆-minimal explanation for P. W.l.o.g., nodes in G and G are disjoint and are ordinary individuals.Construct an ABox Intuitively, an assertion e(v i , v j ) encodes an edge (v i , v j ) in the graph G, whereas an assertion d(v i , v j ) encodes that nodes v i and v j are distinct.The ABox A G encodes G in a similar way as before, using roles e instead of e, and in addition it has an assertion A(v i ) for each v i ∈ V .Take a set of fresh Let q = q 1 ∧ q 1 ∧ q 2 ∧ q 2 ∧ q 3 be a Boolean CQ with Intuitively, q 1 ∧q 1 asks for a simple path with |V | vertices related via the role e. Analogously, q 2 ∧ q 2 asks for a simple path with |V | vertices related via the role e .Additionally, q 3 asks that each node on the latter path satisfies A.
Finally, we let E = {A(o i ) | o i ∈ O} and we let Σ = Σ(T , A, q).(⇒) Assume that G, G is a positive instance of HP-noHP, and let a 1 , . . .a |V | be a Hamilton path in G.We show that E is a ≤-minimal and a ⊆-minimal explanation for P. To this end, first take a mapping π for variables in q such that π( Then clearly π is a match for q in DB A∪E , and hence E is an explanation to P. Indeed, the subquery q 1 ∧ q 1 of q is fulfilled because a 1 , . . .a |V | is a Hamilton path in G, q 2 ∧ q 2 is fulfilled because A C has a clique of size |V |, while q 3 is fulfilled by E. To assure minimality, assume towards a contradiction that there is an explanation Then the presence of q 2 in q implies the existence of a Hamilton path in G .Contradiction. (⇐) Assume that E ∈ expl ≤ (P) (resp., E ∈ expl ⊆ (P)) and π is a match for q in DB A∪E .Note that e does not occur in A G and e does not occur in A G ∪ A C .Then by construction of q 1 ∧ q 1 and A G , π maps the variables x 1 , . . ., x |V | to the |V | distinct constants of A G and G must have a Hamilton path.Towards a contradiction suppose G also has a Hamilton path.Then by construction of A G , q 2 ∧ q 2 ∧ q 3 has a match in DB A G .This means we can build a match π for q in DB A G , which in turn means that ∅ is an explanation to P. This contradicts the assumption that E is ≤-minimal (resp., ⊆-minimal).

Discussion
In this section, we discuss some issues that remain for further investigation.

Computing Explanations
In our complexity analysis for DL-Lite A , we have not considered the problem of computing solutions to query abduction problems.Nevertheless, we can infer upper bounds on the complexity of computing solutions to a QAP P from the presented results.If the input query in P is an instance query, then both computing an arbitrary solution and computing all minimal3 solutions is easy, since by Proposition 3.10, we only need to consider singleton candidate explanations, and their number is polynomially bounded.The problem of computing an arbitrary solution E remains polynomial for UCQs if the signature of P is unrestricted, since we can always obtain E by creating a suitable direct instantiation of one of the CQs in input (see Section 3.3).Instead, under restricted signatures, the total number of (minimal) solutions is in general exponential in the size of the signature Σ and in the maximal size of each query occurring in the input UCQ; so computing all of them requires in general exponential time.It remains to be investigated whether these solutions can be enumerated with a polynomial delay (cf., Penaloza & Sertkaya, 2010).In the case of a restricted signature, however, the NP-harness result established in Theorem 5.2 implies that to compute a solution E one essentially essentially cannot do better than guessing the ABox E and deciding whether E ∈ expl (P).

Data Complexity
In this work we have focused on combined complexity.With respect to data complexity (i.e., when the complexity is measured with respect to the size of the ABox only, while both the query and the TBox are considered fixed) and ontology complexity (i.e., when only the query is considered fixed), we observe that those inference tasks that we have shown to be NP-complete essentially rely on checking ontology consistency, and hence are in AC 0 in data complexity (Calvanese et al., 2009).Moreover, by Corollaries 3.9 and 3.11, one can restrict the attention to explanations that are bounded by the size of the query, it follows that for a fixed query, there are only polynomially many explanations to be considered.Hence all our reasoning tasks are polynomial both in data complexity and in ontology complexity.

Other Description Logics.
All the lower bounds proved in the paper do not rely on properties that are exclusive to DL-Lite A , hence they hold for other DLs as well.In fact, as we have mentioned, many lower bounds hold even in the absence of a TBox.As for the upper bounds, we have relied on DL-Lite A and on the existence of the perfect reformulation of a given query (see Proposition 2.1) only to argue that canonical explanations are small and have a restricted signature (more specifically, that they can be obtained by instantiating CQs in the perfect reformulation of the input query) and that query answering can be done in NP.For this reason, we expect our results to carry over to other DLs that admit "small" explanations and for which query answering is in NP.For instance, both the lower and the upper bounds we have established hold for OWL 2 QL, which is obtained from DL-Lite A by forbidding functionality assertions and dropping the unique name assumption (as our results do not rely on functionality axioms, the unique name assumption is irrelevant).
For more expressive DLs, some bounds on the complexity of our reasoning tasks can also be inferred.In Corollary 5.1, we showed that for QAPs under unrestricted explanation signatures, deciding the existence of an explanation has the same complexity as ontology consistency without the UNA.Hence, the problem is ExpTime-complete for all the extensions of ALC in which standard reasoning (with or without the UNA) is also ExpTime-complete, like the well known SHIQ.If we consider restricted explanation signatures, the problem becomes significantly harder.This is witnessed by the lower bounds by Baader et al. (2010) stemming from CQ-emptiness (see Proposition 3.6): exist is already 2ExpTime hard for ALCI (Theorem 28 of Baader et al., 2010), and undecidable for ALCF (Theorem 29).For ALC, the authors have recently improved the lower bound of CQ-emptiness from ExpTime to NExpTime (personal communication).As mentioned in Section 3, their upper bounds do not apply directly to our setting (although we expect some of them to extend), and the precise characterization of the reasoning problems considered in this paper for expressive DLs remains open.

Related Work
The problem of explaining missing query answers was first considered by the database community (Jagadish, Chapman, Elkiss, Jayapandian, Li, Nandi, & Yu, 2007).In the literature, we found three different models of explanation for missing answers, which differ on the notion of solution.First, Chapman and Jagadish (2009) have proposed a model in which explanations are those relational operations (e.g., natural joins or selections) that are responsible for preventing the given tuple to be returned in the answers.Second, Tran and Chan (2010) have defined solutions to be refinements to the input query such that the given tuple is an answer to the relaxed query over the database.Third, Huang, Chen, Doan, and Naughton (2008) have defined solutions to be sequences of database update operations such that the result of answering the given conjunctive query over the updated relational instance includes the missing answer.Herschel and Hernández (2010) have generalized this latter model by considering UCQs with aggregation and grouping.Although this explanation model is closely related to ours, both the work by Huang et al. and by Herschel and Hernández tackle the problem from the point of view of computing solutions, whereas we are interested in outlining the computational complexity of the problem.Moreover, in the spirit of abductive reasoning, our solutions are of a declarative rather than operational nature-that is, solutions are databases rather than a sequence of database operations.
In classical logic, abductive reasoning is a form of non sequitur argument, in which a conclusion B is not a logical consequence of the premises Γ (Γ |= B), even though B is assumed to follow from the theory (Eiter & Gottlob, 1995).The aim is to find a set of formulas A such that Γ ∪ A |= B. Abductive reasoning is important also in the context of Description Logics (Elsenbroich, Kutz, & Sattler, 2006), where three orthogonal abductive problems have been studied.First, abduction has been studied to explain concepts-that is, given two concepts C and D and a TBox T , concept abduction amounts to finding a concept H such that T |= C H D and C H is satisfiable w.r.t.T (Noia, Sciascio, & Donini, 2009;Bienvenu, 2008).Second, Hubauer, Grimm, Lamparter, and Roshchin (2012) have applied TBox abductive reasoning to diagnosis of complex systems.In particular, given a TBox T , a set of abducible axioms Ax , and a set of axioms O, TBox abduction amounts to finding a subset A of Ax such that T ∪ A |= O. Third, Klarman, Endriss, and Schlobach (2011) have studied the problem of ABox abduction over ALC ontologies.This problem consists in finding which additions need to be made to the ABox in order to force a set of ABox assertions to be logically entailed by the ontology.Along the same line, Du, Qi, Shen, and Pan (2011a) have considered this problem from a more practical perspective.
More recently, Du, Wang, Qi, Pan, and Hu (2011b) have defined the problem of abductive conjunctive query answering, which they use as the basis for a new approach to semantic matchmaking.Given a satisfiable DL ontology O and a CQ q, a tuple c is called an abductive answer to q w.r.t.O if there exists a set E of ABox assertions such that O ∪ E |= q( c).Similarly to our approach, the authors allow to restrict the signature over which abductive solutions can be constructed.In addition, one can limit the impact of E on O by specifying a set of closed predicates; for each assertion α over a closed predicate we require that O ∪ E |= α if and only if O |= α.The main contribution of the paper is a procedure for computing abductive answers to CQs over ontologies formulated in the DLP fragment of OWL 2, which is a fragment orthogonal to DL-Lite A in terms of expressiveness.Considering closed predicates in the context of DL-Lite A and QAPs is an interesting research direction.

Conclusions
In this paper we have studied the problem of explaining negative answers to user queries over DL-Lite A ontologies.We have formalized the problem as an abductive task: given a (U)CQ q, a consistent ontology O and a tuple of constants c such that c is not in the certain answers of q over O, an explanation is defined as a set of ABox assertions that, when added to O, preserve its consistency and result in c being in the certain answers.We considered the special cases of allowing only a restricted signature for the assertions in the explanation, and having only an instance query rather than a full (U)CQ in the input.We have also considered preference orders between explanations, and studied two such orders: subset minimal and cardinality minimal explanations.For all these cases, we have obtained complexity bounds for four decision problems inspired in knowledge base abduction: deciding existence of an explanation (exist), deciding whether a given assertion occurs in all (nec) or some (rel) explanations, and recognizing explanations (rec).All our complexity bounds are tight, with the exception of rel for subset minimal explanations under unrestricted signatures, for which we leave open a gap between coNP-hardness and membership in Σ P 2 .Specifically, we have shown that in the case of instance queries all these decision problems are tractable, and in fact NL-complete, even when restricted explanations signatures and preference orders are simultaneously considered.The picture is significantly different for (U)CQs, as the results in Table 5.1 show.Indeed, tractability is always lost as soon as one considers restricted explanations signatures.If the signatures are not restricted, considering a preference order also results in intractability for most cases, the only exceptions being exist, which is always tractable, and nec, which is polynomial for subset minimal explanations but P NP for cardinality minimal ones.In contrast to nec, rel is harder, under common assumptions, for subset minimal than for cardinality minimal explanations.rec is hard even when the explanations signature is not restricted and no preference order is considered.
It would be interesting to apply this framework to other lightweight description logics, starting with those of the EL-family.Also, we would like to investigate other minimality criteria.For instance, semantic criteria allow one to reward explanations that are less/more constraining in terms of the models of an ontology.

4 :
Let I be the set of all individuals occurring in P and d. 5: Let u be a globally fresh anonymous individual.6: for all Σ-ABoxes E * over the individuals in I ∪ {u} s.t.|E * | ≤ 1 and ϕ( d) ∈ E * do 7: Variable y ∈ y exists such that π(y) ∈ I. Given that d ⊆ I, d ∈ ans(r, DB A∪E ), and predicates have arity at most 2, we have that d is of the form d := d , ϕ ∈ N C , and ψ ∈ N R .It follows that CQ r is of the form r(x) ← ψ(x, y) or r(x) ← ψ(y, x).Next, we consider the former case only, as the other case is symmetrical.Then, assertion ψ( t) is of the form ψ(d, π(y)).Since π(y) ∈ I, we have that ψ(d, π(y)) ∈ E. Now, let E be the ABox obtained from E by replacing each occurrence of individual π(y) with the individual u of Algorithm 1.Since E is obtained from solution E by uniformly replacing an anonymous individual with an individual that does not occur in E and P, we have that E is also a solution to P. By the definition, ϕ(d) ∈ E and ψ(d, u) ∈ E .Now, let E * := {ψ(d, u)}.Since d ∈ ans(r, DB A∪E ) is witnessed by π and by the definition of E * , we have that T , A ∪ E * |= ϕ(d).

Figure 1 :
Figure 1: The structure of A |V | for a graph G = (V, E) with 4 vertices.Solid arcs in A represent assertions Egde(a, b) in A introduced in (b).A dashed arc from an ABox A to the individual par ( ) represents the collection of assertions that relate each individual in A to par ( ) via the role P .

Table 5 .
1: Complexity of reasoning over QAPs with UCQs for DL-Lite A .All entries in the table denote completeness results, except for ⊆-rel under unrestricted explanation signatures.