Uni(cid:12)cation in the Description Logic E L Without Top Constructor

Uniﬁcation in Description Logics has been proposed as a novel inference service that can, for example, be used to detect redundancies in ontologies. The inexpressive Description Logic EL is of particular interest in this context since, on the one hand, several large biomedical ontologies are deﬁned using EL . On the other hand, uniﬁcation in EL has recently been shown to be NP -complete, and thus of considerably lower complexity than uniﬁ-cation in other DLs of similarly restricted expressive power. However, EL allows the use of the top concept ( > ), which represents the whole interpretation domain, whereas the large medical ontology SNOMED CT makes no use of this feature. Surprisingly, removing the top concept from EL makes the uniﬁcation problem considerably harder. More precisely, we will show that uniﬁcation in EL without the top concept is PSpace -complete.


Introduction
Description logics (DLs) [3] are a well-investigated family of logic-based knowledge representation formalisms. They can be used to represent the relevant concepts of an application domain using concept terms, which are built from concept names and role names using certain concept constructors. The DL EL offers the constructors conjunction ( ), existential restriction (∃r.C), and the top concept ( ). From a semantic point of view, concept names and concept terms represent sets of individuals, whereas roles represent binary relations between individuals. The top concept is interpreted as the set of all individuals. For example, using the concept names Male, Female, Person and the role names child, job, the concept of persons having a son, a daughter, and a job can be represented by the EL-concept term Person ∃child.Male ∃child.Female ∃job. .
In this example, the availability of the top concept in EL allows us to state that the person has some job, without specifying any further to which concept this job belongs. Knowledge representation systems based on DLs provide their users These two concept terms are not equivalent, but they are nevertheless meant to represent the same concept. They can obviously be made equivalent by substituting the concept name Professor in the first term by the concept term Teacher Researcher and the concept name Woman in the second term by the concept term Person Female. We call a substitution that makes two concept terms equivalent a unifier of the two terms. Such a unifier proposes definitions for the concept names that are used as variables. In our example, we know that, if we define Woman as Person Female and Professor as Teacher Researcher, then the two concept terms from above are equivalent w.r.t. these definitions.
In [7] it was shown that, for the DL FL 0 , which differs from EL by offering value restrictions (∀r.C) in place of existential restrictions, deciding unifiability is an ExpTime-complete problem. In [4], we were able to show that unification in EL is of considerably lower complexity: the decision problem is "only" NPcomplete. The original unification algorithm for EL introduced in [4] was a brutal "guess and then test" NP-algorithm, but we have since then also developed more practical algorithms. On the one hand, in [6] we describe a goal-oriented unification algorithm for EL, in which nondeterministic decisions are only made if they are triggered by "unsolved parts" of the unification problem. On the other hand, in [5], we present an algorithm that is based on a reduction to satisfiability in propositional logic (SAT), and thus allows us to employ highly optimized stateof-the-art SAT solvers for implementing an EL-unification algorithm.
As mentioned above, however, SNOMED CT is not formulated in EL, but rather in its sub-logic EL − , which differs from EL in that the use of the top concept is disallowed. If we employ EL-unification to detect redundancies in (extensions of) SNOMED CT, then a unifier may introduce concept terms that contain the top concept, and thus propose definitions for concept names that are of a form that is not used in SNOMED CT. Apart from this practical motivation for investigating unification in EL − , we also found it interesting to see how such a small change in the logic influences the unification problem. Surprisingly, it turned out that the complexity of the problem increases considerably (from NP to PSpace). In addition, compared to EL-unification, quite different methods had to be developed to actually solve EL − -unification problems. In particular, we will show that-similar to the case of FL 0 -unification-EL − -unification can be reduced to solving certain language equations. In contrast to the case of FL 0 -unification, these language equations can be solved in PSpace rather than ExpTime, which we show by a reduction to the emptiness problem for alternating automata on finite words.

The Description Logics EL and EL −
The syntax of the following DLs is based on a set N C of concept names and a set N R of role names. EL-concept terms are built from concept names using the constructors conjunction C D, existential restriction ∃r.C and top concept . The syntax of the DL EL − is defined as for EL, with the exception that the concept constructor is not allowed.
The semantics of these concept terms is defined as usual, using interpretations I = (D I , · I ), which consist of a nonempty domain D I and an interpretation function · I that assigns subsets of D I to every concept name and binary relations over D I to every role name (see Table 1).
The concept term C is subsumed by the concept term D (written C D) iff C I ⊆ D I holds for all interpretations I. C is equivalent to D (C ≡ D) iff C I = D I for every interpretation I.
It is useful to know the following characterization of subsumption in EL [6]. As a special case, this result also holds for EL − -concept terms.  A concept term is called an atom iff it is a concept name or an existential restriction. The set At(C) of all atoms of any concept term C is defined as follows: • If C = , then At(C) = ∅.
• If C is a concept name, then At(C) := {C}.
Every concept term C is a conjunction of atoms C 1 , . . . , C n ; these are called the top-level atoms of C. As a special case, the concept term can be viewed as the empty conjunction (n = 0). Using these conventions, the following is an easy consequence of Lemma 1.
Lemma 2. Let C, D be concept terms. Then C D iff for every top-level atom D of D there is a top-level atom C of C with C D .
Concept names and existential restrictions ∃r.D, where D is a concept name or , are called flat atoms. A concept term is flat iff it is a conjunction of flat atoms.

Particles
Modulo equivalence, the subsumption relation is a partial order on concept terms. In EL, the top concept is the greatest element w.r.t. this order. In EL − , however, there are many incomparable maximal concept terms. We will see below that these are exactly the concept terms of the form ∃r 1 .∃r 2 . . . . ∃r n .A for role names r 1 , . . . , r n and a concept name A. We call such concept terms particles and often abbreviate them by ∃r 1 . . . r n .A. Thus, particles ∃w.A are characterized by a word w ∈ N * R and a concept name A ∈ N C . In the case that w = ε, we have ∃w.A = A.
The set Part(C) of all particles of an EL − -concept term C is defined as follows.
• If C is a concept name, Part(C) := {C}.
For example, the particles of the concept A ∃r.(A ∃r.B), where A, B ∈ N C and r ∈ N R , are A, ∃r.A and ∃rr.B. The next lemma states that particles are indeed the maximal concept terms w.r.t. subsumption in EL − and characterizes the particles in Part(C) for an EL − -concept term C.
Lemma 3. Let C be an EL − -concept term and B a particle.
Proof. We show both claims by induction on the length of B, i.e., the number of existential restrictions it contains.
1. If B is a concept name and B C, then Lemma 1 yields that B is the only possible top-level atom of C, which implies that B ≡ C.
Otherwise, B = ∃r.B for a particle B . Then every top-level atom of C must be of the form ∃r.C with B C . Since the particle B is shorter than B, induction yields B ≡ C for every top-level atom ∃r.C of C, which implies B ≡ C.
2. If B is a concept name, then B ∈ Part(C) is equivalent to the fact that B is a top-level atom of C, which in turn is equivalent to C B by Lemma 2.
Otherwise, B = ∃r.B for a particle B . By definition, B ∈ Part(C) is equivalent to the existence of a top-level atom ∃r.C of C with B ∈ Part(C ). By induction, this is equivalent to the existence of a top-level atom ∃r.C of C with C B . By Lemma 1, this is again equivalent to C B.

