Chair for Automata Theory LTCS – Report On the Complexity of Axiom Pinpointing in Description Logics

We investigate the computational complexity of axiom pinpo i ting in Description Logics, which is the task of finding minimal subsets of a knowledge base that have a given consequence. We consider the problems of enumerating such subsets with and with out order, and show hardness results that already hold for the propositional Horn fragment, or fo r the Description LogicEL. We show complexity results for several other related decision and e numeration problems for these fragments that extend to more expressive logics. In particular we show t at hardness of these problems depends not only on expressivity of the fragment but also on the shape of the axioms used.


Introduction
Description Logics (DLs) [BCM + 03] are a well-established family of logic-based knowledge representation formalisms that are used to represent the conceptual knowledge of an application domain in a structured and formally well-understood way.DLs have proven successful in various application domains, but they have gained increased attention due to the fact that they provide the logical underpinning of OWL [HPSvH03], the standard ontology language for the semantic web.As a consequence of this standardization, several ontology editors [KFNM04, KPS + 06, HTR06], now support OWL and ontologies written in OWL are employed in more and more applications.As the size of these ontologies grows, tools that support knowledge engineers in maintaining their quality become more important.In real world applications often the knowledge engineer not only wants to know whether her ontology has a certain (unwanted) consequence or not, but also wants to know why it has this consequence.Even for KBs of moderate size, finding explanations for a given a consequence is not an easy task without getting support from an automated tool.The task of finding explanations for a given consequence, i.e., minimal subsets of the original KB that have the given consequence is called axiom pinpointing in the literature.
Existing work on axiom pinpointing in DLs can be classified under two main categories, namely the glass-box approach, and the black-box approach.The idea lying under the glass-box approach is to extend the existing reasoning algorithms such that while reasoning, at the same time they can keep track of the axioms used, and detect which of the axioms in the KB are responsible for a given consequence.In [SC03] a pinpointing extension of the well-known tableau-based satisfiability algorithm for the DL ALC [SSS91] has been introduced.Later in [PSK05], this approach has been further extended to DLs that are more expressive than ALC.In [MLBP06] a pinpointing algorithm for ALC with general concept inclusions (GCIs) has been presented by following the approach in [BH95].In order to overcome the problem of developing a pinpointing extension for every particular tableau-based algorithm, a general pinpointing extension for tableau algorithms has been developed in [BP07,BP10].Similarly, an automata-based general approach for obtaining glass-box pinpointing algorithms has been introduced in [BP08,BP09].
In contrast to the glass-box approach, the idea lying under the black-box approach is to make use of the existing highly optimized reasoning algorithms wihout having to modify them.The most naïve blackbox approach would of course be to generate every subset of the originial KB, and ask a DL reasoner whether this subset has the given consequence or not, which obviously is very inefficient.In [KPHS07] more efficient approaches based on Reiter's hitting set tree algorithm [Rei87] have been presented.The experimental resuts in [KPHS07] demonstrate that this approach behaves quite well in practice on realistic KBs written in expressive DLs.A similar approach has successfully been used in [HPS09] for explaining inconsistencies in OWL ontologies.The main advantages of the black-box approach are that one can use existing DL reasoners, and that it is independent of the DL reasoner being used.In [HPS08] the black-box approach has been used for computing more fine grained explanations, i.e., not just the set of relevant axioms in the KB but parts of these axioms that actually lead to the given consequence.
Although various methods and aspects of axiom pinpointing have been considered in the literature, its computational complexity has not been investigated in detail yet.Obviously, axiom pinpointing is at least as hard as reasoning.Nevertheless, especially for tractable DLs it makes sense to investigate whether explanations for a consequence can efficiently be enumerated or not.In [BPS07] it has been shown that a given consequence can have exponentially-many explanations (there called MinAs, which stands for minimal axiom sets), and checking the existence of a MinA within a cardinality bound is NP-complete.There it has also been shown that in a setting where MinAs are required to contain certain (static) part of the KB, then the set of all MinAs cannot be computed in output polynomial time.
In [PS09] among other results we have shown that without the static part this problem is at least as hard as computing minimal transversals of a hypergraph.We have also shown that if the MinAs are required to be output in a specified order, then the problem is not solvable with polynomial delay.
In the present paper we present several new interesting complexity results on axiom pinpointing.We give a polynomial delay algoritm for enumerating MinAs in the Horn setting, show that for dual-Horn KBs the problem is at least as hard as hypergraph transversal enumeration, and for EL KBs it is not output polynomial.We show that if MinAs are required to be output in a specified order, then for dual-Horn and EL KBs this cannot be done with polynomial delay.We also consider several other decision and enumeration problems on MinAs in different settings.

