• Keine Ergebnisse gefunden

The Price of Selfishness: Conjunctive Query Entailment for ALCSelf is 2EXPTIME-hard

N/A
N/A
Protected

Academic year: 2022

Aktie "The Price of Selfishness: Conjunctive Query Entailment for ALCSelf is 2EXPTIME-hard"

Copied!
8
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

The Price of Selfishness:

Conjunctive Query Entailment for ALC

Self

is 2 E X P T I M E -hard

Bartosz Bednarczyk,

1,2

Sebastian Rudolph

1

1Computational Logic Group, Technische Universit¨at Dresden, Germany

2Institute of Computer Science, University of Wrocław, Poland {bartosz bednarczyk, sebastian.rudolph}@tu-dresden.de

Abstract

In logic-based knowledge representation, query answering has essentially replaced mere satisfiability checking as the infer- encing problem of primary interest. For knowledge bases in the basic description logicALC, the computational complex- ity of conjunctive query (CQ) answering is well known to be EX PTI M E-complete and hence not harder than satisfiability.

This does not change when the logic is extended by certain fea- tures (such as counting or role hierarchies), whereas adding others (inverses, nominals or transitivity together with role- hierarchies) turns CQ answering exponentially harder.

We contribute to this line of results by showing the surpris- ing fact that even extendingALCby just theSelfoperator – which proved innocuous in many other contexts – increases the complexity of CQ entailment to 2 EX PTI M E. As common for this type of problem, our proof establishes a reduction from alternating Turing machines running in exponential space, but several novel ideas and encoding tricks are required to make the approach work in that specific, restricted setting.

1 Introduction

Formal ontologies are of significant importance in artificial intelligence, playing a central role in the Semantic Web, ontology-based information integration, or peer-to-peer data management. In such scenarios, an especially prominent role is played bydescription logics(DLs) (Baader et al. 2017) – a robust family of logical formalisms used to describe ontolo- gies and serving as the logical underpinning of contemporary standardised ontology languages. To put knowledge bases to full use as core part of intelligent information systems, much attention is being devoted to the area of ontology-based data- access, withconjunctive queries(CQs) being employed as a fundamental querying formalism (Ortiz and Simkus 2012).

In recent years, it has become apparent that various mod- elling features of DLs affect the complexity of CQ answering in a rather strong sense. Let us focus on the most popular DL,ALC. It was first shown in (Lutz 2008) that CQ entail- ment is exponentially harder than the consistency problem forALC extended with inverse roles (I). Shortly after, a combination of transitivity and role-hierarchies(SH)was shown as a culprit of higher worst-case complexity of rea- soning (Eiter et al. 2009). Finally, also nominals(O)turned Copyright © 2022, Association for the Advancement of Artificial Intelligence (www.aaai.org). All rights reserved.

out to be problematic (Ngo, Ortiz, and Simkus 2016). Nev- ertheless, there are also more benign DL constructs regard- ing the complexity of CQ entailment. Examples are count- ing (Q) (Lutz 2008) (the complexity stays the same even for expressive arithmetical constraints (Baader, Bednarczyk, and Rudolph 2020)), role-hierarchies alone(H)(Eiter, Or- tiz, and Simkus 2012) or even a tamed use of higher-arity relations (Bednarczyk 2021a).

Our results. We study CQ entailment inALCSelf, an exten- sion ofALCwith theSelfoperator,i.e. a modelling feature that allows us to specify the situation when an element is related to itselfby a binary relationship. Among other things, this allows us to formalise the concept of a “narcissist”:

Narcissistv ∃loves.Self or to express that no person is their own parent:

Personv ¬∃hasParent.Self.

The Self operator is supported by the OWL 2 Web Ontol- ogy Language and the DL SROIQ(Horrocks, Kutz, and Sattler 2006). Due to the simplicity of theSelf operator (it only refers to one element), it is easy to accommodate for automata techniques (Calvanese, Eiter, and Ortiz 2009) or consequence-based methods (Ortiz, Rudolph, and Simkus 2010) and thus, so far, there has been no real indication that the added expressivity provided by Self may change any- thing, complexity-wise. Arguably, this impression is further corroborated by the observation thatSelffeatures in two pro- files of OWL 2 (the EL and the RL profile), again without harming tractability (Kr¨otzsch, Rudolph, and Hitzler 2008).

In this work, however, we show a rather counter-intuitive result, namely that CQ entailment forALCSelf is exponen- tially harder than forALC. Hence, it places the seemingly innocuous Self operator among the “malign” modelling features, like(I),(SH)or(O). Moreover, this establishes 2 EX PTI M E-hardness of query entailment for the Z fam- ily (a.k.a. ALCHbregSelf) of DLs (Calvanese, Eiter, and Or- tiz 2009), which until now remained open as well as the 2 EX PTI M E-hardness of querying the forward guarded frag- ment (Bednarczyk 2021a) with equality.

Our proof goes via encoding of computation trees of alter- nating Turing machines working in exponential space and follows the general hardness-proof-scheme by Lutz 2008.

(2)

However, to adjust the schema toALCSelf, novel ideas are required: the ability to speak about self-loops is exploited to produce a single query that traverses trees in a root-to- leaf manner and to simulate disjunction inside CQs, useful to express that certain paths are repeated inside the tree.

For space reasons, we will argue model-theoretically while refraining from presenting the axiomatisations in the main paper (they follow mostly standard ideas), but they can be found in our arXiV report (Bednarczyk and Rudolph 2021).

2 Preliminaries

We recall the basics on description logics (DLs) (Baader et al.

2017) and query answering (Ortiz and Simkus 2012).

DLs. We fix countably-infinite pairwise disjoint sets ofin- dividual namesNI,concept namesNC, androle namesNR