Unification in EL and EL −
In the following, let L denote one of the DLs EL or EL − .
We partition the set of concept names into a set N c of concept constants and a set N v of concept variables. An L-substitution is a mapping σ from the variables to L-concept terms. A substitution can be extended from variables to L-concept terms in the usual way. An L-concept term is called ground if it contains no variables and a substitution σ is called ground if the concept terms in the image of σ are ground.
We will use the subsumption C ? D as abbrevation for the equation C D ≡ ? C.
The problem of L-unification is to decide whether a given L-unification problem is L-unifiable. EL-unification was shown to be NP-complete in [6]. We will show that this decision problem is harder in the less expressive DL EL − ; to be precise, it is PSpace-complete.
Clearly, every EL − -unification problem Γ is also an EL-unification problem. Whether Γ is L-unifiable or not may depend, however, on whether L = EL or L = EL − . As an example, consider the problem Γ := {A ? X, B ? X}, where A, B are distinct concept constants and X is a concept variable. Obviously, the substitution that replaces X by is an EL-unifier of Γ. However, Γ does not have an EL − -unifier. In fact, for such a unifier σ, the EL − -concept term σ(X) would need to satisfy A σ(X) and B σ(X). Since A and B are particles, Lemma 3 would imply A ≡ σ(X) ≡ B and thus A ≡ B, which is not the case.
In the following, we will assume that unification problems are flat, i.e., they consist of equations between flat concept terms. By introducing new concept variables and eliminating , every EL − -unification problem Γ can be transformed in polynomial time into a flat EL − -unification problem Γ such that Γ is solvable iff Γ is solvable [6].
Given a flat unification problem Γ, we denote by At(Γ) the set of all atoms of Γ, i.e., the union of all sets of atoms of the occurring concept terms. By Var(Γ) we denote the variables that occur in Γ and by NV(Γ) := At(Γ) \ Var(Γ) the set of all non-variable atoms of Γ.
We now show that when searching for unifiers, we may restrict ourselves to ground unifiers that only contain the role names and constants that occur in the considered unification problem.
Lemma 5. Let Γ be a flat unification problem with EL − -unifier γ. Then there is a ground EL − -unifier γ of Γ such that, for every variable X, the concept term γ (X) contains only constants and role names that occur in Γ. 2 Proof. Let r be a role name and A a constant that both occur in Γ. We define the renaming function f that maps each concept term C to the concept term f (C), where every occurence of a role name that is not in Γ is replaced by r and every occurrence of a constant that is not in Γ and every occurrence of a variable is replaced by A.
It is easy to show that f preserves subsumptions, i.e., C D implies f (C) f (D) for all concept terms C, D. This can be shown using well-founded induction on the lexicographic order on pairs (C, D), where the components are ordered by ≤ as follows: The definition γ (X) := f (γ(X)) for all variables X clearly yields a ground unifier γ of Γ that has the claimed property.
In the following, we will assume that N R is the set of role names occuring in Γ and N c is the set of constants occuring in Γ. Since we are only interested in the substitution of variables occurring in Γ, we will also restrict the set N v to Var(Γ).

EL-unification by guessing acyclic assignments
The NP-algorithm for EL-unification introduced in [4] guesses, for every variable X occurring in Γ, a set S(X) of non-variable atoms of Γ. Given such an assignment of sets of non-variable atoms to the variables in Γ, we say that the variable X directly depends on the variable Y if Y occurs in an atom of S(X). Let depends on be the transitive closure of directly depends on. If there is no variable that depends on itself, then we call this assignment acyclic. In case the guessed assignment is not acyclic, this run of the NP-algorithm returns "fail." Otherwise, there exists a strict linear order > on the variables occurring in Γ such that X > Y if X depends on Y . One can then define the substitution γ S induced by the assignment S along this linear order: • If X is the least variable w.r.t. >, then γ S (X) is the conjunction of the elements of S(X), where the empty conjunction is .
The algorithm then tests whether the substitution γ S computed this way is a unifier of Γ. If this is the case, then this run returns γ S ; otherwise, it returns "fail." In [4] it is shown that Γ is unifiable iff there is a run of this algorithm on input Γ that returns a substitution (which is then an EL-unifier of Γ).

Why this does not work for EL −
The EL-unifiers returned by the EL-unification algorithm sketched above need not be EL − -unifiers since some of the sets S(X) in the guessed assignment may be empty, in which case γ S (X) = . This suggests the following simple modification of the above algorithm: require that the guessed assignment is such that all sets S(X) are nonempty. If such an assignment S is acyclic, then the induced substitution γ S is actually an EL − -substitution, and thus the substitutions returned by the modified algorithm are indeed EL − -unifiers. However, this modified algorithm does not always detect EL − -unifiability, i.e., it may return no substitution although the input problem is EL − -unifiable.
As an example, consider the EL − -unification problem where X, Y, Z are concept variables and A, B, C are distinct concept constants. We claim that, up to equivalence, the substitution that maps X to ∃r.B, Y to A B, and Z to B C is the only EL − -unifier of Γ. In fact, any EL − -unifier γ of Γ must map Y to A B and Z to B C, and thus satisfy ∃r.(A B) γ(X) and ∃r.(B C) γ(X). Lemma 2 then yields that the only possible top-level atom of γ(X) is ∃r.B. However, there is no non-variable atom D ∈ NV(Γ) such that γ(D) is equivalent to ∃r.B. This shows that Γ has an EL − -unifier, but this unifier cannot be computed by the modified algorithm sketched above.
The main idea underlying the EL − -unification algorithm introduced in the next section is that one starts with an EL-unifier, and then conjoins "appropriate" particles to the images of the variables that are replaced by by this unifier. It is, however, not so easy to decide which particles can be added this way without turning the EL-unifier into an EL − -substitution that no longer solves the unification problem.

An EL − -unification algorithm
We will now present a series of reductions that enable us to show that the unification problem for EL − is in PSpace. For the remainder of this section, let Γ be a flat EL − -unification problem. We assume that Γ is a set of flat subsumptions of the form C 1 . . . C n ? D. Every equation C 1 . . . C n ≡ ? D 1 . . . D m in Γ can equivalently be expressed by n + m such subsumptions.