Preliminaries
We briefly recall basic notions from propositional logic, DLs, and complexity of enumeration.In propositional logic we build formulae using a set of propositional variables and the Boolean connectives ¬ (negation), ∨ (disjunction) and ∧ (conjunction).A variable or its negation is called a literal, and a disjunction of literals is called a clause.A clause is called a Horn (dual-Horn ) clause if it contains at most one positive (negative) literal, and a definite Horn (dual-Horn) clause if it contains exactly one positive (negative) literal.A Horn clause p 1 ∨ ¬p 2 ∨ ¬p 3 can also be written as an implication of the form p 2 ∧ p 3 → p 1 .Throughout the text we will call definite Horn (dual-Horn) clauses just Horn (dual-Horn) clauses for short.We will call clauses with exactly one positive and one negative literal like p 1 → p 2 as core clauses.
In DLs one formalizes the relevant notions of an application domain with concept descriptions.Concept descriptions are inductively built with the help of a set of constructors, starting with a set N C of concept names and a set N R of role names.EL concept descriptions are formed using the three constructors ⊓, ∃ Syntax Semantics We will refer to both propositional clauses and EL GCIs as axioms, and a set of axioms as a knowledge base (KB).We will say that a KB is a Horn (core, dual-Horn, EL) KB if it contains only Horn (core,dual-Horn,EL) axioms.We are going to formulate our problems in a generic way without referring to a specific type of KB, and show our results for each KB type separately.
In complexity theory, we say that an algorithm runs with polynomial delay [JYP88] if the time until the first solution is generated, and thereafter the time between any two consecutive solutions is bounded by a polynomial in the size of the input.We say that it runs in output polynomial time if it outputs all solutions in time polynomial in the size of the input and the output.

Complexity of Enumerating All MinAs
The main problem we consider is, given a KB and a consequence of it, computing all MinAs for this consequence in the given KB.We start with the definition of a MinA.
Definition 1.Let K be a set of axioms and ϕ be a logical consequence of it, i.e., K |= ϕ.We call a set M ⊆ K a minimal axiom set or MinA for ϕ in K if M |= ϕ and it is minimal w.r.t.set inclusion.
Our problem is formally defined as follows: Problem: MINA-ENUM Input: A KB K and an axiom ϕ of the same type such that K |= ϕ.
Output: The set of all MinAs for ϕ in K.
Note that for core KBs, which are basically directed graphs, a MinA is a simple path between two given vertices, and enumerating all MinAs corresponds to enumerating all simple paths between two given vertices, which can easily be done with polynomial delay.However, the situation is not so clear for Horn KBs.To the best of our knowledge, only [NPA06] considers a problem related to ours on directed hypergraphs, but it is not exactly the one considered here.