and introduce the description logicALCSelf. Starting from NCandNR, the setCofALCSelfconceptsis built using the following concept constructors:negation(¬C),conjunction (CuD),existential restriction(∃r.C), thetop concept(>),

andSelf concepts(∃r.Self), with the grammar:

C,D ::= > | A | ¬C | CuD | ∃r.C | ∃r.Self, whereC,D∈C,A∈NC, andr ∈NR. We often employ disjunctionCtD := ¬(¬Cu ¬D), universal restrictions

∀r.C :=¬∃r.¬C, bottom⊥:=¬>, and the less commonly used “inline-implication”C→D :=¬CtD.

Assertionsare of the formC(a)orr(a,b)fora,b∈NI, C∈C, andr ∈NR. Ageneral concept inclusion(GCI) has the formCvDfor conceptsC,D∈C. We useC≡Das a shorthand for the two GCIsCvDandDvC. Aknowledge base(KB)K= (A,T)is composed of a finite non-empty set A(ABox) of assertions and a finite non-empty setT (TBox) of GCIs. We call the elements ofA ∪ T axioms.

Name Syntax Semantics

top concept > ∆I

concept name A AI⊆∆I

role name r rI⊆∆I×∆I

conc. negation ¬C ∆I\CI conc. intersection CuD CI∩DI

exist. restriction ∃r.C {d| ∃e.(d,e)∈rI∧e∈CI} Self concept ∃r.Self {d|(d,d)∈rI}

Table 1: Concepts and roles inALCSelf.

Axiomα I |=α, if

CvD CI ⊆DI TBoxT C(a) aI∈CI ABoxA r(a,b) (aI,bI)∈rI

Table 2: Axioms inALCSelf.

The semantics ofALCSelf is defined via interpretations I = (∆II)composed of a non-empty set∆I called the domain ofI, and aninterpretation function·Imapping indi- vidual names to elements of∆I, concept names to subsets

of∆I, and role names to subsets of∆I×∆I. This map- ping is extended to concepts (see Table 1) and finally used to definesatisfactionof assertions and GCIs (see Table 2). We say that an interpretationIsatisfiesa KBK = (A,T)(or Iis amodelofK, written:I |=K) if it satisfies all axioms ofA ∪ T. A KB isconsistent(orsatisfiable) if it has a model, andinconsistent(orunsatisfiable) otherwise.

Ahomomorphismh: I → J is a concept-name and role- name-preserving function that maps every element of∆Ito some element from∆J,i.e. we have thatd ∈ AI implies thath(d)∈AJ and(d,e)∈rIimplies(h(d),h(e))∈rJ for all role/concept namesr ∈NR,A∈NCandd,e∈∆I. Queries. Booleanconjunctive queries(CQs) are conjunc- tions ofatoms of the form r(x,y) orA(z), where r is a role name,A is a concept name, and x,y,z are variables from a countably infinite setNV. Given a CQ q, we de- note with|q|the number of its atoms, and withVar(q)the set of all variables. LetI be an interpretation,q a CQ and π : Var(q) → ∆I be a variable assignment. We write I |=π r(x,y) if (π(x), π(y)) ∈ rI, and I |=π A(z) if π(z)∈AI. We say thatπis amatchforIandqifI |=πα holds for every atomα∈q, and thatIsatisfiesq(denoted with:I |= q) wheneverI |=π q for some matchπ. The definitions are lifted to KBs:qisentailedby a KBK(writ- ten:K |= q) if every modelI ofK satisfiesq. We stress here that satisfaction of conjunctive queries is preserved by homomorphisms,i.e. ifI |=qand there is a homomorphism fromh : I → J thenJ |=q. WhenI |= KbutI 6|= q, we callIacountermodelforKandq. Thequery entailment problemasks ifK |=qholds for an input KBKand a CQq.

Whenever convenient, we employ thepath syntaxof CQs to write queries in a concise way. By apath expressionwe mean an expression of the form

(A0?;r1; A1?;r2; A2?;. . .; An−1?;rn; An?)(x0,xn) with allri∈NR,Ai∈NC∪{>}, serving as a shorthand for

n

^

i=0

Ai(xi)∧

n

^

i=1

ri(xi−1,xi).

WheneverAihappens to be>, it will be removed from the expression; this does not create ambiguities. Note that path CQs are just syntactic sugar and should not be mistakene.g.

with regular path queries.

2.1 Alternating Turing Machines

We next fix the notation of alternating Turing machines over a binary alphabet{0,1}working in exponential space (simply: ATMs). An ATM is defined as a tuple M = (N,Q,Q,sI,sA,sR,T), whereQis a finite set ofstates(usu-

ally denoted withs); Q ⊆ Qis a set of existentialstates;

sI,sA,sR ∈ Qare, respectively, pairwise differentinitial, accepting, andrejectingstates; we assume thatsI ∈(Q\Q).

T⊆(Q×{0,1})×({0,1}×Q×{−1,+1})is thetransition relation; and the natural numberN(encoded in unary) is a parameter governing the size of the working tape. We call the states fromQ:=Q\Quniversal. The size ofM, denoted with|M|, isN+|Q|+|Q|+ 3 +|T|.

(3)

Aconfiguration ofMis a wordwsw0 ∈ {0,1}Q{0,1} with|ww0|= 2N. We callwsw0(i) existential (resp. universal) ifsis existential (resp. universal), (ii) final ifsis eithersA

orsR(iii) non-final if it is not final (iv) accepting ifs=sA. Successor configurations are defined in terms of the tran- sition relationT. Fora,b,c,d ∈ {0,1}andv,v0,w,w0 ∈ {0,1} with|v| =|w|, we letwbs0w0be aquasi-successor configuration ofvsav0 whenever(s,a,b,s0,+1) ∈ T, and we letws0dbw0be a quasi-successor configuration ofvcsav0 whenever(s,a,b,s0,−1)∈T. If additionally we meet the re- quirementw=v,w0=v0, andc=dwe speak ofsuccessor configurations.1