Modifying the Subsumptions
The first reduction modifies Γ in such a way that only subsumptions of the form C 1 . . . C n ? X remain, where C 1 , . . . , C n are atoms of Γ and X is a variable.
We will remove all other subsumptions from Γ, but introduce new subsumptions of the form C ? X, where C is an atom and X a variable.
To this purpose, we guess a function τ : At(Γ) 2 → {0, 1}, which specifies which subsumptions between atoms of Γ should hold for the EL − -unifier we are looking for. The assignment τ (D 1 , D 2 ) = 1 for D 1 , D 2 ∈ At(Γ) means that we restrict our search to substitutions σ satisfying σ(D 1 ) σ(D 2 ). Obviously, any such mapping τ also yields an assignment and we require that this assignment is acyclic and induces an EL-unifier of Γ.
3. It represents a unifier of Γ, i.e., it satisfies the following conditions for each subsumption C 1 . . . C n ? D in Γ: (a) If D is a non-variable atom, then there is at least one C i such that τ (C i , D) = 1.
(b) If D is a variable and τ (D, C) = 1 for a non-variable atom C ∈ NV(Γ), then there is at least one C i with τ (C i , C) = 1.
Note that these conditions express the nearly same restrictions on τ as the propositional clauses that were constructed in [5] to show that EL-unifiability is in NP.
There it was shown in Proposition 3.7 that γ τ is actually an EL-unifier of Γ. From this fact it follows that if Γ has no EL-unifier, then it is impossible to guess τ with the restrictions above.
It is important to note that γ τ need not agree with τ on every subsumption between atoms of Γ. The reason for this is that τ specifies subsumptions which should hold in the EL − -unifier of Γ to be constructed. We will later construct such EL − -unifiers of Γ by adding particles to the sets Part(γ τ (X)). In the process some subsumptions that are satisfied by γ τ will become unsatisfied. However, if τ (C 1 , C 2 ) = 1 holds, then the subsumption C 1 ? C 2 will never be violated. Since we have no way of knowing beforehand which of these subsumptions will still hold, we guess them nondeterministically by guessing τ . It is clear that guessing τ and checking the above conditions can be done in NP.
We now specify the new unification problem ∆ Γ,τ that contains only simple subsumptions that have a single variable on the right-hand side. It consists of the two parts ∆ Γ and ∆ τ , which are defined as follows: For an arbitrary EL − -substitution σ we will in the following write holds for every variable X. Before we can show a connection between the unification problems Γ and ∆ Γ,τ , we need the following auxiliary lemma. We show that under some conditions on an EL − -substitution σ (most importantly S τ ≤ S σ ), we can infer σ(C) σ(D) from τ (C, D) = 1 for C ∈ At(Γ) and D ∈ NV(Γ).
• If D = ∃r.Y and σ satisfies all subsumptions of the form If D is a constant, then either C = D , in which case we immediately have σ(C ) σ(D ), or C is a variable and D ∈ S τ (C ) ⊆ S σ (C ). In the latter case, the claim follows from the definition of S σ .
It only remains to consider the case that D is a variable. Then, C D is a subsumption in ∆ τ and we have σ(C ) σ(D ) by assumption.
We can now show the following characterization regarding the two unification problems Γ and ∆ Γ,τ .
Lemma 8. Let Γ be a flat EL − -unification problem. Then the following statements are equivalent: It is easy to see that σ satisfies all the subsumptions in ∆ Γ,τ , and S τ ≤ S σ . Additionally, τ is a solution mapping: • Conditions 1(a)-(f) of Definition 6 are satisfied by the subsumption relation.
• Conditions 3(a) and 3(b) of Definition 6 are satisfied, since σ is a unifier of Γ and Lemma 2 holds.
Conversely, let τ : At(Γ) 2 → {0, 1} be a subsumption mapping for Γ and σ be an EL − -unifier of ∆ Γ,τ with S τ ≤ S σ . We will show that σ also satisfies all discarded subsumptions of the form C 1 . . . C n ? D ∈ Γ, where D is a non-variable atom of Γ.

Linear Language Inclusions
For the next section, we fix a subsumption mapping τ : At(Γ) 2 → {0, 1} for Γ. We will show that unifiability of ∆ Γ,τ (with an EL − -unifier σ satisfying S τ ≤ S σ ) can be characterized by the existence of a certain solution to a finite system of linear language inclusion over the alphabet N R and the indeterminates X 1 , . . . , X n . These inclusions are of the form where X ∈ {X 1 , . . . , X n } and each L i (i ∈ {0, . . . , n}) is a subset of N R ∪ {ε}.
A solution θ of a set of such inclusions assigns sets of words θ(X i ) ⊆ N * R to the indeterminates X i such that the specified inclusions hold. The operation ∪ is the union of sets and L i X i stands for the element-wise concatenation of the languages L i and θ(X i ). We additionally define θ(L i X i ) := L i θ(X i ) and θ(L 0 ) := L 0 .
We will now build the finite set I Γ,τ of inclusions corresponding to ∆ Γ,τ . The indeterminates of I Γ,τ are of the form X A , where X ∈ N v and A ∈ N c . For each constant A ∈ N c and each subsumption s of the form C 1 . . . C n ? X in ∆ Γ,τ , we add the following linear inclusion I A (s) to I Γ,τ : One can see that all the inclusions I A (s) for s ∈ ∆ Γ,τ are of the form (1) since ∆ Γ,τ only contains flat atoms. For example, the subsumption for constants A, B, role names r, s and variables X, Y would be translated into the two inclusions if we assume that A, B are the only constants that occur in Γ.
Intuitively, the solutions of these inclusions represent sets of particles that can be added to the corresponding variables. If θ is a solution of I Γ,τ , X is a variable, A a constant and w ∈ θ(X A ), then the particle ∃w.A is a candidate for the set Part(σ(X)) for some unifier σ of ∆ Γ,τ . We will formalize this connection in the proof of Lemma 9.
In the following, we are only interested in solutions to I Γ,τ that have the following Lemma 9. Let Γ be a flat EL − -unification problem and τ a subsumption mapping for Γ. Then ∆ Γ,τ has an EL − -unifier σ with S τ ≤ S σ iff I Γ,τ has a finite, admissible solution.
Proof. Let σ be a ground EL − -unifier of ∆ Γ,τ with S τ ≤ S σ . We define a solution θ of I Γ,τ as follows: for each variable X and constant A, we set To check that θ is a solution of I Γ,τ , consider the inclusion I A (s) for some s of the form C 1 . . . C n ? X in ∆ Γ,τ and a word w ∈ θ(X A ). By Lemma 3, we have σ(X) ∃w.A, and thus, Lemma 2 implies that there is a C i such that σ(C i ) ∃w.A. Hence, ∃w.A is a particle of σ(C i ). We show that this implies that w ∈ θ(f A (C i )) by considering the structure of C i .
(i) If C i is a constant, then it must be A, since ∃w.A is one of its particles.
Then w = ε and thus, (iii) If C i is of the form ∃r.C for a role name r and a constant or variable C , then w must be of the form rw for w ∈ N * R and ∃w .A must be a particle of σ(C ). Applying the considerations from cases (i) and (ii) to C and w yields w ∈ θ(f A (C )) and thus, In all of the above cases, we have w ∈ θ(f A (C i )), which implies that θ satisfies I A (s). Furthermore, θ is finite, since σ(X) can have only finitely many particles. Additionally, since σ is a ground EL − -substitution, for every variable X there is at least one word w X ∈ N * R and constant A X ∈ N c such that ∃w X .A X ∈ Part(σ(X)). This implies that θ is also admissible.
Conversely, let θ be a finite, admissible solution of I Γ,τ . We define the EL −substitution σ by induction on the dependency order > induced by S τ as follows. Let X be a variable and assume that σ(Y ) has already been defined for all variables Y with X > Y . We set Since θ is finite and admissible, σ is actually an EL − -substitution. The property S τ ≤ S σ follows from the fact that, for each D ∈ S τ (X), the atom σ(D) is a toplevel atom of σ(X) and thus, σ(X) σ(D) holds. It remains to show that σ is a unifier of ∆ Γ,τ .
We will show that σ satisfies all subsumptions in ∆ Γ,τ using induction on the total order > on the variables. Let X be a variable and let σ satisfy all subsumptions and have to show that every top-level atom of σ(X) subsumes some σ(C i ). There are two kinds of top-level atoms of σ(X).
If D ∈ S τ (X), then τ (X, D) = 1 and σ(D) is a top-level atom of σ(X). If s ∈ ∆ Γ , then Condition 3(b) of Definition 6 implies that there is a C i with τ (C i , D) = 1.
But also in the case that s ∈ ∆ τ , we know that s is of the form C 1 X and τ (C 1 , X) = 1 holds. By condition I.6, we deduce that τ (C i , D) = 1 holds for i = 1.
By definition of the order >, the non-variable atom D can only contain a variable Y with X > Y . By the induction hypothesis, σ satisfies all subsumptions from ∆ τ having variables smaller than X w.r.t. > on the right-hand side. Thus, we can apply Lemma 7 to conclude that σ(C i ) σ(D) holds.
The other top-level atoms of σ(X) that we have to consider are of the form ∃w.A for A ∈ N c and w ∈ θ(X A ). Since θ is a solution of I Γ,τ , it satisfies the inclusion I A (s), which implies that there is a C i such that w ∈ θ(f A (C i )). We consider the following cases: (iii) In the remaining case that C i = ∃r.C for a role name r and a variable or constant C , we have w ∈ θ({r}f A (C )). Thus, w is of the form rw for w ∈ θ(f A (C )). Applying the considerations from cases (i) and (ii) to C and w yields the subsumption σ(C ) ∃w .A, which implies σ(C i ) = ∃r.σ(C ) ∃r.∃w .A = ∃w.A.