Enumeration without a Specific Order
We start with the Horn setting and show that for this setting MinAs can efficiently be enumerated by giving a polynomial delay algorithm.The algorithm depends on the following particular notion.
Definition 2. Let K be a Horn KB, and φ = n i=1 a i → b be an axiom in K.We denote the left handside (lhs) of φ with T(φ), and its right handside (rhs) with h(φ), i.e., T(φ) := {a 1 , . . ., a n } and h(φ) := b.With h −1 (b) we denote the set of axioms in K whose rhs are b.Let M = {t 1 , . . ., t m } be a MinA for a∈A a → c.We call an ordering t 1 < . . .< t m a valid ordering on M if for every It is easy to see that for every MinA M there is always at least one such valid ordering.In the following, we use this fact to construct from a given MinA a set of KBs that precisely contain the remaining MinAs.Definition 3. Let M be a MinA in K with |M| = m, and < be a valid ordering on M. For each 1 ≤ i ≤ m we obtain a KB K i from K as follows: (i) for each j s.t.i < j ≤ m remove all axioms in h −1 (h(t j )) except for t j , i.e., remove all axioms with the same rhs as t j except for t j itself.(ii) remove t i .Lemma 4. Let M be a MinA for φ in K, and let K 1 , . . ., K m be constructed from K and M as in Definition 3.Then, for every MinA N for φ in K that is different from M, there exists exactly one i, where Assume there is an axiom t ∈ N s.t.t ∈ K k .t should be one of the axioms removed from K either in step (i), or in step (ii) of Definition 3. It cannot be step (ii) because t k ∈ N since t k ∈ M \ N .Thus it should be step (i).This implies that there exists a j, k < j ≤ m, such that t j satisfies h(t) = h(t j ).Recall that we chose j to be the largest axiom in M \ N w.r.t. the valid ordering < on M. Then this t j should be in N .But then N contains two axioms with the rhs h(t), which contradicts with the fact that N is a MinA, and thus it is minimal.Hence, N ⊆ K k .

Now take an
Lemma 4 gives an idea of how to compute the remaining MinAs from a given one.Algorithm 1 describes how we can use this lemma for enumerating all MinAs.
Theorem 5. Algorithm 1 solves MINA-ENUM for Horn KBs with polynomial delay.
Proof.The algorithm terminates since K is finite.It is sound since its outputs are MinAs for φ in K.
Completeness follows from Lemma 4.
In each recursive call of the algorithm there is one consequence check (line 2), and one MinA computation (line 4).The consequence check can be done in polynomial time by the well-known linear-time algorithm in [DG84].One MinA can be computed in polynomial time by iterating over the axioms in K and removing an axiom if remaining ones still have the consequence.Thus the algorithm spends at most polynomial time between each output, i.e., it is polynomial delay.
Algorithm 1 Enumerating all MinAs for Horn KBs end for 11: end if Next we consider MINA-ENUM for dual-Horn KBs.For this, we first investigate the following decision problem which is is closely related to MINA-ENUM.As we will see, determining its complexity is important for determining the complexity of MINA-ENUM.

