• Keine Ergebnisse gefunden

5.2 Combined Complexity

In this section, we establish the combined complexity of TCQ entailment, based on procedures that solve the satisfiability problem as outlined in Section 3.3. The results of the previous section reveal that the amount of information critical for testing the DL part of that problem is polynomial (in the size of Φ) if rigid role names are not considered.

This allows us to integrate the LTL with the DL test in a nondeterministic algorithm using only polynomial space, based upon Algorithm 3.1. Regarding the remaining case with rigid role names, we however illustrate subsequently that the LTL and DL features may interact in a way that requires reasoning to consider an exponential amount of information. Specifically, we prove that entailment is co-NExpTime-complete.

5.2.1 With(out) Rigid Concept Names

In this section, we show that TCQ entailment is inPSpacew.r.t. combined complexity, which matches the hardness given by satisfiability in LTL. The key insight given by the previous section refers to the DL part of the TCQ satisfiability problem: the exponen-tially large set W does not have to be stored for testing the conditions characterizing its r-satisfiability if rigid roles are not present. This observation allows us to specify a nondeterministic procedure for deciding satisfiability—and thus also entailment—that only uses space of size polynomial in the input. The idea is described in Algorithm 3.1:

we first guess an ABox typeARand a setQ¬R ⊆ QΦ and then test the satisfiability of the LTL formula Φpa as it is done in Algorithm 2.1, but ensure additionally that the guessed worlds satisfy the conditions characterizing r-satisfiability. This approach is in line with Lemma 3.13; specifically, it integrates the r-satisfiability with the t-satisfiability test.

Recall that we can disregard ιsince its construction is trivial (i.e., we can use the first guessed world Wi ∈ W and defineι(0) =i).

In our algorithm, we refer to the functions KBCONSISTENT and CQNOTENTAILED that decide knowledge base consistency and CQ non-entailment, respectively. We can assume KBCONSISTENT to run in polynomial time in the size of both the input KB [Bra04, Thm. 5] and the nondeterministic algorithmCQNOTENTAILEDto run in polynomial time in the size of the input KB and given query [Ros07, Thm. 2]. Furthermore, we consider an enumerator WITNESSENUM which, given a CQ ϕ and an ontology O, enumerates all witnesses forϕ w.r.t.O (see Definition 5.4) as follows:4

• Construct a graph containing a node for each concept inS(O), and an edge labeled by a roleR from C toD iffO |=C v ∃R.D.

• Mark all nodesC = Con(ϕ) withϕ∈ QΦ; recall that we assume all those concepts to be contained in O.

• Enumerate allB ⊆NRC(O) and return those for which there are a roleR and con-ceptC such thatO |=dB v ∃R.C from which a marked concept Dis reachable.

It is easy to see that this approach is both sound and complete. The graph can be constructed by quadratically manyP-tests [Bra04, Thm. 5], the marking can be done in

4This idea is also implicitly used in the form of the reachability relation;in [BBL05; KKS12].

polynomial time (see Definition 5.3), and the subsequent reachability test only requires polynomial space. The latter is due to the facts that there are polynomially many possibilities for the concept ∃R.C, which can be enumerated, in the last item and that the reachability problem is in NLogSpace (e.g., see [AB09, p. 74]).

Based on the above procedures, we define our algorithm as follows.

Definition 5.14 Given a TCQ Φ and TKBK =hO,∅i satisfiability of Φ w.r.t. K can be decided by running Algorithm 3.1:

• GUESSDATA: It guesses and returns a tuple (AR, Q¬R) consisting of an ABox typeAR forO and a setQ¬R ⊆ QΦ.

• TESTRSAT: Given Φ,O,Ai, d (i.e., the tuple guessed), i, s, p, and W, it defines AQW := {ϕj | pjW} and KR := hO,AR ∪ AQWi, and returns true iff the following conditions are satisfied:

(C1) Check if KBCONSISTENT(KR) returns true.

(C2) For eachpjW: Check if CQNOTENTAILED(ϕj,[KR]+) returnstrue.

(C3) For each tree-shaped CQ ϕQ¬R andB inWITNESSENUM(ϕ,O):

Check ifCQNOTENTAILED(∃x.B(x),KR) returns true.

(C4) For eachpjW: Check if ϕjQ¬R. ♦

Observe that we have n = 0, so that our additional requirement that s > n in Al-gorithm 3.1 does not have any effects, compared to AlAl-gorithm 2.1. The next lemma summarizes the goal of our extensions.

Lemma 5.15 The nondeterministic algorithm described in Definition 5.14 decides TCQ satisfiability in EL w.r.t. a TKB hO,∅i and uses only polynomial space (in the size of all the input) if NRR =∅.

Proof. For proving correctness, we consider the conditions in Lemma 3.13.

• Let the set W be defined as the set of all worlds W encountered during a run of the procedure. The mapping ι and the conditions referring to it can be ignored by Fact 3.15.

• Regarding t-satisfiability (see Definition 3.11), it is easy to see that the above definition of W fulfills the first condition. Since Algorithm 2.1 is correct by Lemma 2.21, we run it with Φpa as input, and our extensions neither change this algorithm nor do they ever return true on their own (i.e., independently of Algorithm 2.1), it is sound w.r.t. the second condition as well; and it is complete if our extensions never return false if an r-satisfiable set W exists.

• It thus remains to show that W is r-satisfiable iff the extensions do not return false on their own. By Lemma 5.7, we can consider Conditions (C1)–(C4) from Definition 5.6. For most of the cases, it is easy to see that the checks in Defini-tion 5.14 are equivalent to the condiDefini-tions. We only consider the second test in more detail since it does not directly correspond to Condition (C2). However, we can show thatKR6|=ϕj iff [KR]+6|=ϕj: (⇐) Given [KR]+6|=ϕj, Lemma 2.13 leads