Maximal Solutions
To obtain a PSpace-decision procedure for the unification problem in EL − , we need to check for finite, admissible solutions of finite sets of inclusions of the form (1). Later, we will construct automata that recognize exactly the maximal solutions of such problems. In this section, we bridge the gap between finite and maximal admissible solutions.
In the following, let I be a finite set of inclusions of the form (1), Σ be the underlying alphabet, and Ind(I) denote the set of indeterminates occurring in I.
First, we establish the existence of a maximal solution for such problems w.r.t. to the following order on solutions. If θ 1 and θ 2 are two solutions of I, then we write θ 1 ⊆ θ 2 if θ 1 (X) ⊆ θ 2 (X) holds for all X ∈ Ind(I). Furthermore, if (θ i ) i∈I is a family of solutions, then their union is defined as the mapping i∈I θ i (X) := i∈I θ i (X) for all X ∈ Ind(I). Proof. Let (θ i ) i∈I be a nonempty family of solutions of I and consider an inclusion by monotonicity of ∪ w.r.t. ⊆ and idempotency, associativity, and commutativity of ∪. Thus, i∈I θ i is also a solution of I.
The empty union θ ∅ , for which θ ∅ (X) = ∅ holds for all indeterminates X, is always a trivial solution of I. These facts imply the existence of a maximal solution of I w.r.t. ⊆. Now we establish a connection between finite and maximal solutions that map some variables to a nonempty set.
Lemma 11. Let X be an indeterminate in I and θ * the maximal solution of I. If θ * (X) is nonempty, then there is a finite solution θ of I such that θ(X) is nonempty.
Proof. Let w ∈ θ * (X). We construct the finite solution θ of I by keeping only the words of length |w|: for all indeterminates Y occurring in I we define By definition, we have w ∈ θ(X). To show that θ is indeed a solution of I, consider an arbitrary inclusion Y ⊆ L 0 ∪ L 1 X 1 ∪ . . . ∪ L n X n in I, and assume that u ∈ θ(Y ). We must show that u In the first case, we are done. In the second case, u = αu for some α ∈ L i ⊆ N R ∪ {ε} and u ∈ θ * (X i ). Since |u | ≤ |u| ≤ |w|, we have u ∈ θ(X i ), and thus u ∈ L i θ(X i ).
Thus, in order to check whether Γ is unifiable in EL − , we only have to check for admissibility of the maximal solution of I Γ,τ .
Lemma 12. There is a finite, admissible solution of I Γ,τ iff the maximal solution θ * of I Γ,τ is admissible.
Proof. If I Γ,τ has a finite, admissible solution θ, then the maximal solution of I Γ,τ contains this solution, and is thus also admissible.
Conversely, if θ * is admissible, then (by Lemma 11) for each X ∈ Var(Γ) there is a constant A(X) and a finite solution θ X of I Γ,τ such that θ X (X A(X) ) = ∅. The union of these solutions θ X for X ∈ Var(Γ) is the desired finite, admissible solution.