Problem: ALL-MINAS
Input: A KB K and an axiom ϕ of the same type such that K |= ϕ, and a set of KBs K ⊆ P(K).Question: Is K precisely the set of all MinAs for ϕ in K?
As Proposition 6 shows, if ALL-MINAS cannot be decided in polynomial time, then MINA-ENUM cannot be solved in output polynomial time.Proposition 6.If ALL-MINAS cannot be decided in polynomial time, then MINA-ENUM cannot be solved in output-polynomial time.
Proof.Assume we have an algorithm A that solves MINA-ENUM in output-polynomial time.Let its runtime be bounded by a polynomial p(IS, OS) where IS denotes the size of the input KB and OS denotes the size of the output, i.e., the set of all MinAs.
In order to decide ALL-MINAS for an instance given by K, ϕ, and K ⊆ P(K), we construct another algorithm A ′ that works as follows: it runs A on K and ϕ for at most p(|K|, |K |)-many steps.If A terminates within this many steps, then A ′ compares the output of A with K and returns yes if and only if they are equal.If they are not equal, A ′ returns no.If A has not yet terminated after p(|K|, |K |)-many steps, this implies that there is at least one MinA that is not contained in K , so A ′ returns no.It is easy to see that the runtime of A ′ is bounded by a polynomial in |K| and |K |, that is A ′ decides ALL-MINAS in polynomial time.
This proposition shows that the complexity of ALL-MINAS is indeed closely related to the complexity of MINA-ENUM.It is not difficult to see that, for all types of axioms considered in this paper, ALL-MINAS is in coNP: given an instance of ALL-MINAS, a nondeterministic algorithm can guess a subset of K that is not in K , and in polynomial time verify that this is a MinA, thus K is not the set of all MinAs.In the following we show that for dual-Horn KBs ALL-MINAS is at least as hard as recognizing the set of all minimal transversals of a given hypergraph.However, whether it is coNP-hard remains unfortunately open.We later show that ALL-MINAS is coNP-complete if Horn-EL axioms are considered.
First we briefly recall some basic notions on hypergraphs.A hypergraph [Ber89] and a set of (hyper)edges E = {E j | 1 ≤ j ≤ m} where E j ⊆ V .Following the convention in [Ber89] we assume that the set of edges as well as the set of vertices is nonempty, and the union of all edges yields the vertex set.A set W ⊆ V is called a transversal of H if it intersects every edge of H, i.e., ∀E ∈ E. E ∩ W = ∅.A transversal is called minimal if no proper subset of it is a transversal.The set of all minimal transversals of H constitutes another hypergraph on V called the transversal hypergraph of H, which is denoted by T r(H).Generating T r(H) is an important problem which has applications in many fields of computer science [GKMT97,EG02,Hag08].It is defined as follows: Problem: TRANSVERSAL ENUMERATION (TRANS-ENUM) Input: A hypergraph H = (V, E) on a finite set V .Output: The edges of the transversal hypergraph T r(H).
The well-known decision problem associated to this computation problem is defined as follows: Problem: TRANSVERSAL HYPERGRAPH (TRANS-HYP) Question: Is G the transversal hypergraph of H, i.e., does T r(H) = G hold?
Complexity of TRANS-HYP has been investigated in detail in the literature [EG91, EG95b, EGM03, EMG08, KS03].It is known to be in coNP, but its lower bound is a prominent open problem.So far neither a polynomial time algorithm has been found, nor has it been proved to be coNP-hard.In a landmark paper [FK96] Fredman and Khachiyan proved that MONOTONE BOOLEAN DUALIZATION, which is another well known problem that is computatitionally equivalent to TRANS-HYP, can be solved in n o(log n) time.This implies that TRANS-HYP is most likely not coNP-hard.It is conjectured that this problem, together with several computationally equivalent problems, forms a class properly contained between P and coNP [FK96].
In the following we say that a decision problem π is TRANS-HYP-hard if TRANS-HYP can be reduced to π by a standard polynomial transformation.We say that π is TRANS-HYP-complete if it is TRANS-HYPhard and π can be reduced to TRANS-HYP by a polynomial transformation.
Proof.Let an instance of TRANS-HYP be given by the hypergraphs H = (V, E H ) and G = (V, E G ).
From H and G we construct an instance of ALL-MINAS as follows: for every vertex v ∈ V we introduce a propositional variable p v , for every edge E ∈ E H a propositional variable p E , and finally one additional propositional variable a.For constructing a dual-Horn KB from H and a set of vertices W ⊆ V , we define the following operator, which is also going to be used in later proofs: Using these we construct the KB K := K V,H , a set of KBs K := {K E,H | E ∈ E G } ⊆ P(K), and the axiom ϕ := a → E∈EH p E that follows from K. Obviously this construction creates an instance of ALL-MINAS for dual-Horn KBs and it can be done in time polynomial in the sizes of H and G.
We claim that G is the transversal hypergraph of H if and only if K is precisely the set of all MinAs for ϕ in K.Note that a → v∈V p v is the only axiom in K such that a appears on the lhs, which implies that every MinA must contain this axiom.Hence, every MinA is of the form K W,H for some W ⊆ V .To prove our claim, it suffices to show that a set of vertices W ⊆ V is a minimal transversal of H if and only if the set of axioms K W,H is a MinA.
(⇒) Assume that W is a minimal transversal of H.By definition W satisfies W ∩ E = ∅ for every E ∈ E H .This implies that K W,H |= ϕ holds.Moreover, K W,H is minimal since W is minimal, i.e., K W,H is a MinA.
(⇐) Now assume that K W,H is a MinA.Then every p E where E ∈ E H appears on the rhs of at least one of the axioms in K W,H .This implies that W intersects every E, i.e., it is a transversal of H. Moreover it is minimal since K W,H is minimal.