5.2 Combined Complexity

toI[K

R]+ 6|=ϕj and Fact 5.8 to [KR]6|=ϕj. (⇒) Every model ofKR is also a model of [KR]+, especially the one that does not satisfy ϕj. Hence, it suffices to check the non-entailment [KR]+6|=ϕj.

We analyze the complexity. The nondeterministic guessing of the polynomially large setsARandQ¬R can be clearly done using only polynomial space. Regarding the parts of Algorithm 2.1, we refer to Lemma 2.21. Given the observation that we only adapt that algorithm w.r.t. the r-satisfiability testing, it only remains to consider the corresponding tests. The above descriptions of the applied subprocedures show that running all of them requires only polynomial space w.r.t. combined complexity; we apply them only for inputs of size polynomial in Φ andK. Since all other checks described for testing the conditions can be done in polynomial time, our nondeterministic algorithm altogether uses only polynomial space.

We thus can conclude this section with a positive result, which holds w.r.t. arbitrary TKBs by Lemma 3.7 and in the presence of rigid concept names. Further, note that the nondeterminism is not relevant regarding PSpacecomplexity according to the well-known result of Savitch [Sav70, Thm. 1].

Corollary 5.16 TCQ entailment in EL is in PSpace regarding combined complexity if NRR=∅, even ifNRC6=∅.

Altogether, we have shown that important and powerful features of LTL, (i) the pos-sibility to discern exponentially many different time points and (ii) the nondeterminism provided by operators such as disjunction or negation, do not interact with the EL on-tology in a way that is critical for the combined complexity of TCQ entailment, even if rigid concept names are considered. As it is the case for LTL, reasoning can still be done with a PSpaceTuring machine.

5.2.2 With Rigid Role Names

In this section, we show that rigid role names may cause dangerous interactions between the LTL and theELpart that cannot be captured byPSpaceTuring machines any more:

the LTL features can discern exponentially many time points and nondeterministically choose specific assertions at each of them, and theEL part can correspondingly discern exponentially many (rigid) concepts instantiated by different individuals that are related invariant to time. For that reason, the LTL choices can be transferred selectively (i.e., addressing only some of the individuals) along these relations via the ontology and

“saved” at those individuals—again via rigid names. We in the following show that such complex interactions lead toNExpTime-hardness of TCQ satisfiability; the proof is similar to the one for EL-LTL for the case with rigid concept names in Section 4.8.

The corresponding containment result directly follows from Lemmas 3.17 and 5.1.

Corollary 5.17 TCQ entailment in EL is in co-NExpTime in combined complexity, even if NRR 6=∅.

We prove co-NExpTime-hardness of entailment in the presence of rigid role names by reducing the 2n+1-bounded domino problem to TCQ satisfiability. The idea is based on the features outlined above. The exponentially many different time points, each

associated with a specific rigid concept and individual instantiating it, represent the po-sitions in the plane of the domino. We ensure that these individuals are, by a rigid role R, related to a common successor, a named individual used for synchronization. To tile the plane, we represent the domino types as flexible concepts and enforce the named individual to always satisfy one of them, by nondeterministically choosing the corre-sponding assertion. The ontology is used to transfer that choice to the R-predecessor that represents the position corresponding to the current time point and to save it at that individual via a rigid concept. In this way, we ensure that all positions and the chosen types are instantiated in every world, which allows us to enforce the matching conditions.

The basic idea of the reduction is thus the same as in theNExpTime-hardness proof for satisfiability in EL-LTL regarding rigid concept names; note that the latter, in turn, is based on a reduction in [BGL12]. In those proofs, the synchronization of the domain individuals with the named individual is achieved via local GCIs and disjunction in the GCIs, respectively, allowed in the respective context. In contrast, we here need the rigid role to synchronize (a large enough subset of) the domain individuals with the named individual, which is done by using the latter as a common role successor of the former.

Note that we cannot simply used global GCIs of the form > v. . . instead since, then, all individuals would have to always satisfy all domino types.

Theorem 5.18 TCQ entailment inEL isco-NExpTime-hard in combined complexity if NRR 6=∅.

Proof. For the proof, we reduce the 2n+1-bounded domino problem, for a domino systemDwith initial condition I, to checking the satisfiability of a TCQ ΦD,I w.r.t. an EL TKBhOD,I,∅i, both containing rigid role names. Since the reduction of the domino system is very similar to the above mentioned reduction to satisfiability in EL-LTL (see Theorem 4.8), we only point out the differences to that proof. In particular, we here apply exactly the same symbols and consider only one rigid role R in addition.

The rigid role is necessary here to transfer specific flexible concepts that are chosen nondeterministically through assertions on a named individual a to the entire domain;

we cannot use local GCIs as allowed in EL-LTL. However, as outlined above, it is actually enough to transfer the concepts to all R-predecessors of a if we require them to correspondingly represent the domino plane; in the proof for EL-LTL, the plane is represented by arbitrary elements. In particular, the (flexible) global5 concepts, whose interpretation is either empty or > and which are applied for synchronization in the other proof, have a slightly different interpretation here: their value is shared by aand all its R-predecessors.

Observe that we focus on the first part of the reduction and thus on an EL-LTL formula; recall that ⊥ is only eliminated in the very last step of the proof. We next regard all conjuncts of the target formula created in the proof for EL-LTL (i.e., these conjuncts are EL-LTL formulas) and in the following specify corresponding conjuncts (i.e., TCQs) and GCIs, such that ΦD,I consists of a conjunction of these TCQs andOD,I

of the GCIs:

5Not to be confused withrigidoralways (in time).