Recognizing the Maximal Solution
We will now construct several finite automata A X , one for each indeterminate, that compute the sets θ * (X) of the maximal solution θ * of I. The automata model we will use is that of alternating finite automata, which can make two kinds of transitions: traditional, nondeterministic transitions that "guess" the next state of the automaton; and "universal" transitions that force the automaton to explore every possible successor state. One can imagine these universal transitions as the splitting of the automaton into several copies, each of which goes into one possible successor state and continues the computation independently.
Note that the second kind of transition is only possible if w = ε, i.e., there is still a part of the input word left to read.
A run of A is a finite, nonempty tree labeled by configurations of A that satisfies the following conditions. If (q, w) is the label of some node and q ∈ Q ∃ , then the node has exactly one successor labeled by a configuration (q , w ) with (q, w) A (q , w ). If (q, w) is the label of some node and q ∈ Q ∀ , then for all configurations (q , w ) with (q, w) A (q , w ) there is exactly one successor of the node labeled by (q , w ).
An ε-path is a path in this tree that consists only of ε-transitions. A run is called successful iff for every leaf one of the following conditions holds. If (q, w) is the label of the leaf, then either q ∈ F and w = ε or q ∈ Q ∀ and there is no configuration (q , w ) with (q, w) (q , w ).
An input word w ∈ Σ * is accepted by A iff there is a successful run of A the root of which is labeled by (q 0 , w). The language recognized by A is L(A) := {w ∈ Σ * | w is accepted by A}.
Our goal is to define an ε-AFA A X that recognizes exactly θ * (X) for one indeterminate X of I. The automaton checks whether the word w can be part of θ * (X) using the following ideas. Starting from the indeterminate X, the automaton splits into several copies, each of which checks the restrictions imposed by one inclusion of the form X ⊆ L 0 ∪ L 1 X 1 ∪ . . . ∪ L n X n . Each of these copies guesses nondeterministically which of the sets L 0 , L 1 θ * (X 1 ), . . . , L n θ * (X n ) contains w.
In the case where there is one inclusion i of the form X ⊆ L 0 ∪L 1 X 1 ∪. . .∪L n X n in I for which there is a symbol α ∈ Σ with ε / ∈ L i and α / ∈ L i for all i ∈ {0, . . . , n}, there is no valid α-or ε-transition from the (existential) state (i, λ). Thus, A X will accept no word starting with α. This is consistent with the restriction imposed by i on θ * (X), since θ * (X) can never contain a word starting with α.
The second component of the states is used to detect ε-cycles. Every time the automaton makes an ε-transition it increases the counter λ in the second component of its state. This counts the number of consecutive states of the form (X, λ) connected only by ε-transitions. If λ grows larger than |Ind(I)|, some indeterminate must have occured twice, i.e., there must have been an ε-cycle. The automaton then goes to f 1 , i.e., it accepts everything that follows. The use of this cycle detection mechanism is illustrated in the following example. Consider Figure 1, which shows the only successful run of A Y accepting s ∈ θ * (Y ).
Intuitively, the automaton starts by asking whether s can be an element of θ * (Y ). From i 3 it can derive no contradiction, while from i 2 it derives the information that this is possible only if s is also an element of θ * (X). It then proceeds to the inclusion i 1 , which again redirects it to Y . In essence, at this point it has the following information: s can be an element of θ * (Y ) only if s is an element of θ * (Y ). Thus, the automaton can affirm the question, since θ * is the maximal solution and will certainly contain a word if there is no reason against it.
One can see that in order to accept anything at all, the restriction on the length of ε-paths is necessary. Otherwise, there would be no successful run starting in the configuration ((Y, 0), s).
Intuitively, if the automaton has already checked the restrictions imposed on a particular indeterminate, then it does not need to check them again. Thus, in a successful run everything that lies below the second occurrence of an indeterminate on the same ε-path can be ignored.
We want to construct an automaton that is of polynomial size in the size of I. Thus, in order to detect these cycles, the automaton cannot simply remember every indeterminate that has already been visited on the current ε-path. Instead, we use the indirect approach to detect cycles via the length of ε-paths.
Lemma 16. Let X ∈ Ind(I) and θ * be the maximal solution of I. Then L(A X ) = θ * (X).
Proof. If w ∈ L(A X ), then there is a successful run R of A X on w. Let V denote the set of nodes of R and l(v) the label of the node v ∈ V . We restrict the set of ((Y, 0), s) nodes to a subset V ⊆ V as follows. Intuitively, since we used the restriction on the length of ε-paths only to detect if one indeterminate has occurred twice, we now remove the unnecessary parts from R, i.e., the parts of R below the second occurrence of an indeterminate on an ε-path.
Formally, for every leaf of R labeled by (f 1 , u) for some word u ∈ Σ * , there must be an ε-path with nodes labeled by ((X 1 , 0), u), ((X 2 , 1), u), . . . , ((X |Ind(I)|+1 , |Ind(I)|), u), (f 1 , u) that ends in this leaf. We consider the smallest j ∈ {1, . . . , |Ind(I)| + 1} that marks the second occurrence of an indeterminate on this path. We remove the node labeled by ((X j , j −1), u) and all nodes below it from V . After we have done this for every leaf labeled by f 1 , V no longer contains a node with an outgoing edge to f 1 .
We now define the solution θ R by To show that this actually defines a solution of I, we consider an inclusion i : Y ⊆ L 0 ∪ L 1 X 1 ∪ . . . ∪ L n X n from I and a word u ∈ θ R (Y ). Then there is a node v ∈ V labeled by ((Y, λ), u) for some λ ∈ {0, . . . , |Ind(I)|}. This node must have a successor v ∈ V labeled by ((i, λ), u), which in turn has a single successor v ∈ V . We make a case distinction on the label l(v ) = (q, u ).
In the second case, λ must be smaller than |Ind(I)| by construction of V . , λ ), u) and λ ≤ λ, since v marks the second occurrence of an indeterminate on an ε-path. In this case, we also have u ∈ θ R (X i ) ⊆ L i θ R (X i ).
• If u = αu for α ∈ Σ, then q ∈ δ((i, λ), α). Either q = f 0 and α ∈ L 0 , which implies u = ε, since R is successful. In this case, we have u = α ∈ L 0 . The other possibility is that q = (X i , 0) for some i ∈ {1, . . . , n} with α ∈ L i . In this case, v must be an element of V and thus, u ∈ θ R (X i ), which implies In every case, u is also contained in the substitution of the right-hand side of i under θ R . Thus, θ R is a solution of I. Furthermore, w ∈ θ R (X), since the root of R is contained in V and labeled by ((X, 0), w). Concluding, we have w ∈ θ R (X) ⊆ θ * (X), since θ * is the maximal solution of I.
For the other direction, let w ∈ θ * (X). We construct a run of A X on w as follows.
For every node v, we maintain the invariant P (v) that u ∈ θ * (Y ) holds if the node is labeled by ((Y, . . .), u) or ((i, . . .), u) for some inclusion i ∈ I with Y on the left-hand side.
The root v 0 is labeled by ((X, 0), w) and satisfies P (v 0 ) by assumption. Let now v be a node of the run that already satisfies P (v).
• If l(v) = ((Y, λ), u), then P (v) implies u ∈ θ * (Y ). For every i ∈ I having Y on the right hand side, we introduce a successor v i of v that is labeled by ((i, λ), u). P (v i ) follows directly from P (v).
• If l(v) = ((i, λ), u) for an inclusion i : Y ⊆ L 0 ∪ L 1 X 1 ∪ . . . ∪ L n X n in I, then u ∈ θ * (Y ). Since θ * is a solution of I, either u ∈ L 0 or u ∈ L i θ * (X i ) for some i ∈ {1, . . . , n}. In the first case, we introduce a successor v of v that is labeled by (f 0 , ε). Otherwise, there is α ∈ L i such that u = αu with u ∈ θ * (X i ). We introduce a single successor v of v that is labeled as follows.
-If α ∈ Σ, then we label v by ((X i , 0), u). P (v ) is again satisfied by the same reason as above.
It is easily verified that all introduced transitions are valid w.r.t. A X . Furthermore, the label of any leaf is either (f 0 , ε) or contains an universal state without possible successors w.r.t. A X , i.e., either f 1 or a state containing an indeterminate Y that does not occur on the left-hand side of any inclusion from I.
The constructed tree is finite, since every ε-path is terminated by f 1 after finitely many steps. Thus, we have constructed a successful run of A X , which implies w ∈ L(A X ).
By applying this lemma to the problem I Γ,τ , we see that we can construct polynomially many ε-AFA of polynomial size that we can use to test admissibility of the maximal solution θ * of I Γ,τ .
Lemma 17. For each indeterminate X A in I Γ,τ , we can construct in polynomial time in the size of I Γ,τ an ε-AFA A(X, A) such that the language L(A(X, A)) accepted by A(X, A) is equal to θ * (X A ), where θ * denotes the maximal solution of I Γ,τ .
Proof. If we define A(X, A) := A X A , then it is easy to see that this automaton can be constructed in polynomial time in the size of I Γ,τ . Lemma 16 shows that it recognizes exactly the language θ * (X A ).
This finishes the description of our EL − -unification algorithm. It remains to argue why it is a PSpace decision procedure for EL − -unifiability.
Theorem 18. The problem of deciding unifiability in EL − is in PSpace.
Proof. We show that the problem is in NPSpace, which is equal to PSpace by Savitch's theorem [16].
Let Γ be a flat EL − -unification problem. By Lemma 8, Lemma 9, and Lemma 12, we know that Γ is EL − -unifiable iff there is a subsumption mapping τ for Γ such that the maximal solution θ * of I Γ,τ is admissible.
Thus, we first guess a mapping τ : At(Γ) 2 → {0, 1} and test whether τ is a subsumption mapping for Γ. Guessing τ can clearly be done in NPSpace. For a given mapping τ , the test whether it is a subsumption mapping for Γ can be done in polynomial time.
From τ we can first construct ∆ Γ,τ and then I Γ,τ in polynomial time. Given I Γ,τ , we then construct the (polynomially many) ε-AFA A(X, A), and test them for emptiness. Since emptiness of two-way alternating finite automata (where in addition to normal and ε-transitions also backwards transitions are allowed) can be tested in PSpace [13], this can be achieved within PSpace.
Given the results of these emptiness tests, we can then check in polynomial time whether, for each concept variable X of Γ there is a concept constant A of Γ such that θ * (X A ) = L(A(X, A)) = ∅. If this is the case, then θ * is admissible, and thus Γ is EL − -unifiable.