Corollary 8. MINA-ENUM for dual-Horn KBs is at least as hard as enumerating hypergraph transversals.
Next we show that ALL-MINAS becomes intractable for Horn-EL KBs.
Proof.We have already shown that it is in coNP.To show coNP-hardness, we present a reduction from the following coNP-hard problem [EG91,BPS07].

Problem: ALL-MV
Input: A monotone Boolean formula φ and a set V of minimal valuations satisfying φ.Question: Is V precisely the set of all minimal valuations satisfying φ?
Let φ, V be an instance of ALL-MV; we denote as sub(φ) the set of all subformulas of φ, and define csub(φ) := sub(φ) \ {p ∈ sub(φ) | p is a propositional variable}.We introduce three concept names B ψ , C ψ , D ψ , and two role names r ψ , s ψ for every subformula ψ of φ and two additional concept names A and E. For each ψ ∈ sub(φ) we define a TBox T ψ as follows: if ψ is the propositional variable p, then Notice that for every T ′ ⊆ T , if T ′ |= A ⊑ E, then also A ⊑ D ψ for every ψ ∈ csub(φ).But in order to have A ⊑ D ψ , all the axioms in T ψ are necessary, and thus This in particular shows that V is the set of all minimal valuations satisfying φ iff The following is an immediate consequence of Theorem 9 and Proposition 6.
Corollary 10.For Horn-EL TBoxes MINA-ENUM cannot be solved in output polynomial time, unless P =NP.

Enumeration in a Specified Order
We now consider the case when MinAs are required to be output in a specified lexicographic order.The lexicographic order we use is defined as follows: Definition 11.Let the elements of a set S be linearly ordered.This order induces a linear strict order on P(S), which is called the lexicographic order.We say that a set R ⊆ S is lexicographically smaller than a set T ⊆ S where R = T if the first element at which they disagree is in R.

Problem: FIRST-MINA
Input: A KB K and an axiom ϕ of the same type such that K |= ϕ, a MinA M for ϕ in K, and a linear order on K. Question: Is M the first MinA w.r.t. the lexicographic order induced by the given linear order?Theorem 12. FIRST-MINA is coNP-complete for dual-Horn KBs.
Proof.The problem is in coNP.If M is not the lexicographically first MinA, a proof of this can be given by guessing a subset of K and verifying in polynomial time that it is a MinA, and it is lexicographically smaller than M.
In order to show coNP-hardness, we present a reduction from the problem of checking whether a given maximal independent set is the lexicographically last maximal independent set of a given graph.Recall that a maximal independent set of a graph G = (V, E) is a subset V ′ ⊆ V of the vertices such that no two vertices in V ′ are joined by an edge in E, and each vertex in V \ V ′ is joined by an edge to some vertex in V ′ .This problem is known to be coNP-complete [JYP88].