Without loss of generality, we make the following addi- tional assumptions aboutM: First, for each non-final (i.e.

non-accepting and non-rejecting) state s and every letter a∈ {0,1}the setT(s,a) :={(s,a,b,s0, d)∈T}contains exactly two elements, denotedT1(s,a)andT2(s,a). Hence, every configuration has exactly two successor configurations.

Second, for any(s,a,b,s0, d) ∈ T, ifsis existential then s0 is universal and vice versa. Third, the machine reaches a final state no later than after22N steps (for configuration sequences). Fourth and last,Mnever attempts to move left (resp. right) on the left-most (resp. right-most) tape cell.

ArunofMis a finite tree, with nodes labelled by config- urations ofM, that satisfies all the conditions below:

• the root is labelled with the initial configurationsI02N,

• each node labelled with a non-final existential configura- tionwsw0has a single child node which is labelled with one of the successor configurations ofwsw0,

• each node labelled with a non-final universal configura- tionwsw0has two child nodes which are labelled with the two successor configurations (wrt.T1andT2) ofwsw0,

• no node labelled with a final configuration has successors.

Quasi-runsofMare defined analogously by replacing the notions of successors with quasi-successors. Note that every run is also a quasi-run but not vice versa.

An ATM M is (quasi-)accepting if it has an accepting (quasi)-run, i.e. one whose all leaves are labelled by ac- cepting configurations. By (Chandra and Stockmeyer 1976) the problem of checking if a given ATM is accepting is 2 EX PTI M E-hard.

3 A High-Level Overview of the Encoding

LetMbe an ATM. The core contribution of our paper is to present a polynomial-time reduction that, givenM, con- structs a pair(KM,qM)— composed of anALCSelf knowl- edge base and a conjunctive query — such thatKM6|=qM

iffMis accepting. Intuitively, the models ofKwill encode accepting quasi-runs ofM,i.e. trees in which every node is a meaningful configuration ofM, but the tape contents of consecutive configurations might not be in sync as they should. The queryqMwill be responsible for detecting such errors. Hence, the existence of a countermodel forKMand

1In words, this corresponds to the common definition of suc- cessor configurations, while for quasi-successor configurations, un- touched tape cells may change arbitrarily during the transition.

qMwill coincide with the existence of an accepting run of M. The intended models ofKMlook as follows:

The depicted triangles are called theconfiguration trees and encode configurations ofM. The information contained in these configuration trees is “superimposed” on identical configuration units: full binary trees of heightN+1decorated with many self-loops2that will provide the “navigational in- frastructure” for the queryqMto detect “tape mismatches”.

Every such tree has2Nnodes at its N-th level and each of these nodes represents a single tape cell of a machine. The (N+1)-th level of nodes will serve a technical purpose that will be explained later. Lastly, the roots of configuration units store all remaining necessary information required for encod- ing: the current state ofM, the previous and the current head position as well as the transition used to arrive at this node from the previous configuration. Finally, the roots of config- uration trees are interconnected by the rolenext indicating that(r,r0)∈ nextI holds iff the configuration represented byr0is a quasi-successor of the configuration ofr.

4 Configuration Units

In our encoding, a vital role is played by n-configuration units, which will later form the backbone of configura- tion trees. Roughly speaking, eachn-configuration unit is a full binary tree of depthn, decorated with certain concepts, roles, and self-loops. We introduce configuration units by providing the formal definition, followed by a graphical de- piction and an intuitive description. In order to represent con- figuration units inside interpretations, we employ role names fromRunitas well as concept names fromCunit:

Runit:={`i,ri,next|1≤i≤n}

Cunit:={Lvl0,Lvli,L,R,Ad0i,Ad1i |1≤i≤n}.

Definition 4.1(configuration unit). Given a numbern, an n-configuration unitUis an interpretation(∆UU)with

U ={0,1}≤n :={w∈ {0,1}| |w| ≤n},

`iU ={(w, w0)| |w|=i−1} ∪ {(w, w)|w∈∆U}, riU ={(w, w1)| |w|=i−1} ∪ {(w, w)|w∈∆U}, nextU ={(w, w)| |w|=n},

LvlUi ={w∈∆U| |w|=i},

LU\{ε}={w0∈∆U} and RU= ∆U\LU, (Adbi)U ={w∈∆U| |w| ≥iand its i-th letter isb}.

2The concrete purpose of the abundant presence of self-loops will only become clear later, starting from Corollary 4.4.

(4)

The following drawing depicts a2-configuration unit.

As one can see, the nodes in the tree are layered into levels ac- cording to their distance from the root. Nodes at thei-th level are members of theLvliconcept and their distance from the root is equal toi. Next, each non-leaf node at thei-th level has two children, the left one and the right one (satisfying, respectively, the conceptsLandR) and is connected to them via the role`i andri, respectively. All nodes are equipped with`i- andri-self-loops and all leaves are additionally en- dowed withnext-loops. With all nodes inside the tree, we naturally associate their addresses,i.e. their “numbers” when nodes from thei-th level are enumerated from left to right.

In order to encode the address of a given node at thei-th level, we employ conceptsAdb1,Adb2, . . . ,Adbiwith “values”

beither0or1, meaning that a node is inAdbjiff thej-th bit of its address is equal tob. The most significant bit isAdb1.

It is routine to axiomatisen-configuration units (cf. tech- nical report). The provided axiomatisation is made formally precise by the following lemma:

Lemma 4.2. There is anALCSelf-KBKnunit such that each n-configuration unit is a model ofKnunit. For any modelIof Kunitn and anyd ∈LvlI0 there is ann-configuration unit U and a homomorphismhfromUintoIwithh(ε) = d.

At this point, we would like to give the reader some intu- itions why units are decorated with different self-loops. First, we show that their presence can be exploited to navigate top- down through a given unit.

Lemma 4.3. LetUbe ann-configuration unit. Then for all w∈∆Uwe have(ε, w)∈`1U◦r1U◦. . .◦`nU◦rnUwith “◦”

denoting the composition of relations,i.e.sU◦tU:={(c,e)| (c,d)∈sUand(d,e)∈tUfor somed}.

Sketch. For simplicity we usesiUas an abbreviation of`1U◦ r1U◦. . .◦`iU ◦riU. The proof is by induction, where the assumption is that for all1≤i≤nwe have that all words wof length at mostisatisfy(ε, w)∈siU.

As a corollary of Lemma 4.3, we conclude that there is a singleCQ detecting root-leaf pairs in units.

Corollary 4.4. LetU be ann-configuration unit. There is a single conjunctive queryqrlwithx0,x2n∈Var(qrl)such that the setM ={(π(x0), π(x2n)) | U |=π qrl}is equal to the set of root-leaf pairs fromU,i.e.LvlU0 ×LvlUn.

Proof. Takeqrl:= (Lvl0?;`1;r1;. . .;`n;rn; Lvln?)(x0,x2n).

The correctness follows from Lemma 4.3.

5 From Units to Configuration Trees

In the next step, we enrich (N+1)-configuration units with additional concepts, allowing the units to represent a meaningful configuration of our ATM M = (N,Q,Q,sI,sA,sR,T). To this end, we employ a variety of new concept names from Cconf consisting of HdHere,NoHdHere,Sts,HdPosbi,HdLeta,Leta,0,1, wheres∈Q, b∈ {0,1}, i∈ {1, . . . ,N},a∈ {0,1}.

Before turning to a formal definition we first describe how configurations are structurally represented in models. Recall that a configuration ofMis a wordwsw0 with|ww0| = 2N (calledtape) ands∈Q. In our encoding, this configuration will be represented by an(N+1)-configuration unitCdeco- rated by concepts fromCconf. The interpretationCstores the states, by associating the state conceptStsto its root. The tape contentww0 is represented by the internal nodes ofC:

thei-th letter ofww0(i.e. the content of the ATM’si-th tape cell) is represented by thei-th node (according to their binary addresses) at theN-th level. In case this letter is0, the corre- sponding node will be assigned the conceptLet0, while1is represented byLet1. Yet, for reasons that will become clear only later, the tape cells’ content is additionally represented in another way: if it is0, then we label thei-th node’s left child with0and its right child with1. The reverse situation is implemented when node represents the letter1. Finally, there is a unique tape cell that is visited by the head ofM and the node corresponding to this cell is explicitly marked by the conceptHdHerewhile all other “tape cell nodes” are marked byNoHdHere. In order to implement this marking correctly, the head’s position’s address needs to be explicitly recorded. Consequently,C’s root node stores this address (bi- narily encoded using theHdPosbi concepts) and from there, these concept assignments are broadcast to and stored in all tape cell nodes on theN-th level. Similarly, we decorateC’s root with the conceptHdLetameaning that the current letter scanned by the head isa.

After this informal description and depiction, the formal definition of configuration trees should be plausible.

Definition 5.1(configuration tree). Aconfiguration treeC ofMis an interpretationC = (∆CC)such thatC is an (N+1)-configuration unit additionally satisfying:

• There exists a unique states∈Qsuch that(Sts)C ={ε}

and(Sts0)C =∅for alls0 6=s.

• (LvlN+1)C =0C∪1C and 0C∩1C =∅.

(5)

• (Let0)C ={w| w0∈0C, w1 ∈1C},(Let1)C ={w | w0∈1C, w1∈0C}, and(Let0)C∪(Let1)C = LvlCN.

• There is a unique word whead of length N witnessing HdHereC={whead}andNoHdHereC=LvlCN\ {whead}.

• For1≤i≤Nandb∈ {0,1}s.t.whead∈(Adbi)C we put (HdPosbi)C = LvlC0∪LvlCN and(HdPos1−bi )C =∅.

• HdLetCa = {ε} andHdLetC1−a = ∅, where a is the unique letter from{0,1}such thatwhead∈LetCa.

The axiomatisation Kconf of configuration trees can be found in the technical report, together with the proof of:

Lemma 5.2. Any configuration treeC is a model ofKconf. For anyI |= Kconfandd ∈ LvlI0 there is a configuration treeCand a homomorphismhfromCintoIwithh(ε) = d.

6 Enriching Configuration Trees

Recall that the purpose of configuration trees is to place them inside a model that describes the run of the Turing machine M. In particular, this will require to describe the progression of one configuration to another. In order to prepare for that, we next introduce an extended version of configuration trees that are enriched by additional information pertaining to their predecessor configuration in a run. To this end, we use new concept names fromCenr:={PTrnst,Init,PHdHere, NoPHdHere,PHdAbv,NoPHdAbv,PHdPosbi,PHdLeta}, witht∈T,1≤i≤N,b∈ {0,1}, anda∈ {0,1}. We use Cptrto denote the set{Init,PTrnst|t∈T}.

The conceptPTrnst, assigned to the root, indicates the transition, through which the configuration has been reached from the previous configuration, while Init is used as its replacement for the initial configuration. In addition, con- ceptsPHdPosbi andPHdLetaare attached to the root in or- der to — in a way very similar toHdPosbi andHdLeta— indicate the previous configuration’s head position as well as the letter stored in that position on the current config- uration’s tape. For the sake of our encoding we also em- ploy the conceptsPHdHere,NoPHdHerethat play the role analogous to the HdHere and NoHdHere concept from configuration-trees. For technical reasons, we also introduce the conceptsPHdAbvandNoPHdAbvthat will label nodes on the(N+1)-th level iff their parent is labelled with the cor- responding concept from{PHdHere,NoPHdHere}.

Definition 6.1 (enriched configuration tree). An enriched configuration treeEofMis an interpretationE= (∆EE) such thatEis a configuration tree additionally satisfying the following conditions on concepts fromCenr:

• There is exactly one conceptC∈ Cptr for whichCE = {ε}and for allC0∈Cptr\ {C}we have(C0)E =∅.

• PTrnsE(s,a,b,s0,d) = {ε} implies(Sts0)E = {ε} for all transitions(s,a,b,s0, d)∈T.

• PHdHereE={wphd}andNoPHdHereE=LvlEN \ {wphd} for theN-digit binary wordwphdencoding

– the number obtained aswhead−d(see: Definition 5.1) wheneverPTrnsE(s,a,b,s0,d)={ε}, or

– the number0in caseInitE ={ε}.

• PHdAbvE = {w0, w1 | w ∈ PHdHereE} and NoPHdAbvE = LvlEN+1\PHdAbvE.

• (PHdPosbi)E = LvlE0∪LvlEN and (PHdPos1−bi )E = ∅ for all1≤i≤Nand0≤b≤1withwphd∈(Adbi)E.

• PHdLetEa ={ε}andPHdLetE1−a =∅, whereais the unique letter from{0,1}such thatwphd∈LetEa.

• InitE={ε}impliesε∈LE,StEsI={ε},LetE0= LvlEN, and HdPos0i = PHdPos0i = LvlE0∪LvlEN for all1≤i≤N.

The corresponding axiomatisationKenras well as the proof of the following lemma can be found in the technical report.

Lemma 6.2. Any enriched configuration tree ofEis a model ofKenr. For any modelI ofKenrand anyd ∈ LvlI0, there is an enriched configuration treeE and a homomorphismh fromEintoIwithh(ε) = d.

7 Describing Accepting Quasi-Runs

Recall that a quasi-runRofMis simply a tree labelled with configurations ofMwhere the root is labelled with the initial configurationsI02N. Each node representing an existential configuration has one child labelled with a quasi-successor configuration, while each node representing a universal con- figuration has two children labelled by quasi-successor con- figurations obtained via different transitions.

In order to represent an accepting quasi-run by a model, we employ the notion of aquasi-computation treeQ, a structure intuitively defined from someR as follows: replace every node ofRby its corresponding configuration tree, adequately enriched with information about its generating transition and the predecessor configuration. The roots of these enriched configuration trees are linked via thenextrole to express the quasi-succession relation ofR. The roots of enriched config- uration trees representing universal configurations are chosen to be labelled withL, their leftnext-child withLand their rightnext-child withR (both corresponding to existential configurations). As expected, theInitconcept decorates the root of the distinguished enriched configuration tree that rep- resentsR’s initial configuration. As our attention is restricted toacceptingquasi-runsR, we require that no enriched con- figuration tree occurring in Qcarries a rejecting state. We now give a formal definition of such a structureQ.

Definition 7.1(quasi-computation tree). Aquasi-computa- tion treeQofMis an interpretationQ= (∆QQ)satisfy- ing the following properties:

• ∆Q:=T×{0,1}≤N+1, whereTis3a prefix-closed subset of{10,00}· {ε,0,1}withw1∈Timplyingw0∈T.

• For everyw∈T, the substructure ofQinduced by{w}×

{0,1}≤N+1 is isomorphic to an enriched configuration tree ofMvia the isomorphism(w, w)7→w.

• (ε,w)∈RQifwends with1, otherwise(ε,w)∈LQ.

• For anyw6=w0and arbitraryw, w0 ∈ {0,1}≤N+1holds ((w, w),(w0, w0))∈/ sQfor anys∈Runit\ {next}.

3Tis just a binary tree in which nodes at thei-th level have exactly2children ifiis even and exactly one child otherwise.

(6)

• nextQ\ {(d,d) | ∆Q×∆Q} = {((w, ε),(wb, ε)) | wb,w∈T,b∈ {0,1}}.

• InitQ={(ε, ε)}.

• For anyw0∈Twith(w, ε)∈StQs and(w, ε)∈LetQa – ifw1∈Tthen(w0, ε)∈PTrnsQT

1(s,a)and(w1, ε)∈ PTrnsQT

2(s,a),

– ifw1 ∈/ Tthen(w0, ε)∈ PTrnsQT

1(s,a)or(w0, ε) ∈ PTrnsQT

2(s,a).

• If (w, w) ∈ HdHereQ and wb ∈ T then (wb, w) ∈ PHdHereQ.

• StQsR=∅as well as(w, ε)∈StQsAiffw∈Tandw06∈T.

LetTMbe the set of all GCIs presented so far (plus the additional ones used to axiomatise quasi-computations) and letAMbe an ABox composed of a single axiomInit(a)for a fresh individual namea. PutKM:= (AM,TM).

Lemma 7.2. Any accepting quasi-computation treeQofM is a model ofKM. For any modelI ofKMthere exists an accepting quasi-computation treeQand a homomorphism h:Q → Iwithh(ε, ε) =aI.

8 Detecting Faulty Runs with a Single CQ

We finally have reached the point where querying comes into play. Our last goal is to design one single conjunc- tive query that detects “faulty configuration progressions” in quasi-computation trees, meaning that it matches a pair of two positions in consecutive configuration trees representing the same cell and being untouched by the head ofMyet storing different letters. Note that the lack of such cells in a quasi-computation tree means that any two consecutive con- figuration trees represent not only quasi-successor configura- tion but actually proper successors and hence the structure as such even represents a “proper” run. We start by formalising our requirements to such a query:

Lemma 8.1. There exists a CQqMof size polynomial inN with two distinguished variablesx,ysuch that for all quasi- computation treesQwe have Q |=π qM iff there exists a wordw, a letterband a wordwof lengthN+1such that:

• π(x) = (w, w),π(y) = (wb, w),

• π(y)∈NoPHdAbvQ,

• π(x)∈0Qandπ(y)∈1Q.

Note the asymmetry in the 3rd bullet point above – we ignore the reverse constellation. Yet, due to our encoding if the reverse situation occurs then so does the original one.

Hence, every mismatch in a sense causes two inconsistencies from the point ofN+1-level nodes. This solves the mystery of introducing levelN+1in our configuration trees and the particular encoding of tape symbols: it is crucial for catching faulty progressions by using one single CQ. Before prov- ing Lemma 8.1 we show how it implies our main theorem:

Theorem 8.2. Conjunctive query entailment overALCSelf

knowledge bases is2 EX PTI M E-hard.

Proof. It suffices to show that CQ non-entailment over ALCSelf KBs is 2 EX PTI M E-hard. Take KM as defined

in Section 7 andqM as given by Lemma 8.1. We claim that KM 6|= qM iff M is accepting. The “if” direction is easy: we take an accepting run of M and turn it into quasi-computation treeQ. By Lemma 7.2 we conclude that Q |= KM. We also have thatQ 6|= q due to the fact that any two consecutive configuration trees represent proper suc- cessor configurations. For the second direction it suffices to show that ifMis not accepting thenKM |= qM. Indeed, assume thatMis not accepting and letIbe a model ofKM. By Lemma 7.2 there is a quasi-computation treeQ and a homomorphismh : Q → I withh(ε, ε) = aI. But this quasi-computation tree must represent a “faulty” run – in the opposite case it would correspond to an accepting run ofM, which does not exist by assumption. Hence there must be a match ofqMtoQ. As query matches are preserved under homomorphisms, we concludeI |=qM. Thus all modelsI ofKMhave matches ofqM, which impliesKM|=qM.

In the forthcoming query definitions, we employ a con- venient naming scheme. By writingq[x,y]we indicate that the variablesx,y ∈Var(q)areglobal(i.e. the same across (sub)queries that we might join together) while its other vari- ables are local (i.e. pairwise different from any variables occurring in other queries — this can always be enforced by renaming). Going back to the query, we proceed as follows.

We first prepare a queryqmain[x,y]with two global distin- guished variablesx,y that relates any two domain elements whenever they are leaf nodes of consecutive computation trees. Thenqmain[x,y]is combined with queriesqadri [x,y]for all1 ≤ i ≤ N+1with the intended meaning thatx andy have the samei-th bit of their addresses. Additionally, our final query will require thatxbe mapped to a node satisfying 0andy to a node satisfying1andNoPHdHere.

To constructqmain[x,y]we essentially employ Lemma 4.3.

Lemma 8.3. There exists a CQqmain[x,y]such that for any quasi-computation treeQthe setMqmain :={(π(x), π(y))| Q |=π qmain}is composed precisely of any pair of leaves of two consecutive configuration trees ofQ. Formally:Mqmain= ((w, w),(wb, v))∈∆Q| |w|=|v|=N+1,b∈ {0,1} .

Proof. It suffices to takeqmain:=qrl[xr,x]∧next(xr,yr)∧ qrl[yr,y]. LetQ |=πqmain. ThatMqmainis a superset of the set above follows from the fact that quasi-computation trees are computation units and hence, containment follows by Corol- lary 4.4. We now focus on the other direction. Note that by the 5th item of Definition 7.1 we know thatπ(xr)andπ(yr) must be two distinct roots of enriched configuration trees Exr,Eyr. By the 4th item of Definition 7.1 we know that the interpretation of thers and`s is restricted to pairs of domain elements located inside the same enriched configuration tree (and by their definition to configuration trees and by their definition to configuration units). Sinceqrlonly employs the roles`i,riand the conceptsLvl0,LvlN+1we conclude that

(7)

qrlhas exactly the same set of matches inExr as in its un- derlying unit. Hence, by Corollary 4.4 we know thatx(resp.

y) is indeed mapped to a leaf ofExr (resp. to a leaf ofEyr), which finishes the proof.

The next part of our query construction focuses on sub- queriesqadri [x,y]that are meant to relate leaves having equal i-th bits of addresses. In order to construct it we combine together several smaller queries, written in path syntax below.

• We letq[x,y] := (`1;r1;. . .;`N+1;rN+1)(x,y)define the top-down query. It intuitively traverses an enriched configuration tree in a top-down manner. Note that q[x,y]is actually the major sub-query ofqrl[x,y].

• The`i-top-down queryq`i↓[x,y]is similar toq[x,y], but with the`i;ri part replaced by just`i. The intended be- havior is that again a tree is traversed from root to leaves, but this time, an `i edge must be crossed when going from the(i−1)-th to thei-th level. Theri-top-down query qri↓[x,y]is defined by replacing`i;riinq[x,y]withri. An important ingredient in the construction is the query q=0i-th bit[x,y]defined as follows:

LvlN+1(x)∧q`i↓[x0,x]∧next(x0,y0)∧q`i↓[y0,y]∧LvlN+1(y).

In total analogy, we defineq=1i-th bit[x,y]by usingqri↓instead ofq`i↓. Any matchπof the queryq=bi-th bit[x,y]instantiates the variablesx andy in a quasi-computation treeQaccord- ing to one of the following two scenarios: eitherπ(x) =π(y) orπ(x)andπ(y)are leaves in two consecutive enriched con- figuration trees inside the quasi-computation tree and both of these leaves have theiri-th address bit set tob.

Lemma 8.4. Let Q be a quasi-computation tree and let Mqi-th bit

=b ={(π(x),π(y))| Q |=πq=bi-th bit}forb∈ {0,1}. Then Mqi-th bit

=b is equal to the union ofM1b :={((w, w),(w, w))}

andM2b:={((w, ubv),(wb, u0bv0))| |u|=|u0|=i−1}.

Proof. We show the statement forb= 0, the case forb= 1 then follows by symmetry. First we showM10 ⊆ Mqi-th bit

=0 . This is easy: for any leafd = (w, w)we map all variables ofq=0i-th bit[x,y]intod; this is a match due to the presence of all the self-loops at the leaves. To showM20 ⊆Mqi-th bit

=0 we take anyd = (w, w)ande = (wb, v). Letπbe a variable assignment that mapsxtod,ytoe,x0to(w, ε),y0to(wb, ε).

The variables ofq`i↓[x0,x]are mapped to(w, wj), wherewj

is the prefix ofwof lengthjfollowing the path from(w, ε)to (w, w)level-by-level. We stress that((w, wi−1),(w, wi))∈

`Qi holds, which is crucial for the construction to work and that every(w, wj)node has all`- andr-loops. The variables ofq`i↓[y0,y] are mapped analogously. After noticing that d,e ∈ LvlQN+1 and that(π(x0), π(y0)) ∈ nextQholds, we conclude thatπis clearly a match ofq=0i-th bit[x,y]toQ.

Now we focus on showing thatMqi-th bit

=0 [x,y] ⊆M10∪M20. Take any match π and note that x,y must be mapped to leaves. Forπ(x0)andπ(y0)we consider the two cases:

1. π(x0) = π(y0). As the roots do not have next-loops, π(x0)must be a leaf. This implies that all variables of q`i↓[x0,x]map into a single domain element (otherwise

we would not reach a leaf after traversing such path). Ar- guing similarly we infer that all variables ofq`i↓[y0,y]are mapped to the same element. Thusπ(x) =π(y)holds.

2. π(x0)6=π(y0). Since all incomingnextroles from leaves are self-loops, we conclude thatπ(x0)is the root of some enriched quasi-computation tree andπ(y0)is the root of some corresponding quasi-successor inQ(by the defini- tion ofnextQ). By the satisfaction ofq`i↓[x0,x]there is a sequence of domain elements contributing to a path from π(x0)toπ(x)witnessing its satisfaction. Moreover, note that since the subqueryq`i↓[x0,x]leads from the root to a leaf it implies that we necessarily cross the`irole at the i−1-th level, meaning that thei-th bit of the address of π(x)is equal to0. Thus we infer thatπ(x) ∈ (Ad0i)Q. Analogously, we inferπ(y)∈(Ad0i)Q.

The queryqadri [x,y]pairing leaves in consecutive enriched conf. trees with coincidingi-th address bit is defined as:

qadri [x,y] :=qmain[x, y]∧q=0i-th bit[x,z]∧q=1i-th bit[z,y] Lemma 8.5. For any quasi-computation tree Q we have thatMqi

adr ={(π(x), π(y))| Q |=πqadri [x,y]}is composed precisely of the leaf pairs in two consecutive enriched config- uration trees ofQhaving equali-th bit of address, formally:

Mqi

adr =Mqmain

Ad0iQ×Ad0iQ

∪ Ad1iQ×Ad1iQ . Sketch. By employing the definition of the query, Lemma 8.4 and relational calculus.

We are finally ready to present our query by means of which we can conclude with the proof of Lemma 8.1.

qM:=VN+1

i=1qadri [x,y]∧NoPHdAbv(y)∧0(x)∧1(y) Proof of Lemma 8.1. LetqMas defined above and observe that its size is clearly polynomial inN. Note thatqMsatisfies our requirements: The 1st item follows from two lemmas:

the fact thatxandyare mapped to leaves of two consecutive enriched configuration trees follows from Lemma 8.3 and the fact thatxandyare mapped to nodes having equal addresses follows from Lemma 8.5 applied for every 1 ≤ i ≤ N+1.

The 2nd and the 3rd points hold since we supplemented our query withNoPHdAbv(y)∧0(x)∧1(y).

9 Conclusions

Conjunctive query entailment for ALCSelf is, in fact 2 EX PTI M E-complete, where membership follows from much stronger logics (Calvanese, Eiter, and Ortiz 2009).

Hardness, shown in this paper, came as a quite surprise to us (in fact, we spent quite some time trying to prove EX PTI M E- membership, see: (Bednarczyk 2021b)). The key insight of our proof (and maybe the take-home message from this pa- per) is that the presence of Self allows us to mimic case distinction over paths (and hence the handling of disjunctive information) through concatenation, by providing the oppor- tunity for one of the two disjuncts to idle by “circling in place”.

On a last note, our result holds for plainALCSelfTBoxes, since the only ABox assertionInit(a)can be replaced by the GCI> v ∃aux.Initfor an auxiliary role nameaux.

(8)

Acknowledgements

This work was supported by the ERC through the Consolida- tor Grant No. 771779.

References

Baader, F.; Bednarczyk, B.; and Rudolph, S. 2020. Satis- fiability and Query Answering in Description Logics with Global and Local Cardinality Constraints. In Giacomo, G. D.;

Catal´a, A.; Dilkina, B.; Milano, M.; Barro, S.; Bugar´ın, A.;

and Lang, J., eds.,ECAI 2020 - 24th European Conference on Artificial Intelligence, 29 August-8 September 2020, San- tiago de Compostela, Spain, August 29 - September 8, 2020, volume 325, 616–623. IOS Press.

Baader, F.; Horrocks, I.; Lutz, C.; and Sattler, U. 2017. An Introduction to Description Logic. Cambridge University Press. ISBN 978-0-521-69542-8.

Bednarczyk, B. 2021a. Exploiting Forwardness: Satisfiabil- ity and Query-Entailment in Forward Guarded Fragment. In Faber, W.; Friedrich, G.; Gebser, M.; and Morak, M., eds., Logics in Artificial Intelligence - 17th European Conference, JELIA 2021, Virtual Event, May 17-20, 2021, Proceedings, volume 12678 ofLecture Notes in Computer Science, 179–

193. Springer.

Bednarczyk, B. 2021b. Lutz’s Spoiler Technique Revisited:

A Unified Approach to Worst-Case Optimal Entailment of Unions of Conjunctive Queries in Locally-Forward Descrip- tion Logics. CoRR, abs/2108.05680.

Bednarczyk, B.; and Rudolph, S. 2021. The Price of Selfishness: Conjunctive Query Entailment for ALCSelf is 2ExpTime-hard.CoRR, abs/2106.15150.

Calvanese, D.; Eiter, T.; and Ortiz, M. 2009. Regular Path Queries in Expressive Description Logics with Nom- inals. In Boutilier, C., ed.,IJCAI 2009, Proceedings of the 21st International Joint Conference on Artificial Intelligence, Pasadena, California, USA, July 11-17, 2009, 714–720.

Chandra, A. K.; and Stockmeyer, L. J. 1976. Alternation.

In 17th Annual Symposium on Foundations of Computer Science, Houston, Texas, USA, 25-27 October 1976, 98–108.

IEEE Computer Society.

Eiter, T.; Lutz, C.; Ortiz, M.; and Simkus, M. 2009. Query Answering in Description Logics with Transitive Roles.

In Boutilier, C., ed.,IJCAI 2009, Proceedings of the 21st International Joint Conference on Artificial Intelligence, Pasadena, California, USA, July 11-17, 2009, 759–764.

Eiter, T.; Ortiz, M.; and Simkus, M. 2012. Conjunctive query answering in the description logic SH using knots.J. Comput.

Syst. Sci., 78(1): 47–85.

Horrocks, I.; Kutz, O.; and Sattler, U. 2006. The Even More Irresistible SROIQ. In Doherty, P.; Mylopoulos, J.; and Welty, C. A., eds.,Proceedings, Tenth International Confer- ence on Principles of Knowledge Representation and Rea- soning, Lake District of the United Kingdom, June 2-5, 2006, 57–67. AAAI Press.

Kr¨otzsch, M.; Rudolph, S.; and Hitzler, P. 2008. ELP:

Tractable Rules for OWL 2. In Sheth, A. P.; Staab, S.;

Dean, M.; Paolucci, M.; Maynard, D.; Finin, T. W.; and

Thirunarayan, K., eds., The Semantic Web - ISWC 2008, 7th International Semantic Web Conference, ISWC 2008, Karlsruhe, Germany, October 26-30, 2008. Proceedings, vol- ume 5318 ofLecture Notes in Computer Science, 649–664.

Springer.

Lutz, C. 2008. The Complexity of Conjunctive Query An- swering in Expressive Description Logics. In Armando, A.;

Baumgartner, P.; and Dowek, G., eds.,Automated Reason- ing, 4th International Joint Conference, IJCAR 2008, Sydney, Australia, August 12-15, 2008, Proceedings, volume 5195 of Lecture Notes in Computer Science, 179–193. Springer.

Ngo, N.; Ortiz, M.; and Simkus, M. 2016. Closed Predicates in Description Logics: Results on Combined Complexity. In Baral, C.; Delgrande, J. P.; and Wolter, F., eds.,Principles of Knowledge Representation and Reasoning: Proceedings of the Fifteenth International Conference, KR 2016, Cape Town, South Africa, April 25-29, 2016, 237–246. AAAI Press.

Ortiz, M.; Rudolph, S.; and Simkus, M. 2010. Worst-Case Optimal Reasoning for the Horn-DL Fragments of OWL 1 and 2. In Lin, F.; Sattler, U.; and Truszczynski, M., eds., Principles of Knowledge Representation and Reasoning: Pro- ceedings of the Twelfth International Conference, KR 2010, Toronto, Ontario, Canada, May 9-13, 2010. AAAI Press.

Ortiz, M.; and Simkus, M. 2012. Reasoning and Query Answering in Description Logics. In Eiter, T.; and Kren- nwallner, T., eds.,Reasoning Web. Semantic Technologies for Advanced Query Answering - 8th International Summer School 2012, Vienna, Austria, September 3-8, 2012. Proceed- ings, volume 7487 ofLecture Notes in Computer Science, 1–53. Springer.

Referenzen

ÄHNLICHE DOKUMENTE

The method of transversal fields is popular until today but the method of longitudinal fields was forgotten because it does not allow entering of ions from the outside air..

We quantify the effect of landscape configuration on summer home range sizes across multiple spatio-temporal scales using GPS data from two behaviorally distinct ungulate species,

Eiter, T., Lutz, C., Ortiz, M., Simkus, M.: Query Answering in Description Logics with Transitive Roles.. In: IJCAI 2009, Proceedings of the 21st International Joint Conference

The Three-Hares-Window in the late Gothic cloister of the Paderborn Cathedral is not only one of the town’s landmarks but at the same time the most famous Three-Hares-Motif

Der Autor beweist nun das bemer- kenswerte Resultat, dass die zw¨olf Eckpunkte der drei Quadrate in zwei Klassen mit je sechs Punkten zerfallen, so dass die Punkte beider

Recently, new configurations continue to appear, for example Morley triangles related to the Feuerbach circumferences [5], associated rectangular hyperbolas [1], triangle

(A similar Hamiltonian has been de- veloped 2 , but including molecular vibrations, relativis- tic corrections and allowance for the fact that the mo- lecular centre of gravity

Si vous restez appuyer sur les touches ‘Load/Eject’ et ‘Pause’(+ de 5 secondes) alors que les voyants se sont allumés, l’imprimante entrera dans un mode qui ne vous permettra