PSpace-hardness of EL − -unification
In this section, we reduce the intersection emptiness problem for deterministic finite automata (DFA) to a unification problem in EL − . These DFA are a special case of nondeterministic finite automata, which in turn are special AFA.
An alternating finite automaton (AFA) A = (Q ∃ , Q ∀ , Σ, q 0 , δ, F ) is an ε-AFA with a restricted transition function δ : Q × Σ → P(Q) that does not allow ε-transitions. The semantics of these automata is the same as for ε-AFA, except that the relation A is restricted to non-ε-transitions. The automaton is called nondeterministic finite automaton (NFA) if Q ∀ = ∅ and is then written as (Q, Σ, q 0 , δ, F ). It is called deterministic finite automaton (DFA) if it is an NFA and for each q ∈ Q and α ∈ Σ, the set δ(q, α) has the cardinality 0 or 1. The transition function is then equivalently expressed as the partial function δ : Q × Σ → Q where δ (q, α) = q iff δ(q, α) = {q }. This definition implies that any DFA has at most one run on any given word.
First, we define a translation from a given DFA A = (Q, Σ, q 0 , δ, F ) to a set of subsumptions Γ A . In the following, we only consider automata that accept a nonempty language. For such DFAs we can assume without loss of generality that there is no state q ∈ Q that cannot be reached from q 0 or from which F cannot be reached. In fact, such states can be removed from A without changing the accepted language.
For every state q ∈ Q, we introduce a variable X q . There is only one constant, A, and we define N R := Σ. The set Γ A is defined as follows: Note that the left-hand sides of the subsumptions in Γ A are indeed EL − -concept terms, i.e., the conjunctions on the left-hand sides are nonempty. In fact, every state q ∈ Q is either a final state or a final state is reachable by a nonempty path from q. In the first case, A occurs in the conjunction, and in the second, there must be an α ∈ Σ such that δ(q, α) is defined, in which case ∃α.X δ(q,α) occurs in the conjunction.
Lemma 19. Let q ∈ Q, w ∈ Σ * and γ be a ground EL − -unifier of Γ A with γ(X q ) ∃w.A. Then w ∈ L(A q ), where A q := (Q, Σ, q, δ, F ) is obtained from A by making q the initial state.
Proof. We prove this by induction on the length of w. If |w| = 0, then γ(X q ) A. Thus, A must be a top-level conjunct of γ(X q ). Since γ is a unifier of Γ A , this can only be the case if q ∈ F . Thus, w = ε is accepted by A q .
Thus, we must have γ(X δ(q,α ) ) ∃w .A by Lemma 1. By induction, we know that w is accepted by A δ(q,α ) . Thus, w = α w is accepted by A q .
Together with Lemma 3, this lemma implies that, for every ground EL − -unifier γ of Γ A , the language {w ∈ Σ * | ∃w.A ∈ Part(γ(X q 0 ))} is contained in L(A). Conversely, we will show that for every word w accepted by A we can construct a unifier γ w with ∃w.A ∈ Part(γ w (X q 0 )).
For the construction of γ w , we consider every q ∈ Q and try to find a word u q of minimal length that is accepted by A q . Such a word always exists since we have assumed that we can reach F from every state. Taking arbitrary such words is not sufficient, however. They need to be related in the following sense. Lemma 20. There exists a mapping from the states q ∈ Q to words u q ∈ L(A q ) such that that either q ∈ F and u q = ε or there is a symbol α ∈ Σ such that δ(q, α) is defined and u q = αu δ(q,α) .
Proof. We construct the words u q using induction on the length n of a shortest word accepted by A q .
If n = 0, then q must be a final state. In this case, we set u q := ε. Now, let q be a state such that a shortest word w q accepted by A q has length n > 0. Then w q = αw for α ∈ Σ and w ∈ Σ * and the transition δ(q, α) = q is defined. The length of a shortest word accepted by A q must be smaller than n, since w is accepted by A q . By induction, u q ∈ L(A q ) has already been defined and we have αu q ∈ L(A q ). Since αu q cannot be shorter than w q = αw , it must also be of length n. We now define u q := αu q .
We can now proceed with the definition of γ w for a word w ∈ Σ * that is accepted by A. The unique successful run of A on w = w 1 . . . w n yields a sequence of states q 0 , q 1 , . . . , q n with q n ∈ F and δ(q i , w i+1 ) = q i+1 for every i ∈ {0, . . . , n − 1}. We define the substitution γ w as follows: where I q := {i ∈ {0, . . . , n − 1} | q i = q}. For every q ∈ Q, we include at least the conjunct ∃u q .A in γ w (X q ) and thus, γ w is in fact an EL − -substitution.
Proof. Let the unique successful run of A on w = w 1 . . . w n be given by the sequence q 0 q 1 . . . q n of states with q n ∈ F and δ(q i , w i+1 ) = q i+1 for every i ∈ {0, . . . , n − 1}, and let γ w be defined as above.
We have to show that γ w satisfies the subsumption constraint introduced for every state q ∈ Q, i.e., To do this, we consider every top-level atom of γ w (X q ) and show that it subsumes the left-hand side of the above subsumption.
• Consider the conjunct ∃u q .A. If u q = ε, then q ∈ F and F q = A. In this case, the subsumption is satisfied. Otherwise, by construction there is a transition δ(q, α) = q with u q = αu q . Since ∃u q .A is a top-level conjunct of γ w (X q ), we have γ(X q ) ∃u q .A and thus, ∃α.γ w (X q ) ∃u q .A.
The intersection emptiness problem considers finitely many DFAs A 1 , . . . , A k , and asks whether L(A 1 ) ∩ . . . ∩ L(A k ) = ∅. Since this problem is trivially solvable in polynomial time in case L(A i ) = ∅ for some i, 1 ≤ i ≤ k, we can assume that the languages L(A i ) are all nonempty. Thus, we can also assume without loss of generality that the automata A i = (Q i , Σ, q 0,i , δ i , F i ) have pairwise disjoint sets of states Q i and are reduced in the sense introduced above, i.e., there is no state that cannot be reached from the initial state or from which no final state can be reached.
The flat EL − -unification problem Γ is now defined as follows: where Y is a new variable not contained in Γ A i for i = 1, . . . , k.
Conversely, let w ∈ Σ * be a word with w ∈ L(A 1 ) ∩ . . . ∩ L(A k ). By Lemma 21, we have for each of the unification problems Γ A i an EL − -unifier γ w,i such that γ w,i (X q 0,i ) ∃w.A. Since the automata have disjoint state sets, the unification problems Γ A i do not share variables. Thus, we can combine the unifiers γ w,i into an EL − -substitution γ by defining γ(Y ) := ∃w.A and γ(X q ) := γ w,i (X q ) for each i ∈ {1, . . . , k} and q ∈ Q i . Obviously, this is an EL − -unifier of Γ since it satisfies the additional subsumptions X q 0,i ? Y .
Since the intersection emptiness problem for DFAs is PSpace-hard [14,11], this lemma immediately yields our final theorem: Theorem 23. The problem of deciding unifiability in EL − is PSpace-hard.

Conclusion
Unification in EL was introduced in [4] as an inference service that can support the detection of redundancies in large biomedical ontologies, which are frequently written in this DL. Motivated by the fact that the large medical ontology SNOMED CT actually does not use the top concept available in EL, we have in this paper investigated unification in EL − , which is obtained from EL by removing the top concept. More precisely, SNOMED CT is a so-called acyclic EL − -TBox, 4 rather than a collection of EL − -concept terms. However, as shown in [6], acyclic TBoxes can be easily handled by a unification algorithm for concept terms.
Surprisingly, it turned out that the complexity of unification in EL − (PSpace) is considerably higher than of unification in EL (NP). From a theoretical point of view, this result is interesting since it provides us with a natural example where reducing the expressiveness of a given DL (in a rather minor way) results in a drastic increase of the complexity of the unifiability problem. Regarding the complexity of unification in more expressive DLs, not much is known. If we add negation to EL, then we obtain the well-known DL ALC, which corresponds to the basic (multi-)modal logic K [17]. Decidability of unification in K is a long-standing open problem. Recently, undecidability of unification in some extensions of K (for example, by the universal modality) was shown in [20]. These undecidability results also imply undecidability of unification in some expressive DLs (e.g., in SHIQ [12]).
Apart from its theoretical interest, the result of this paper also has practical implications. Whereas practically rather efficient unification algorithm for EL can readily be obtained by a translation into SAT [5], it is not so clear how to turn the PSpace algorithm for EL − -unification introduced in this paper into a practically useful algorithm. One possibility could be to use a SAT modulo theories (SMT) approach [15]. The idea is that the SAT solver is used to generate all possible subsumption mappings for Γ, and that the theory solver tests the system I Γ,τ induced by τ for the existence of a finite, admissible solution. How well this works will mainly depend on whether we can develop such a theory solver that satisfies well all the requirements imposed by the SMT approach.
Another topic for future research is how to actually compute EL − -unifiers for a unifiable EL − -unification problem. In principle, our decision procedure is constructive in the sense that, from appropriate successful runs of the ε-AFA A(X, A), one can construct a finite, admissible solution of I Γ,τ , and from this an EL − -unifier of Γ. However, this needs to be made more explicit, and we need to investigate what kind of EL − -unifiers can be computed this way.