Problem: LAST MAX. INDEPENDENT SET (LAST-MIS)
Input: A graph G = (V, E), a maximal independent set S ⊆ V , and a linear order on V .Question: Is S the last maximal independent set w.r.t. the lexicographic order induced by the given linear order?
Let an instance of LAST-MIS be given with the graph G = (V, E) and the maximal independent set S. From G and S we construct an instance of FIRST-MINA as follows: We construct the sets K W,G as in the proof of Theorem 7, and consider the axiom ϕ := a → E∈E p E that follows from K V,G .Additionally by using S we construct the set of axioms M := K V \S,G .Note that K V,G contains exactly |V |+1 axioms.We order these axioms such that an axiom with premise p v comes before the axiom with premise p v ′ if and only if the vertex v comes before the vertex v ′ in the originally given linear order on V .Finally we place ϕ as the last one.It is easy to see that this construction indeed creates an instance of FIRST-MINA for dual-Horn KBs, and it can be done in time polynomial in the sizes of G and S. We claim that S is lexicographically the last maximal independent set if and only if M is lexicographically the first MinA.
(⇒) Assume S is the lexicographically last maximal independent set.Then V \ S contains at least one vertex from every edge (i.e., it is a vertex cover), since otherwise S would not be an independent set.Thus every p E , for E ∈ E, appears on the rhs of at least one axiom in M. That is M |= ϕ holds.Since S is maximal, V \ S and thus M is minimal, i.e., M is a MinA.Moreover it is lexicographically the first one since S is lexicographically the last maximal independent set.
(⇐) Assume M is lexicographically the first MinA.Then every p E , for E ∈ E, appears on the rhs of at least one axiom in M since otherwise M |= ϕ would not hold.That is, V \ S contains at least one vertex from every edge.Then S contains at most one vertex from every edge, i.e., it is an independent set.Since M is minimal, V \ S is also minimal, and thus S is maximal.That is, S is a maximal independent set.Moreover it is lexicographically the last one since M is the lexicographically first MinA.
Since generating the lexicographically first MinA is already intractable, Theorem 12 has the following consequence: Corollary 13.Unless P = NP, MinAs cannot be enumerated for dual-Horn KBs in lexicographic order with polynomial delay.
Next we consider the problem for Horn-EL KBs.Theorem 14. FIRST-MINA is coNP-complete for Horn-EL KBs.
Proof.The problem is clearly in coNP.To show hardness, we give a reduction from LAST-MIS.Let G = (V, E) and S be an instance of LAST-MIS.From G we construct a Horn-EL TBox T as follows: first we introduce a concept P E for every E ∈ E, and concepts P v , Q v and role name r v for each v ∈ V , and additionally two concept names A, B. For every v ∈ V we construct the TBox We then define the Algorithm 2 Enumerating all MinAs in reverse lex.order 1: ALL-MINAS-REV-ORDER(K,φ) 2: ⊲ (K a Horn KB, φ an axiom s.t.K |= φ) 3: Q := {K} 4: while Q = ∅ do 5: end for 13: end while and finally, for a set of W ⊆ V , we define Notice that for every We now order the axioms in T V as follows: first appear all the axioms A ⊑ P v using the same order of V , and afterwards are all the axioms in T f in any order.Then S is the last maximal independent set iff Although computing the first MinA is coNP-hard for both dual-Horn and Horn-EL KBs, interestingly computing the last MinA is polynomial for all types of KBs we consider here.We start iterating over the axioms of the KB with the axiom that is the smallest one w.r.t. the linear order on KB, and remove an axiom if the remaining ones still have the given conseqence.The resulting set of axioms is lexicographically the last MinA.Even more interestingly, we now give an algorithm for Horn KBs that enumerates MinAs in reverse lexicographic order with polynomial delay.
Our algorithm keeps a set of KBs in a priority queue Q.These KBs are the "candidates" from which the MinAs are going to be computed.Each KB can contain zero or more MinAs.They are inserted into Q by the algorithm at a cost of O(n • log(M )) per insertion, where n is the size of the original KB and M is the total number of such KBs inserted.Note that M can be exponentially bigger than n since there can be exponentially many MinAs.That is the algorithm uses potentially exponential space.The other operation that the algorithm performs on Q is to find and delete the maximum element of Q.The maximum element of Q is the KB in Q that contains the lexicographically largest MinA among the MinAs contained in all other KBs in Q.This operation can also be performed within O(n • log(M )) time bound.The time bounds for insertion and deletion depend also on n since they require a last MinA computation.
Theorem 15.Algorithm 2 enumerates MinAs in the Horn setting in reverse lexicographic order with polynomial delay.
Proof.The algorithm terminates since K is finite.Soundness is shown as follows: Q contains initially only the original KB K. Thus the first output is lexicographically the last MinA in K.By Lemma 4 the MinA that comes just before the last one is contained in exactly one of the K i s that are computed and inserted into Q in lines 10 and 11.In line 5 J is assigned the KB that contains this MinA.Thus the next output will be the MinA that comes just before the lexicographically last one.It is not difficult to see that in this way the MinAs will be enumerated in reverse lexicographic order.By Lemma 4 it is guaranteed that the algorithm enumerates all MinAs.
In one iteration, the algorithm performs one find operation and one delete operation on Q, which both take time O(n • log(M )), and a MinA computation that takes O(n) time.In addition it performs at most n K i computations, and at most n insertions into Q.Each K i computation takes O(n 2 ) time, and each insertion takes O(n•log(M )) time.The total delay is thus O(2•(n•log(M ))+n+n•(n 2 +n•log(M ))) = O(n 3 ).

Preferred and Unwanted Axioms
Next we investigate the problem of existence of a MinA that does not contain any of the given sets of axioms.This problem can be useful in applications where one wants to avoid certain combinations of axioms in the MinAs.

Problem: MINA-IRRELEVANCE
Input: A KB K and an axiom ϕ of the same type such that K |= ϕ, and a set K ⊆ P(K).Question: Is there a MinA M for ϕ in K such that S ⊆ M for every S ∈ K ?Theorem 16.MINA-IRRELEVANCE is NP-complete for dual-Horn KBs.
Proof.The problem is clearly in NP.A nondeterministic algorithm for solving it first guesses a set M ⊆ K, then tests in polynomial time whether it is a MinA that does not contain any of the S in K .
For showing hardness we give a reduction from the NP-hard hypergraph 2-coloring problem [GJ90].
Question: Is H 2-colorable, i.e., is there a W ⊆ V such that for all E ∈ E, W ∩E = ∅ and (V \W )∩E = ∅?
Let an instance of HYPERGRAPH 2-COLORING be given with the hypergraph H = (V, E).We construct an instance of MINA-IRRELEVANCE as follows: as in the proof of Theorem 7, we construct the KB K := K V,H and the axiom ϕ contructed there, as well as a set of KBs K = {K E,H | E ∈ E}.It is easy to see that this construction indeed creates an instance of MINA-IRRELEVANCE for dual-Horn KBs and it can be done in time polynomial in the size of H.We claim that H is 2-colorable if and only if there is a MinA M for ϕ in K such that M satisfies S ⊆ M for every S ∈ K .
(⇒) Assume H is 2-colorable.Then there is a W ⊆ V such that W ∩ E = ∅ and (V \ W ) ∩ E = ∅ for every E ∈ E, i.e., both W and its complement are transversals of H. Assume w.l.o.g. that W is minimal.We claim that K W,H is the MinA we are looking for.Since W is a transversal, every p E for E ∈ E, appears on the rhs of at least one axiom in K W,H .That is K W,H |= ϕ holds.K W,H is minimal since W is minimal.Moreover, since V \ W is also a transversal, every edge E ∈ E contains at least one vertex that is not in W . Thus every S ∈ K contains at least one axiom that is not in K W,H .In other words, K W,H is a MinA that is not a superset of any S ∈ K .
Since M is a MinA for ϕ, for every E ∈ E it contains at least one axiom on whose rhs p E occurs.That is, W M intersects every E ∈ E. Since M is not a superset of any S ∈ K , every S contains at least one axiom that is not in M.This that every E ∈ E contains at least one vertex that is not in W M .That is, V \ W M intersects every E ∈ E. Thus we have shown that W M is a 2-coloring of H.

Theorem 17. MINA-IRRELEVANCE is NP-complete for Horn-EL TBoxes
If K is a core KB, the problem boils down to the problem of counting simple paths between two vertices of a given directed graph.This problem called S-T CONNECTEDNESS has already been considered in [Val79b].