Appendices A Locality
In EL, we have the interesting property that for every solvable unification problem there exists a local unifier γ, where γ(X) is a conjunction of atoms of the form γ(D) for D ∈ NV(Γ). However, simply extending this notion to EL − -unifiers does not give a similar result for EL − . There are always only finitely many local EL-unifiers for a given unification problem [4]. In EL − , however, it is possible that there exist infinitely many local unifiers, as the next example demonstrates.
Additionally, these unifiers are even incomparable w.r.t. the subsumption order on unifiers, i.e., for no two n, m ∈ N with n = m it holds that γ n (X) γ m (X) for all variables X. This is the case since the concept terms γ n (Z) = ∃r n+1 .A are incomparable in this sense.
We will show that checking for local unifiers suffices to decide unifiability in EL − by demonstrating that the decision procedure described in Section 4 can be used to construct local EL − -unifiers. To be able to use the reductions to the problems of solvability of sets of language inclusions and emptiness of ε-AFA, we first define appropriate notions of locality for these formalisms.
Definition 27. Let I be a finite set of inclusions of the form as described in Section 4.2. A solution θ of I is called local if all words w ∈ θ(X) \ {ε} for X ∈ Var(I) occur on the right-hand side of some inclusion Y ⊆ The final definition is concerned with locality in alternating automata.
Definition 28. Let A be an ε-AFA. A successful run of A is called local if there is at least one leaf labeled by (q, ε) for some state q of A. Since the run is successful, q is then either a final state or a universal state without possible successors. We denote by L l (A) the set of all words accepted by A via local, successful runs.
In a successful run R of A that is not local, all leafs are labeled by configurations (q, w) with w = ε. In this case, q has to be a universal state without successors. However, since such states accept any word, it is easy to change R into a local run. We simply identify the shortest word w that occurs in the label of a leaf. Since R is a run, w is the shortest word occuring in it and all other words in R must have the suffix w. Thus, we can simply remove the suffix w from all configurations in R and obtain a successful run that accepts a shorter word. This new run is local since it must contain at least one leaf labeled by (q, ε) for some state q.
This construction also shows that runs accepting minimal words, i.e., words for which no prefix is accepted by A, are always local. This is an important property of locality in ε-AFA which will prove to be useful.
The following lemma proves a connection between local runs and local solutions by analyzing one direction of Lemma 16 in more detail.
Lemma 29. Let I be a finite set of inclusions of the form (1) and let the ε-AFA A X for a variable X ∈ Var(I) be constructed as in Definition 14. If w ∈ L l (A X ), then there is a finite, local solution θ of I such that w ∈ θ(X) and every w ∈ θ(Y ) for some Y ∈ Var(I) is a suffix of w.
Proof. Let R be a local, successful run of A X starting in ((X, 0), w) and consider the solution θ R that was constructed in the proof of Lemma 16: for all variables Y ∈ Var(I). Since V is a subset of the finite set of nodes of R, θ R is finite. By definition of the transition relation of A X , the run R, and thus also θ R , contains only suffixes of w. Furthermore, w ∈ θ R (X) since the root node of R is labeled by ((X, 0), w) and contained in V . It remains to show that θ R is local.
Since R is local, there is a leaf of R that is labeled by (q, ε) for some state q of A X . We now consider the path p leading from the root of R to this leaf. Its root is labeled by ((X, 0), w), while its leaf is labeled by (q, ε). Thus, every suffix of w must occur along this path. To show locality, it thus suffices to show that every word occuring along p satisfies the conditions on locality. We will show this by backwards induction along p.
We begin the induction at the leaf of p, which is labeled by (q, ε). The word ε trivially fulfills the conditions for locality of θ R . Let now v be a node of p labeled by (q , u ) for a state q and a suffix u of w that fulfills the conditions for locality of θ R . If v is the root node, we are done. Otherwise, we show the same for the predecessor v of v , which also lies on the path p. Let (q, u) be the label of v and consider the following cases: • If u = u , then u fulfills the condition for locality of θ R , since u does.
• Otherwise, u = αu for some α ∈ Σ and q must be of the form (i, λ) for some inequation i : Y ⊆ L 0 ∪ L 1 X 1 ∪ . . . L n X n in I. Then the label (q , u ) of v can only have one of the following forms: -If q = f 0 , then α ∈ L 0 . Since R is successful, we then have u = ε and u = α ∈ L 0 .
-Otherwise, q = (X i , 0) for some i ∈ {1, . . . , n} and α ∈ L i . But then u ∈ θ R (X i ) by definition of θ R and thus, Thus, the word u fulfills the condition of locality since it is contained in the right-hand side of i under θ R .
In the following, let Γ be a flat EL − -unification problem, τ a subsumption mapping for Γ, and γ τ , ∆ Γ,τ , I Γ,τ , and A(X, A) be defined as in Section 4. Using the previous lemma, under some conditions we can construct a finite, local, admissible solution of I Γ,τ .
Lemma 30. If for every X ∈ Var(I) there is a constant A(X) such that the automaton A(X, A(X)) accepts a word w X , then there is a finite, local, admissible solution of I Γ,τ that contains only suffixes of the words w X .
Proof. By Lemma 29, we find for every X a finite, local solution θ X of I Γ,τ that contains only suffixes of w X and satisfies w X ∈ θ X (X A(X) ). By Lemma 10, the union θ of all θ X is still a solution of I Γ,τ . It is finite since it is a finite union of finite solutions. It is also admissible since for every X the set θ(X A(X) ) is non-empty. Finally, it is local since all contained words satisfy the conditions on locality by locality of the component solutions θ X .
The following lemma proves a connection between finite, local, admissible solutions of I Γ,τ and local unifiers of Γ by analyzing one direction of Lemma 9 in more detail.
Lemma 31. Let θ be a finite, local, admissible solution of I Γ,τ . Then there is a local EL − -unifier σ of Γ.
Proof. Consider the EL − -unifier σ of ∆ Γ,τ constructed in the proof of Lemma 9 which has the property that S τ ≤ S σ . It was defined by induction on the order > on the variables as follows: for every variable X, where σ(Y ) has already been defined for each variable Y with X > Y . In the proof of Lemma 8, it was shown that σ is also a unifier of Γ.
To show that σ is local, we consider all top-level atoms of σ(X) for each X ∈ Var(Γ). For those top-level atoms of the form σ(D) for D ∈ S τ (X), this follows immediately from the fact that S τ (X) ⊆ NV(Γ). Now consider a top-level particle ∃w.A of σ(X). If w = ε, then A is a non-variable atom of Γ since we assumed that all elements of N C occur in Γ. Otherwise, w ∈ θ(X A )\{ε} and, by locality of θ, there is an inclusion in I Γ,τ that contains w in the substitution of its right-hand side under θ.
This inclusion must be of the form I A (s), i.e., for some subsumption s of the form C 1 . . . C n ? X in ∆ Γ,τ . Locality of θ yields an index i ∈ {1, . . . , n} with w ∈ θ(f A (C i )), where C i is neither a variable nor a constant. 5 Thus, C i is of the form ∃r.C , where C is either a variable or the constant A. Consequently, either w ∈ {r} or w ∈ {r}θ(C A ). In the former case, ∃w.A = ∃r.A = C i is a ground atom of Γ. In the latter case, w = rw for some w ∈ θ(C A ). This implies σ(C ) ∃w .A, which yields σ(C i ) ∃w.A. By Lemma 3, ∃w.A is a particle of σ(C i ). Since C i ∈ NV(Γ), the particle ∃w.A fulfills the condition for locality of σ.
Since we want to obtain a complexity result, we also have to consider the size of σ. In the following, size always means the number of symbols it takes to write something down and is denoted by | · |. For example, for a solution θ of I Γ,τ , |θ| denotes the number of symbols it takes to write down all the sets θ(X A ) for X ∈ Var(Γ) and A ∈ N C .
Lemma 32. If θ is a finite, local, admissible solution of I Γ,τ , then the size of the local EL − -unifier σ constructed in Lemma 31 is at most exponential in the size of Γ and polynomial in the size of θ.
Proof. For a variable X ∈ Var(Γ), we consider all sequences X 1 < · · · < X n = X where X 1 is a minimal variable w.r.t. <. The length of such a sequence is the number of variables it contains, i.e., n. The height of X is defined as the maximal length of all such sequences. This means that the height of a minimal variable is 1 and the height is bounded by |Var(Γ)| since < is acyclic.
If n > 1, then we know that the height of all variables Y < X must be smaller than n. Since all the non-variable atoms D ∈ S τ (X) contain only variables smaller than X, by induction we can bound the size of each σ(D) for D ∈ S τ (X) by Since S τ (X) ⊆ NV(Γ), there are at most |Γ| elements in S τ (X) and the size of σ(X) is thus bounded by Since the height of any variable is bounded by the number of variables, and thus by |Γ|, this means that the overall size of σ is bounded by The constant 5 accounts for additional symbols like or ∃ that are added in the definition of σ.
We can now modify the decision procedure from Theorem 18 such that it outputs a local EL − -unifier for any solvable unification problem. However, since we actually have to output the unifier, the complexity of the algorithm is higher than for just deciding the existence of a unifier, i.e., ExpTime instead of PSpace.
The algorithm uses the well-known reduction from any alternating automaton to an equivalent nondeterministic automaton of exponential size [9,8]. Additionally, it employs a polynomial-time algorithm to find shortest paths in a directed graph, e.g., Dijkstra's algorithm [10]. This will be used to find a successful run of the nondeterministic automaton.
Theorem 33. Given a solvable EL − -unification problem Γ, we can construct a local EL − -unifier of Γ of at most exponential size in time exponential in the size of Γ.
Proof. Recall that in Theorem 18 we have guessed the subsumption mapping τ and constructed ∆ Γ,τ , I Γ,τ and the automata A(X, A) for every variable X and constant A. Then we tested these automata for emptiness and checked whether for every variable there was a constant such that the corresponding automaton accepted a non-empty language. If this was the case, then Γ was unifiable in EL − .
To show that we can actually construct a local EL − -unifier in exponential time, we start by enumerating all possible subsumption mappings τ . This can be done in exponential time since the size of τ is polynomial in the size of Γ. Since Γ is unifiable in EL − , we will find one τ such that for each variable X there is a constant A X for which the automaton A(X, A X ) accepts a non-empty language.
For each X, we now construct a nondeterministic automaton B X that is equivalent to A(X, A X ) [8]. This automaton has as state set the powerset of the original state set. A set can be reached from another if these sets are compatible with the reachability in the alternating automaton. This means that for every universal state, all successor states must be in the successor state set; for an existential state, there must be one successor in the set. The size of B X is exponential in the size of A(X, A X ), and thus exponential in the size of Γ.
We now search for a successful run r of B X of minimal length, i.e., a shortest path in the transition graph of B X that starts in the initial state {(X, 0)} and leads to a final state. Such a path can be found in exponential time using, e.g., Dijkstra's algorithm [10]. It is clear that r is of size exponential in Γ and it accepts a word w X that is of length exponential in Γ.
From the state sets occurring in r the tree shape of the underlying run R of A(X, A X ) can be extracted by the following procedure. We start with a single root node that is labeled by ((X, 0), w X ) and iteratively construct the layers of R of increasing depth. For each existential state in a state set of r, there must be a successor in the next state set. Similarly, for every universal state all its successors can be found in the next state set. Thus, for each configuration occuring in the current tree, we can find a valid transition of A(X, A X ) and can add the corresponding child nodes to the tree. Since r is finite, this construction terminates. The result is a successful run R of A(X, A X ) because r ends in a state set containing only final states or universal states without successors. Since the accepted word is of minimal length, R is local.
Thus, for every variable X we can find a word w X ∈ L l (A(X, A X )) which is of length at most exponential in the size of Γ. By Lemma 29, we can construct a finite, local solution θ X of I Γ,τ with w X ∈ θ X (X) that contains only suffixes of w X . Thus, θ X is of size exponential in the size of Γ since it contains at most exponentially many words of size at most exponential in the size of Γ. Lemma 30 yields a finite, local, admissible solution of I Γ,τ of exponential size. Finally, using Lemmata 31 and 32 we find a local EL − -unifier of Γ of size exponential in the size of Γ.
This provides an upper bound on the size of the smallest EL − -unifier of a given flat EL − -unification problem. We will now present a flat EL − -unification problem such that size of any EL − -unifier is at least exponential in the size of the problem.
Example 34. We will construct solvable EL − -unification problems Γ n (n ∈ N) such that the size of any EL − -unifier of Γ n is exponential in the size of Γ n . For this, we consider the proof of PSpace-completeness of the intersection emptiness problem for DFA [14].
For any deterministic Turing machine M with polynomial space bound, the proof constructs several DFA A i (i = 1, . . . , n) of size polynomial in the size of M. The number n of these automata is also polynomial in the size of M. These automata have the property that any input word u is accepted by M iff there is a successful run r of M on u such that w r ∈ n i=1 L(A i ). Here, the word w r is a representation of the run r that is constructed by concatenating the content of the tape of M for each step of the run, i.e., it may be exponentially long. This means that the intersection n i=1 L(A i ) contains exactly the representations of all successful runs of M.
For each n ∈ N, consider the following n-space bounded deterministic Turing machine M n with input alphabet {0, 1}. First, the machine M n checks whether the input is equal to 0 n . If it is not, M n rejects the word. Otherwise, it views 0 n as the binary representation of the number 0 and then iteratively increases this number by 1 until it reaches 1 n . M n can be defined in such a way that it never leaves the tape section defined by the input and is of size polynomial in n. It accepts only the word u = 0 n and has only one successful run r n on this word. The length of the representation w rn of r n is exponential in n since M n enumerates exponentially many numbers.
For this deterministic Turing machine M n , we can now construct k DFA A i (i = 1, . . . , k) with {w rn } = k i=1 L(A i ), where k and the size of the automata are bounded by a polynomial in n [14]. The equality {w rn } = k i=1 L(A i ) holds since by construction k i=1 L(A i ) contains exactly the representations of all successful runs of M n .
Following the proof of Lemma 22, we can construct a flat unification problem Γ n of size polynomial in n that is unifiable in EL − iff the intersection k i=1 L(A i ) is non-empty. We now consider any local EL − -unifier γ of Γ n , which must exist since this intersection contains the word w rn . By Lemmata 19 and 21, w rn is the only word such that γ(X q 0,i ) ∃w rn .A holds for all i = 1, . . . , k. Since γ must satisfy X q 0,i ? Y for each i = 1, . . . , n and γ(Y ) must contain at least one particle, this particle can only be ∃w rn .A. This particle is of size exponential in n, which shows that every local EL − -unifier of Γ n is of size exponential in the size of Γ n .
We thus have the following completeness result for the problem of constructing a local EL − -unifier for a flat EL − -unification problem.
Corollary 35. The size of the local EL − -unifiers of an EL − -unification problem may grow exponentially in the size of the problem. On the other hand, given a solvable EL − -unification problem, we can always compute a local EL − -unifier in exponential time.