Problem: S-T CONNECTEDNESS
Input: A directed graph G = (V, E), and two vertices s, t ∈ V .Output: The number of subgraphs of G in which there is a path from s to t.
In [Val79b] it has been shown that this problem is #P-complete.#P is defined [Val79a] as the class of functions counting the accepting paths of nondeterministic Turing machines.Typical members of this class are the problems of counting the number of solutions of NP-complete problems.Among them, the most well-known one is #SAT, which is the problem of counting the distinct truth assignments that satisfy a given Boolean formula in CNF.
Since core KBs are the simplest type of KB, the hardness result applies to the other KB types we consider here.Moreover for the most expressive fragment we consider, namely EL, the problem of checking whether a given set of axioms is a MinA is polynomial.This implies that for this fragment, and all others considered here, #MINA is is in #P, thus it is #P-complete.
Next we consider another counting problem.Instead of the number of all MinAs, one can also be interested in the number of MinAs that contain a specific axiom.If we are trying to explain an unwanted consequence, the solution of this counting problem will allow us to detect axioms that are most likely to be faulty, i. e. those that appear in the most MinAs.This idea has been proposed in [SHCH07] as a heuristic for correcting an error while minimizing the changes in the set of axioms.
Problem: #MINA-RELEVANCE Input: A KB K and an axiom φ of the same type such that K |= φ, and an axiom ψ ∈ K. Output: The number of all MinAs for φ in K that contain ψ.
Proof.The problem is in #P since given a Horn KB K, an axiom φ that follows from K, an axiom ψ ∈ K, and a candidate solution K ′ ⊆ K, we can in polynomial time verify that K' is a MinA and it contains ψ.
For showing #P-hardness we give a parsimonious reduction from #MINA for core KBs, which has been shown to be #P-hard above.Given an instance of #MINA with the core KB K and the axiom a → b we construct the Horn KB K ′ := K ∪ S, where S = {a → c, b ∧ c → d}, and c and d are two fresh propositional variable names not occurring in K.It is not difficult to see that a set M ⊆ K is a MinA for a → b in K if and only if M ∪ S is a MinA for a → d in K ′ .Moreover, every MinA for a → d in K ′ contains the axioms in S. Thus, there are exactly as many MinAs for a → b in K as there are for a → d in K' containing the axiom a → c.
Obviously, Theorem 20 implies that #MINA is #P-complete for Bool and Horn-EL KBs.

Concluding Remarks and Future Work
We have analyzed the complexity of axiom pinpointing and many related problems in the propositional Horn fragment and in the DL EL.Our hardness results extend to more expressive DLs.Tables 2 and 3 summarize our results where TH stands for TRANS-HYP, TE stands for transversal enumeration, '-h'  stands for hard, and '-c' stands for complete.As future work we are going to work on determining the exact complexity of ALL-MINAS problem for dual-Horn KBs.We are going to check whether it is equivalent to the TRANS-HYP problem.We are also going to investigate the complexity of ALL-MINAS for more expressive DLs to see whether it remains in the same complexity class as reasoning.

Table 1 :
Syntax and semantics of EL. and ⊤ as shown in the upper part of Table 1.An EL TBox is a finite set of general concept inclusion axioms (GCIs), whose syntax is shown in the lower part of Table 1.The semantics of EL is defined in terms of interpretations I = (∆ I , • I ), where the domain ∆ I is a non-empty set of individuals, and the interpretation function • I maps each concept name A ∈ N C to a subset A I of ∆ I and each role name r ∈ N R to a binary relation r I on ∆ I .The mapping • I can be extended to arbitrary concept descriptions as shown in the second colum of Table 1.An interpretation I is a model of a TBox T if, for every GCI in T the conditions on the semantics column of Table 1 are satisfied.The main inference problem for EL is the subsumption problem: Given two EL concept descriptions C, D and an EL TBox T , check if C is subsumed by D w.r.t.T (written T |= C ⊑ D), i.e, check if C I ⊆ D I holds in every model I of T .We will call a concept description simple if it is of the form A or ∃r.A for A ∈ N C , r ∈ N R , and a GCI a Horn-EL GCI if it is of the form C 1 ⊓ . . .⊓ C n ⊑ D, where C i , D are simple concept descriptions, 1 ≤ i ≤ n.

Table 2 :
Complexity of related decision and counting problems

Table 3 :
Complexity of MINA-ENUM in different settings