arXiv is now an independent nonprofit! Learn more
License: arXiv.org perpetual non-exclusive license
arXiv:0903.0422v1 [cs.AI] 03 Mar 2009

Deductive Inference for the Interiors and Exteriors of Horn TheoriesThanks: An extended abstract of this article was presented in Proceedings of Algorithms and Computation, 19th International Symposium (ISAAC 2008), Lecture Notes in Computer Science, Vol. 5369, pp. 390–401, Springer-Verlag Berlin Heidelberg, 2008.

Kazuhisa Makino Department of Mathematical Informatics, University of Tokyo, Tokyo, 113-8656, Japan. makino@mist.i.u-tokyo.ac.jp Hirotaka Ono Department of Computer Science and Communication Engineering, Kyushu University, Fukuoka 812-8581, Japan. ono@csce.kyushu-u.ac.jp
Abstract

In this paper, we investigate the deductive inference for the interiors and exteriors of Horn knowledge bases, where the interiors and exteriors were introduced by Makino and Ibaraki [11] to study stability properties of knowledge bases. We present a linear time algorithm for the deduction for the interiors and show that it is co-NP-complete for the deduction for the exteriors. Under model-based representation, we show that the deduction problem for interiors is NP-complete while the one for exteriors is co-NP-complete. As for Horn envelopes of the exteriors, we show that it is linearly solvable under model-based representation, while it is co-NP-complete under formula-based representation. We also discuss the polynomially solvable cases for all the intractable problems.

1 Introduction

Knowledge-based systems are commonly used to store the sentences as our knowledge for the purpose of having automated reasoning such as deduction applied to them (see e.g., [1]). Deductive inference is a fundamental mode of reasoning, and usually abstracted as follows: Given the knowledge base KBKB, assumed to capture our knowledge about the domain in question, and a query χ\chi that is assumed to capture the situation at hand, decide whether KBKB implies χ\chi, denoted by KBχKB\models\chi, which can be understood as the question: “Is χ\chi consistent with the current state of knowledge ?”

In this paper, we consider the interiors and exteriors of knowledge base. Formally, for a given positive integer α\alpha, the α\alpha-interior of KBKB, denoted by σα(KB)\sigma_{-\alpha}(KB), is a knowledge that consists of the models (or assignments) vv satisfying that the α\alpha-neighbors of vv are all models of KBKB, and the α\alpha-exterior of KBKB, denoted by σα(KB)\sigma_{\alpha}(KB), is a knowledge that consists of the models vv satisfying that at least one of the α\alpha-neighbors of vv is a model of KBKB [11]. Intuitively, the interior consists of the models vv that strongly satisfy KBKB, since all neighbors of vv are models of KBKB, while the exterior consists of the models vv that weakly satisfy KBKB, since at least one of the α\alpha-neighbors of vv is a model of KBKB. Here we note that vv might not satisfy KBKB, even if we say that it weakly satisfies KBKB. As mentioned in [11], the interiors and exteriors of knowledge base merit study in their own right, since they shed light on the structure of knowledge base. Moreover, let us consider the situation in which knowledge base KBKB is not perfect in the sense that some sentences in KBKB are wrong and/or some are missing in KBKB (see also [11]).

Suppose that we use KBKB as a knowledge base for automated reasoning, say, deductive inference KBχKB\models\chi. Since KBKB does not represent real knowledge KBKB^{*}, the reasoning result is no longer true. However, if we use the interior σα(KB)\sigma_{-\alpha}(KB) of KBKB as a knowledge base and have σα(KB)⊧̸χ\sigma_{-\alpha}(KB)\not\models\chi, then we can expect that the result is true for real knowledge KBKB^{*}, since σα(KB)\sigma_{-\alpha}(KB) consists of models which strongly satisfy KBKB. On the other hand, if we use the exterior σα(KB)\sigma_{\alpha}(KB) of KB as a knowledge base and have σα(KB)χ\sigma_{\alpha}(KB)\models\chi, then we can expect that the result is true for real knowledge KBKB^{*}, since σα(KB)\sigma_{\alpha}(KB) consists of models which weakly satisfy KBKB. In this sense, the interiors and exteriors help to have safe reasoning.

Main problems considered. In this paper, we study the deductive inference for the interiors and exteriors of propositional Horn theories, where Horn theories are ubiquitous in Computer Science, cf. [13], and are of particular relevance in Artificial Intelligence and Databases. It is known that important reasoning problems like deductive inference and satisfiability checking, which are intractable for arbitrary propositional theories, are solvable in linear time for Horn theories (cf. [3]).

More precisely, we address the following problems:

  • \bullet

    Given a Horn theory Σ\Sigma, a clause cc, and nonnegative integer α\alpha, we consider the problems of deciding if deductive queries hold for the α\alpha-interior and exterior of Σ\Sigma, i.e., σα(Σ)c\sigma_{-\alpha}(\Sigma)\models c and σα(Σ)c\sigma_{\alpha}(\Sigma)\models c. It is well-known [3] that a deductive query for a Horn theory can be answered in linear time. Note that it is intractable to construct the interior and exterior for a Horn theory [11, 12], and hence a direct method (i.e., first construct the interior (or exterior) and then check a deductive query) is not possible efficiently.

  • \bullet

    We contrast traditional formula-based (syntactic) with model-based (semantic) representation of Horn theories. The latter form of representation has been proposed as an alternative form of representing and accessing a logical knowledge base, cf. [2, 4, 5, 7, 8, 6, 9, 10]. In model-based reasoning, Σ\Sigma is represented by a subset of its models {\mathcal{M}}, which are commonly called characteristic models. As shown by Kautz et al. [7], the deductive inference can be done in polynomial time, given its characteristic models.

  • \bullet

    Finally, we consider Horn approximations for the exteriors of Horn theories. Note that the interiors of Horn theories are Horn, while the exteriors might not be Horn. We deal with the least upper bounds, called the Horn envelopes [15], for the exteriors of Horn theories.

Main results. We investigate the problems mentioned above from an algorithmical viewpoint. For all the problems, we provide either polynomial time algorithms or proofs of the intractability; thus, our work gives a complete picture of the tractability/intractability frontier of deduction for interiors and exteriors of Horn theories. Our main results can be summarized as follows (see Figure 1).

  • \bullet

    We present a linear time algorithm for the deduction for the interiors of a given Horn theory, and show that it is co-NP-complete for the deduction for the exteriors. Thus, the positive result for ordinary deduction for Horn theories extends to the interiors, but does not to the exteriors. We also show that the deduction for the exteriors is possible in polynomial time, if α\alpha is bounded by a constant or if |N(c)||N(c)| is bounded by a logarithm of the input size, where N(c)N(c) corresponds to the set of negative literals in cc.

  • \bullet

    Under model-based representation, we show that the consistency problem and the deduction for the interiors of Horn theories are both co-NP-complete. As for the exteriors, we show that the deduction is co-NP-complete. We also show that the deduction for the interiors is possible in polynomial time if α\alpha is bounded by a constant, and so is for the exteriors, if α\alpha or |P(c)||P(c)| is bounded by a constant, or if |N(c)||N(c)| is bounded by a logarithm of the input size, where P(c)P(c) corresponds to the set of positive literals in cc.

  • \bullet

    As for Horn envelopes of the exteriors of Horn theories, we show that it is linearly solvable under model-based representation, while it is co-NP-complete under formula-based representation. The former contrasts to the negative result for the exteriors. We also present a polynomial algorithm for formula-based representation, if α\alpha is bounded by a constant or if |N(c)||N(c)| is bounded by a logarithm of the input size.

Interiors Exteriors Envelopes of Exteriors
Formula-Based P co-NP-complete co-NP-complete
Model-Based NP-complete co-NP-complete P

: It is polynomially solvable, if α=O(1)\alpha=O(1) or |N(c)|=O(logΣ)|N(c)|=O(\log\parallel\!\Sigma\!\parallel).

: It is polynomially solvable, if α=O(1)\alpha=O(1).

: It is polynomially solvable, if α=O(1)\alpha=O(1), |P(c)|=O(1)|P(c)|=O(1), or |N(c)|=O(logn|char(Σ)|)|N(c)|=O(\log n|{\mathit{c}har}(\Sigma)|).

Figure 1: Complexity of the deduction for interiors and exteriors of Horn theories

The rest of the paper is organized as follows. In the next section, we review the basic concepts and fix notations. Sections 3 and 4 investigate the deductive inference for the interiors and exteriors of Horn theories. Section 5 considers the deductive inference for the envelopes of the exteriors of Horn theories.

2 Preliminaries

Horn Theories

We assume a standard propositional language with atoms At={x1,x2,,xn}{\mathit{A}t}=\{x_{1},x_{2},\ldots,x_{n}\}, where each xix_{i} takes either value 11 (true) or 00 (false). A literal is either an atom xix_{i} or its negation, which we denote by x¯i{\overline{x}}_{i}. The opposite of a literal \ell is denoted by ¯{\overline{\ell}}, and the opposite of a set of literals LL by L¯={¯L}{\overline{L}}=\{{\overline{\ell}}\mid\ell\in L\}. Furthermore, Lit=AtAt¯{\mathit{L}it}={\mathit{A}t}\cup{\overline{{\mathit{A}t}}} denotes the set of all literals.

A clause is a disjunction c=iP(c)xiiN(c)x¯ic=\bigvee_{i\in P(c)}x_{i}\lor\bigvee_{i\in N(c)}{\overline{x}}_{i} of literals, where P(c)P(c) and N(c)N(c) are the sets of indices whose corresponding variables occur positively and negatively in cc and P(c)N(c)=P(c)\cap N(c)=\emptyset. Dually, a term is conjunction t=iP(t)xiiN(t)x¯it=\bigwedge_{i\in P(t)}x_{i}\land\bigwedge_{i\in N(t)}{\overline{x}}_{i} of literals, where P(t)P(t) and N(t)N(t) are similarly defined. We also view clauses and terms as sets of literals. A conjunctive normal form (CNF) is a conjunction of clauses. A clause cc is Horn, if |P(c)|1|P(c)|\leq 1. A theory Σ\Sigma is any set of formulas; it is Horn, if it is a set of Horn clauses. As usual, we identify Σ\Sigma with φ=cΣc\varphi=\bigwedge_{c\in\Sigma}c, and write cφc\in\varphi etc. It is known [3] that the deductive query for a Horn theory, i.e., deciding if Σc\Sigma\models c for a clause cc is possible in linear time.

We recall that Horn theories have a well-known semantic characterization. A model is a vector v{0,1}nv\!\in\!\{0,1\}^{n}, whose ii-th component is denoted by viv_{i}. For a model vv, let ON(v)={ivi=1}{\mathit{O}N}(v)=\{i\mid v_{i}=1\} and OFF(v)={ivi=0}{\mathit{O}FF}(v)=\{i\mid v_{i}=0\}. The value of a formula φ\varphi on a model vv, denoted φ(v)\varphi(v), is inductively defined as usual; satisfaction of φ\varphi in vv, i.e., φ(v)=1\varphi(v)=1, will be denoted by vφv\models\varphi. The set of models of a formula φ\varphi (resp., theory Σ\Sigma), denoted by mod(φ){\mathit{m}od}(\varphi) (resp., mod(Σ){\mathit{m}od}(\Sigma)), and logical consequence φψ\varphi\models\psi (resp., Σψ\Sigma\models\psi) are defined as usual. For two models vv and ww, we denote by vwv\leq w the usual componentwise ordering, i.e., viwiv_{i}\leq w_{i} for all i=1,2,,ni=1,2,\ldots,n, where 010\leq 1; v<wv<w means vwv\neq w and vwv\leq w. Denote by vwv\,\bigwedge\,w componentwise AND of models v,w{0,1}nv,w\in\{0,1\}^{n}, and by Cl()Cl_{\wedge}({\mathcal{M}}) the closure of {0,1}n{\mathcal{M}}\subseteq\{0,1\}^{n} under \,\bigwedge\,. Then, a theory Σ\Sigma is Horn representable if and only if mod(Σ)=Cl(mod(Σ)){\mathit{m}od}(\Sigma)=Cl_{\wedge}({\mathit{m}od}(\Sigma)) (see [2, 9]) for proofs).

Example 1.

Consider 1={(0101),(1001),(1000)}{\mathcal{M}}_{1}\!=\!\{(0101),(1001),(1000)\} and 2={(0101){\mathcal{M}}_{2}\!=\!\{(0101), (1001),(1001), (1000),(1000), (0001),(0001), (0000)}(0000)\}. Then, for v=(0101)v=(0101), w=(1000)w=(1000), we have w,v1w,v\in{\mathcal{M}}_{1}, while vw=(0000)1v\bigwedge w=(0000)\notin{\mathcal{M}}_{1}; hence 1{\mathcal{M}}_{1} is not the set of models of a Horn theory. On the other hand, Cl(2)=2Cl_{\wedge}({\mathcal{M}}_{2})={\mathcal{M}}_{2}, thus 2=mod(Σ2){\mathcal{M}}_{2}={\mathit{m}od}(\Sigma_{2}) for some Horn theory Σ2\Sigma_{2}.

As discussed by Kautz et al. [7], a Horn theory Σ\Sigma is semantically represented by its characteristic models, where vmod(Σ)v\in{\mathit{m}od}(\Sigma) is called characteristic (or extreme [2]), if vCl(mod(Σ){v})v\not\in Cl_{\wedge}({\mathit{m}od}(\Sigma)\setminus\{v\}). The set of all such models, the characteristic set of Σ\Sigma, is denoted by char(Σ){\mathit{c}har}(\Sigma). Note that char(Σ){\mathit{c}har}(\Sigma) is unique. E.g., (0101)char(Σ2)(0101)\in{\mathit{c}har}(\Sigma_{2}), while (0000)char(Σ2)(0000)\notin{\mathit{c}har}(\Sigma_{2}); we have char(Σ2)=1{\mathit{c}har}(\Sigma_{2})={\mathcal{M}}_{1}. It is known [7] that the deductive query for a Horn theory Σ\Sigma from the characteristic set char(Σ){\mathit{c}har}(\Sigma) can be done in linear time, i.e., O(n|char(Σ)|)O(n|{\mathit{c}har}(\Sigma)|) time.

Interior and Exterior of Theories

For a model v{0,1}nv\in\{0,1\}^{n} and a nonnegative integer α\alpha, its α\alpha-neighborhood is defined by

𝒩α(v)={w{0,1}nwvα},{\mathcal{N}}_{\alpha}(v)=\{w\in\{0,1\}^{n}\mid\parallel w-v\parallel\leq\alpha\},

where v\parallel v\parallel denotes i=1n|vi|\sum_{i=1}^{n}|v_{i}|. Note that |𝒩α(v)|=i=0α(ni)=O(nα+1)|{\mathcal{N}}_{\alpha}(v)|=\sum_{i=0}^{\alpha}{n\choose i}=O(n^{\alpha+1}). For a theory Σ\Sigma and a nonnegative integer α\alpha, the α\alpha-interior and α\alpha-exterior of Σ\Sigma, denoted by σα(Σ)\sigma_{-\alpha}(\Sigma) and σα(Σ)\sigma_{\alpha}(\Sigma) respectively, are theories defined by

mod(σα(Σ))\displaystyle{\mathit{m}od}(\sigma_{-\alpha}(\Sigma)) =\displaystyle= {v{0,1}n𝒩α(v)mod(Σ)}\displaystyle\{v\in\{0,1\}^{n}\mid{\mathcal{N}}_{\alpha}(v)\subseteq{\mathit{m}od}(\Sigma)\} (1)
mod(σα(Σ))\displaystyle{\mathit{m}od}(\sigma_{\alpha}(\Sigma)) =\displaystyle= {v{0,1}n𝒩α(v)mod(Σ)}.\displaystyle\{v\in\{0,1\}^{n}\mid{\mathcal{N}}_{\alpha}(v)\cap{\mathit{m}od}(\Sigma)\not=\emptyset\}. (2)

By definition, σ0(Σ)=σ\sigma_{0}(\Sigma)=\sigma, σα(Σ)σβ(Σ)\sigma_{\alpha}(\Sigma)\models\sigma_{\beta}(\Sigma) for integers α\alpha and β\beta with α<β\alpha<\beta, and σα(Σ1)σα(Σ2)\sigma_{\alpha}(\Sigma_{1})\models\sigma_{\alpha}(\Sigma_{2}) holds for any integer α\alpha, if two theories Σ1\Sigma_{1} and Σ2\Sigma_{2} satisfy Σ1Σ2\Sigma_{1}\models\Sigma_{2}.

Example 2.

Let us consider a Horn theory Σ={x¯1x3,x¯2x3,x¯2x4}\Sigma=\{{\overline{x}}_{1}\vee x_{3},{\overline{x}}_{2}\vee x_{3},{\overline{x}}_{2}\vee x_{4}\} of 44 variables, where mod(Σ){\mathit{m}od}(\Sigma) is given by

mod(Σ)={(1111),(1011),(1010),(0111),(0011),(0010),(0001),(0000)}{\mathit{m}od}(\Sigma)=\{(1111),(1011),(1010),(0111),(0011),(0010),(0001),(0000)\}

(See Figure 2). Then we have σα(Σ)={}\sigma_{\alpha}(\Sigma)=\{\emptyset\} for α2\alpha\leq-2, {x¯1,x¯2,x3,x4}\{{\overline{x}}_{1},{\overline{x}}_{2},x_{3},x_{4}\} for α=1\alpha=-1, Σ\Sigma for α=0\alpha=0, {x¯1x¯2x3x4}\{{\overline{x}}_{1}\vee{\overline{x}}_{2}\vee x_{3}\vee x_{4}\} for α=1\alpha=1, and \emptyset for α2\alpha\geq 2. For example, (0011)(0011) is the unique model of mod(σ1(Σ)){\mathit{m}od}(\sigma_{-1}(\Sigma)), since 𝒩1(0011)mod(Σ){\mathcal{N}}_{1}(0011)\subseteq{\mathit{m}od}(\Sigma) and 𝒩1(v)mod(Σ){\mathcal{N}}_{1}(v)\not\subseteq{\mathit{m}od}(\Sigma) holds for all the other models vv. For the 11-exterior, we can see that all models vv with (x¯1x¯2x3x4)(v)=1({\overline{x}}_{1}\vee{\overline{x}}_{2}\vee x_{3}\vee x_{4})(v)=1 satisfy 𝒩1(v)mod(Σ){\mathcal{N}}_{1}(v)\cap{\mathit{m}od}(\Sigma)\neq\emptyset, and no other such model exists. For example, (0101)(0101) is a model of σ1(Σ)\sigma_{1}(\Sigma), since (0111)𝒩1(0101)mod(Σ)(0111)\in{\mathcal{N}}_{1}(0101)\cap{\mathit{m}od}(\Sigma). On the other hand, (1100)(1100) is not a model of σ1(Σ)\sigma_{1}(\Sigma), since 𝒩1(1100)mod(Σ)={\mathcal{N}}_{1}(1100)\cap{\mathit{m}od}(\Sigma)=\emptyset. Notice that σ1(Σ)\sigma_{-1}(\Sigma) is Horn, while σ1(Σ)\sigma_{1}(\Sigma) is not.

Refer to caption
Figure 2: A Horn theory and its interiors and exteriors

Makino and Ibaraki [11] introduced the interiors and exteriors to analyze stability of Boolean functions, and studied their basic properties and complexity issues on them (see also [12]). For example, it is known [11] that, for a theory Σ\Sigma and nonnegative integers α\alpha and β\beta, σα(σβ(Σ))=σαβ(Σ)\sigma_{-\alpha}(\sigma_{-\beta}(\Sigma))=\sigma_{-\alpha-\beta}(\Sigma), σα(σβ(Σ))=σα+β(Σ)\sigma_{\alpha}(\sigma_{\beta}(\Sigma))=\sigma_{\alpha+\beta}(\Sigma), and

σα(σβ(Σ))\displaystyle\sigma_{\alpha}(\sigma_{-\beta}(\Sigma)) \displaystyle\models σαβ(Σ)σβ(σα(Σ)).\displaystyle\sigma_{\alpha-\beta}(\Sigma)\ \models\sigma_{-\beta}(\sigma_{\alpha}(\Sigma)). (3)

For a nonnegative integer α\alpha and two theories Σ1\Sigma_{1} and Σ2\Sigma_{2}, we have

σα(Σ1Σ2)\displaystyle\sigma_{-\alpha}(\Sigma_{1}\cup\Sigma_{2}) =\displaystyle= σα(Σ1)σα(Σ2)\displaystyle\sigma_{-\alpha}(\Sigma_{1})\cup\sigma_{-\alpha}(\Sigma_{2}) (4)
σα(Σ1Σ2)\displaystyle\sigma_{\alpha}(\Sigma_{1}\cup\Sigma_{2}) \displaystyle\models σα(Σ1)σα(Σ2),\displaystyle\sigma_{\alpha}(\Sigma_{1})\cup\sigma_{\alpha}(\Sigma_{2}), (5)

where σα(Σ1Σ2)σα(Σ1)σα(Σ2)\sigma_{\alpha}(\Sigma_{1}\cup\Sigma_{2})\not=\sigma_{\alpha}(\Sigma_{1})\cup\sigma_{\alpha}(\Sigma_{2}) holds in general.

As demonstrated in Example 2, it is not difficult to see that the interiors of any Horn theory are Horn, which is, for example, proved by (4) and Lemma 3, while the exteriors might be not Horn.

3 Deductive Inference from Horn Theories

In this section, we investigate the deductive inference for the interiors and exteriors of a given Horn theory.

3.1 Interiors

Let us first consider the deduction for the α\alpha-interiors of a Horn theory: Given a Horn theory Σ\Sigma, a clause cc, and a positive integer α\alpha, decide if σα(Σ)c\sigma_{-\alpha}(\Sigma)\models c holds. We show that the problem is solvable in linear time after showing a series of lemmas.

The following lemma is a basic property of the interiors.

Lemma 3.

Let cc be a clause. Then for a nonnegative integer α\alpha, we have σα(c)=Sc:|S|=α+1(S)=Sc:|S|=|c|α(S)\sigma_{-\alpha}(c)=\bigvee_{{S\subseteq c:}\atop{|S|=\alpha+1}}\bigl(\bigwedge_{\ell\in S}\ell\bigr)=\bigwedge_{{S\subseteq c:}\atop{|S|=|c|-\alpha}}\bigl(\bigvee_{\ell\in S}\ell\bigr).

For example, let us consider c=x1x2x¯3x¯4c=x_{1}\vee x_{2}\vee{\overline{x}}_{3}\vee{\overline{x}}_{4}, α=2\alpha=2. Then we have σα(c)=x1x2x¯3x1x2x¯4x1x¯3x¯4x2x¯3x¯4=(x1x2)(x1x¯3)(x1x¯4)(x2x¯3)(x2x¯4)(x¯3x¯4)\sigma_{-\alpha}(c)=x_{1}x_{2}{\overline{x}}_{3}\vee x_{1}x_{2}{\overline{x}}_{4}\vee x_{1}{\overline{x}}_{3}\ {\overline{x}}_{4}\vee x_{2}{\overline{x}}_{3}\ {\overline{x}}_{4}=(x_{1}\vee x_{2})(x_{1}\vee{\overline{x}}_{3})(x_{1}\vee{\overline{x}}_{4})(x_{2}\vee{\overline{x}}_{3})(x_{2}\vee{\overline{x}}_{4})({\overline{x}}_{3}\vee{\overline{x}}_{4}).

This lemma, together with (4), implies that for a CNF φ\varphi and a nonnegative integer α\alpha, we have

σα(φ)\displaystyle\sigma_{-\alpha}(\varphi) =\displaystyle= cφ(Sc:|S|=α+1(S))=cφ(Sc:|S|=|c|α(S)),\displaystyle\bigwedge_{c\in\varphi}\Bigl(\bigvee_{{S\subseteq c:}\atop{|S|=\alpha+1}}\bigl(\bigwedge_{\ell\in S}\ell\bigr)\Bigr)\ =\ \bigwedge_{c\in\varphi}\Bigl(\bigwedge_{{S\subseteq c:}\atop{|S|=|c|-\alpha}}\bigl(\bigvee_{\ell\in S}\ell\bigr)\Bigr),

where we regard cc as a set of literals.

Lemma 4.

Let Σ\Sigma be a Horn theory, and let cc be a clause. For a nonnegative integer α\alpha, if there exists a clause dΣd\in\Sigma such that |N(d)N(c)|α1|N(d)\setminus N(c)|\leq\alpha-1 or (|N(d)N(c)|=α𝐶𝐿𝑂𝑆𝐸(|N(d)\setminus N(c)|=\alpha and 𝑂𝑃𝐸𝑁P(d)P(c))P(d)\subseteq P(c)), then we have σα(Σ)c\sigma_{-\alpha}(\Sigma)\models c.

Proof.

If Σ\Sigma has a clause dd such that |N(d)N(c)|α1|N(d)\setminus N(c)|\leq\alpha-1, then |(N(d)N(c))P(d)|α|(N(d)\setminus N(c))\cup P(d)|\leq\alpha holds. Thus by Lemma 3, we have σα(d)iN(c)N(d)x¯ic\sigma_{-\alpha}(d)\models\bigvee_{i\in N(c)\cap N(d)}{\overline{x}}_{i}\models c. Therefore, by (4), σα(Σ)c\sigma_{-\alpha}(\Sigma)\models c holds.

On the other hand, if Σ\Sigma has a clause dd such that |N(d)N(c)|=α|N(d)\setminus N(c)|=\alpha and P(d)P(c)P(d)\subseteq P(c), then by Lemma 3, we have σα(d)iP(c)xiiN(c)N(d)x¯ic\sigma_{-\alpha}(d)\models\bigvee_{i\in P(c)}x_{i}\vee\bigvee_{i\in N(c)\cap N(d)}{\overline{x}}_{i}\models c. Therefore, by (4), σα(Σ)c\sigma_{-\alpha}(\Sigma)\models c holds. ∎

Lemma 5.

Let Σ\Sigma be a Horn theory, and let cc be a clause. For a nonnegative integer α\alpha, if (i) |N(d)N(c)|α|N(d)\setminus N(c)|\geq\alpha holds for all dΣd\in\Sigma and (ii) P(d)N(c)\emptyset\not=P(d)\subseteq N(c) holds for all dΣd\in\Sigma with |N(d)N(c)|=α|N(d)\setminus N(c)|=\alpha, then we have σα(Σ)⊧̸c\sigma_{-\alpha}(\Sigma)\not\models c.

Proof.

Let vv be the unique minimal model that does not satisfy cc, i.e., vi=1v_{i}=1 if x¯ic{\overline{x}}_{i}\in c and 00, otherwise. We show that vσα(Σ)v\models\sigma_{-\alpha}(\Sigma), which implies σα(Σ)⊧̸c\sigma_{-\alpha}(\Sigma)\not\models c.

Let dd be a clause in Σ\Sigma with |N(d)N(c)|α+1|N(d)\setminus N(c)|\geq\alpha+1, and let tt be a term obtained by conjuncting arbitrary α+1\alpha+1 literals in N(d)N(c)N(d)\setminus N(c). Then we have t(v)=1t(v)=1 and tσα(d)t\models\sigma_{-\alpha}(d) by Lemma 3. On the other hand, for a clause dd in Σ\Sigma with |N(d)N(c)|=α|N(d)\setminus N(c)|=\alpha, let tt be a term obtained by conjuncting all literals in (N(d)N(c))P(d)(N(d)\setminus N(c))\cup P(d). Then we have |t|=α+1|t|=\alpha+1 and tσα(d)t\models\sigma_{-\alpha}(d) by Lemma 3. Moreover, it holds that t(v)=1t(v)=1 by P(d)N(c)P(d)\subseteq N(c). Therefore, by (4), we have vσα(Σ)v\models\sigma_{-\alpha}(\Sigma). ∎

By Lemmas 4 and 5, we can easily answer the deductive queries, if Σ\Sigma satisfies certain conditions mentioned in them. In the remaining case, we have the following lemma.

Lemma 6.

For a Horn theory Σ\Sigma that satisfies none of the conditions in Lemmas 4 and 5, let dd be a clause in Σ\Sigma such that |N(d)N(c)|=α|N(d)\setminus N(c)|=\alpha, and P(d)=P(d)(P(c)N(c))={j}P(d)=P(d)\setminus(P(c)\cup N(c))=\{j\}. Then σα(Σ)cxj\sigma_{-\alpha}(\Sigma)\models c\vee x_{j} holds.

Proof.

By Lemma 3, we have σα(d)iN(c)N(d)x¯ixjcxj\sigma_{-\alpha}(d)\models\bigvee_{i\in N(c)\cap N(d)}{\overline{x}}_{i}\vee x_{j}\models c\vee x_{j}. This implies σα(Σ)cxj\sigma_{-\alpha}(\Sigma)\models c\vee x_{j} by (4). ∎

From this lemma, we have only to check a deductive query σα(Σ)cx¯j\sigma_{-\alpha}(\Sigma)\models c\vee{\overline{x}}_{j}, instead of σα(Σ)c\sigma_{-\alpha}(\Sigma)\models c. Since |c|<|cx¯j|n|c|<|c\vee{\overline{x}}_{j}|\leq n, we can answer the deduction by checking the conditions in Lemmas 4 and 5 at most nn times.

Algorithm 1 Deduction-Interior-from-Horn-Theory
Input:

A Horn theory Σ\Sigma, a clause cc and a nonnegative integer α\alpha.

Output:

Yes, if σα(Σ)c\sigma_{-\alpha}(\Sigma)\models c; Otherwise, No.

Step 0.

Let N:=N(c)N:=N(c) and P:=P(c)P:=P(c).

Step 1.

/* Check the condition in Lemma 4. */
If there exists a clause dΣd\in\Sigma such that |N(d)N|α1|N(d)\setminus N|\leq\alpha-1 or (|N(d)N|=αCLOSE(|N(d)\setminus N|=\alpha and OPENP(d)P)P(d)\subseteq P), then output Yes and halt.

Step 2.

/* Check the condition in Lemma 5. */
If P(d)NP(d)\subseteq N holds for all dΣd\in\Sigma with |N(d)N|=α|N(d)\setminus N|=\alpha, then output No and halt.

Step 3.

/* Update NN by Lemma 6. */
For a clause dd in Σ\Sigma such that |N(d)N|=α|N(d)\setminus N|=\alpha and P(d)=P(d)(PN)={j}P(d)=P(d)\setminus(P\cup N)=\{j\}, update N:=N{j}N:=N\cup\{j\} and return to Step 1. ∎

We can see that a straightforward implementation of the algorithm requires O(n(Σ+|c|))O(n(\parallel\!\!\Sigma\!\!\parallel+|c|)) time, where Σ\parallel\!\!\Sigma\!\!\parallel denotes the length of Σ\Sigma, i.e., Σ=dΣ|d|\parallel\!\!\Sigma\!\!\parallel=\sum_{d\in\Sigma}|d|. However, it is not difficult to see that we have a linear time algorithm for the problem, if N(d)NN(d)\setminus N for dΣd\in\Sigma is maintained by using the proper data structure.

Theorem 7.

Given a Horn theory Σ\Sigma, a clause cc and a nonnegative integer α\alpha, a deductive query σα(Σ)c\sigma_{-\alpha}(\Sigma)\models c can be answered in linear time, i.e., O(Σ+|c|)O(\parallel\!\!\Sigma\!\!\parallel+|c|) time. ∎

3.2 Exteriors

Let us next consider the deduction for the α\alpha-exteriors of a Horn theory. In contrast to the interior case, we have the following negative result.

Theorem 8.

Given a Horn theory Σ\Sigma, a clause cc and a positive integer α\alpha, it is co-NP-complete to decide whether a deductive query σα(Σ)c\sigma_{\alpha}(\Sigma)\models c holds, even if P(c)=P(c)=\emptyset.

Proof.

By definition, σ=α(Σ)⊧̸c\sigma={\alpha}(\Sigma)\not\models c if and only if there exists a model vv of Σ\Sigma such that some model in 𝒩α(v){\mathcal{N}}_{\alpha}(v) does not satisfy cc. The latter is equivalent to the condition that there exists a model vv of Σ\Sigma such that |ON(v)P(c)|+|OFF(v)N(c)|α|{\mathit{O}N}(v)\cap P(c)|+|{\mathit{O}FF}(v)\cap N(c)|\leq\alpha, which can be checked in polynomial time. Thus the problem is in co-NP.

We then show the hardness by reducing a well-known NP-complete problem Independent Set to the complement of our problem. Independent Set is the problem of deciding if a given graph G=(V,E)G=(V,E) has an independent set WVW\subseteq V such that |W|k|W|\geq k for a given integer kk. Here we call a subset WVW\subseteq V is an independent set of GG if |We|1|W\cap e|\leq 1 for all edges eEe\in E. For a problem instance G=(V={1,2,,n},E)G=(V=\{1,2,\ldots,n\},E) and kk of Independent Set, let us define a Horn theory ΣG\Sigma_{G} over At={x1,x2,,xn}{\mathit{A}t}=\{x_{1},x_{2},\ldots,x_{n}\} by

ΣG={(x¯ix¯j){i,j}E}.\Sigma_{G}=\{(\bar{x}_{i}\vee\bar{x}_{j})\mid\{i,j\}\in E\}.

Let c=i=1nx¯ic=\bigvee_{i=1}^{n}{\overline{x}}_{i} and α=nk\alpha=n-k. Note that (111)(11\cdots 1) is the unique model that does not satisfy cc. Thus σα(Σ)⊧̸c\sigma_{\alpha}(\Sigma)\not\models c if and only if σα(Σ)(111)=1\sigma_{\alpha}(\Sigma)(11\cdots 1)=1. Since WW is an independent set of GG if and only if ΣG\Sigma_{G} contains a model ww defined by ON(w)=W{\mathit{O}N}(w)=W, σα(ΣG)(111)=1\sigma_{\alpha}(\Sigma_{G})(11\cdots 1)=1 is equivalent to the condition that GG has an independent set of size at least k(=nα)k\,(=n-\alpha). This completes the proof. ∎

We remark that this result can also be derived from the ones in [11].

However, by using the next lemma, a deductive query can be answered in polynomial time, if α\alpha or N(c)N(c) is small.

Lemma 9.

Let Σ1\Sigma_{1} and Σ2\Sigma_{2} be theories. For a nonnegative integer α\alpha, Then σα(Σ1)Σ2\sigma_{\alpha}(\Sigma_{1})\models\Sigma_{2} if and only if Σ1σα(Σ2)\Sigma_{1}\models\sigma_{-\alpha}(\Sigma_{2}).

Proof.

For the if part, if Σ1σα(Σ2)\Sigma_{1}\models\sigma_{-\alpha}(\Sigma_{2}), then we have σα(Σ1)\sigma_{\alpha}(\Sigma_{1}) σα(σα(Σ2))Σ2\models\sigma_{\alpha}(\sigma_{-\alpha}(\Sigma_{2}))\models\Sigma_{2} by (3). On the other hand, if σα(Σ1)Σ2\sigma_{\alpha}(\Sigma_{1})\models\Sigma_{2}, then we have Σ1σα(σα(Σ1))σα(Σ2)\Sigma_{1}\models\sigma_{-\alpha}(\sigma_{\alpha}(\Sigma_{1}))\models\sigma_{-\alpha}(\Sigma_{2}) by (3). ∎

From Lemma 9, the deductive query for the α\alpha-interior of a theory Σ\Sigma, i.e., σα(Σ)c\sigma_{\alpha}(\Sigma)\models c for a given clause cc is equivalent to the condition that Σσα(c)\Sigma\models\sigma_{-\alpha}(c). Since we have σα(c)=Sc:|S|=|c|α(S)\sigma_{-\alpha}(c)=\bigwedge_{{S\subseteq c:}\atop{|S|=|c|-\alpha}}\bigl(\bigvee_{\ell\in S}\ell\bigr) by Lemma 3, the deductive query for the α\alpha-interior can be done by checking (|c|α){{|c|}\choose{\alpha}} deductions for Σ\Sigma. More precisely, we have the following lemma.

Lemma 10.

Let Σ\Sigma be a Horn theory, let cc be a clause, and α\alpha be a nonnegative integer. Then σα(Σ)c\sigma_{\alpha}(\Sigma)\models c holds if and only if, for each subset SS of N(c)N(c) such that |S||N(c)|α|S|\geq|N(c)|-\alpha, at least (α|N(c)|+|S|+1)(\alpha-|N(c)|+|S|+1) jj’s in P(c)P(c) satisfy ΣiSx¯ixj\Sigma\models\bigvee_{i\in S}{\overline{x}}_{i}\vee x_{j}.

Proof.

From Lemmas 3 and 9, σα(Σ)c\sigma_{\alpha}(\Sigma)\models c if and only if ΣSc:|S|=|c|α(S)\Sigma\models\bigwedge_{{S\subseteq c:}\atop{|S|=|c|-\alpha}}\bigl(\bigvee_{\ell\in S}\ell\bigr). It is known that for a Horn theory Σ\Sigma and clause dd, Σd\Sigma\models d if and only if ΣiN(d)x¯ixj\Sigma\models\bigvee_{i\in N(d)}{\overline{x}}_{i}\vee x_{j} holds for some jP(d)j\in P(d) (i.e., All the prime implicates of Horn theory are Horn). This proves the lemma. ∎

This lemma implies that the deductive query can be answered by checking the number of jj’s in P(c)P(c) that satisfy ΣiSx¯ixj\Sigma\models\bigvee_{i\in S}{\overline{x}}_{i}\vee x_{j} for each SS. Since we can check this condition in linear time and there are p=0α(|N(c)|p)\sum_{p=0}^{\alpha}{{|N(c)|}\choose{p}} such SS’s, we have the following result, which complements Theorem 8 that the problem is intractable, even if P(c)=P(c)=\emptyset.

Theorem 11.

Let Σ\Sigma be a Horn theory, let cc be a clause, and let α\alpha be a nonnegative integer. Then a deductive query σα(Σ)c\sigma_{\alpha}(\Sigma)\models c can be answered in O(p=0α(|N(c)|p)Σ+|P(c)|)O\Bigl(\sum_{p=0}^{\alpha}{{|N(c)|}\choose{p}}\parallel\!\Sigma\!\parallel+|P(c)|\Bigr) time. In particular, it is polynomially solvable, if α=O(1)\alpha=O(1) or |N(c)|=O(logΣ)|N(c)|=O(\log\parallel\!\Sigma\!\parallel).

4 Deductive Inference from Characteristic Sets

In this section, we consider the case when Horn knowledge bases can be represented by characteristic sets. Different from formula-based representation, the deductions for interiors and exteriors are both intractable, unless P=NP.

4.1 Interiors

We first present an algorithm to solve the deduction problem for the interiors of Horn theories. The algorithm requires exponential time in general, but it is polynomial when α\alpha is small.

Let Σ\Sigma be a Horn theory given by its characteristic set char(Σ){\mathit{c}har}(\Sigma), and let cc be a clause. Then for a nonnegative integer α\alpha, we have

σα(Σ)c if and only if σα(Σ)c¯0.\sigma_{-\alpha}(\Sigma)\models c\mbox{ if and only if }\sigma_{-\alpha}(\Sigma)\wedge{\overline{c}}\equiv 0. (6)

Let vv^{*} be a unique minimal model such that c(v)=0c(v^{*})=0 (i.e., c¯(v)=1{\overline{c}}(v^{*})=1). By the definition of interiors, vv^{*} is a model of σα(Σ)\sigma_{-\alpha}(\Sigma) if and only if all vv’s in 𝒩α(v){\mathcal{N}}_{\alpha}(v^{*}) are models of Σ\Sigma. Therefore, for each model vv in 𝒩α(v){\mathcal{N}}_{\alpha}(v^{*}), we check if vmod(Σ)v\in{\mathit{m}od}(\Sigma), which is equivalent to

wchar(Σ)wvw=v.\bigwedge_{w\in{\mathit{c}har}(\Sigma)\atop w\geq v}\!\!w\ =\ v. (7)

If (7) holds for all models vv in 𝒩α(v){\mathcal{N}}_{\alpha}(v^{*}), then we can immediately conclude by (6) that σα(Σ)⊧̸c\sigma_{-\alpha}(\Sigma)\not\models c. On the other hand, if there exists a model vv in 𝒩α(v){\mathcal{N}}_{\alpha}(v^{*}) such that (7) does not hold, let J=ON(wchar(Σ)wvw)ON(v)J=ON(\bigwedge_{w\in{\mathit{c}har}(\Sigma)\atop w\geq v}w)\setminus ON(v). By definition, we have JJ\not=\emptyset, and we can see that

σα(Σ)\displaystyle\sigma_{-\alpha}(\Sigma) \displaystyle\models iON(v)x¯ixj for all jJ.\displaystyle\bigvee_{i\in ON(v)}{\overline{x}}_{i}\vee x_{j}\ \ \mbox{ for all }j\in J. (8)

If JN(c)J\cap N(c)\not=\emptyset, then by Lemma 3 and (8), we have σα(Σ)iON(v)N(c)x¯i\sigma_{-\alpha}(\Sigma)\models\bigvee_{i\in ON(v)\cap N(c)}{\overline{x}}_{i}, since |ON(v)N(c)|α1|ON(v)\setminus N(c)|\leq\alpha-1. This implies σα(Σ)c\sigma_{-\alpha}(\Sigma)\models c. On the other hand, if JN(c)=J\cap N(c)=\emptyset, then by Lemma 3 and (8), we have σα(Σ)iN(c)x¯ixj\sigma_{-\alpha}(\Sigma)\models\bigvee_{i\in N(c)}{\overline{x}}_{i}\vee x_{j} for all jJj\in J. Thus, if JJ contains an index in P(c)P(c), then we can conclude that σα(Σ)c\sigma_{-\alpha}(\Sigma)\models c; Otherwise, we check the condition σα(Σ)cjJx¯j\sigma_{-\alpha}(\Sigma)\models c\vee\bigvee_{j\in J}{\overline{x}}_{j}, instead of σα(Σ)c\sigma_{-\alpha}(\Sigma)\models c. Since a new clause d=cjJx¯jd=c\vee\bigvee_{j\in J}{\overline{x}}_{j} is longer than cc, after at most nn iterations, we can answer the deductive query. Formally, our algorithm can be described as Algorithm 2.

Algorithm 2 Deduction-Interior-from-Charset
Input:

The characteristic set char(Σ){\mathit{c}har}(\Sigma) of a Horn theory Σ\Sigma, a clause cc and a nonnegative integer α\alpha.

Output:

Yes, if σα(Σ)c\sigma_{-\alpha}(\Sigma)\models c; Otherwise, No.

Step 0.

Let N:=N(c)N:=N(c), d:=cd:=c and q:=1q:=1.

Step 1.

Let vv^{*} be the unique minimal model such that d(v)=0d(v^{*})=0.

Step 2.

For each vv in 𝒩α(v){\mathcal{N}}_{\alpha}(v^{*}) do
       If (7) does not hold,
       then let v(q):=vv^{(q)}:=v, J:=ON(wchar(Σ)wvw)ON(v)J:=ON(\bigwedge_{w\in{\mathit{c}har}(\Sigma)\atop w\geq v}w)\setminus ON(v) and
         q:=q+1q:=q+1
       If J(NP(c))J\cap(N\cup P(c))\not=\emptyset, then output yes and halt.
       Let N:=NJN:=N\cup J and d:=iNx¯iiP(c)xid:=\bigvee_{i\in N}{\overline{x}}_{i}\vee\bigvee_{i\in P(c)}x_{i}.
       Go to Step 1.
    end{\{for}\}

Step 3.

Output No and halt. ∎

Theorem 12.

Given the characteristic model char(Σ){\mathit{c}har}(\Sigma) of a Horn theory Σ\Sigma, a clause cc and a nonnegative integer α\alpha, a deductive query σα(Σ)c\sigma_{-\alpha}(\Sigma)\models c can be answered in O(nα+2|char(Σ)|)O(n^{\alpha+2}|{\mathit{c}har}(\Sigma)|) time. In particular, it is polynomially solvable, if α=O(1)\alpha=O(1).

Proof.

Since we can see algorithm Deduction-Interior-from-Charset correctly answers a deductive query from the discussion before the description, we only estimate the running time of the algorithm.

Steps 0, 1 and 3 require O(n)O(n) time. Step 2 requires O(nα+1|char(Σ)|)O(n^{\alpha+1}|{\mathit{c}har}(\Sigma)|) time, since (7) can be checked in O(n|char(Σ)|)O(n|{\mathit{c}har}(\Sigma)|) time. Since we have at most nn iterations between Steps 1 and 2, the algorithm requires O(nα+2|char(Σ)|)O(n^{\alpha+2}|{\mathit{c}har}(\Sigma)|) time. ∎

However, in general, the problem is intractable, which contrasts with the formula-model representation.

Theorem 13.

Given the characteristic set char(Σ){\mathit{c}har}(\Sigma) of a Horn theory Σ\Sigma and a positive integer α\alpha, it is co-NP-complete to decide whether σα(Σ)\sigma_{-\alpha}(\Sigma) is consistent, i.e., mod(σα(Σ)){\mathit{m}od}(\sigma_{-\alpha}(\Sigma))\not=\emptyset.

Proof.

Let us first show the co-NP-completeness of the problem. Apply Algorithm Deduction-Interior-from-Charset to the instance (char(Σ){\mathit{c}har}(\Sigma), c=c=\emptyset, α\alpha). If σα(Σ)\sigma_{-\alpha}(\Sigma) is not consistent, then the algorithm constructs vectors v(1),,v(k)v^{(1)},\dots,v^{(k)}, knk\leq n, in Step 2. We can see that these vectors form a witness to the inconsistency of σα(Σ)\sigma_{-\alpha}(\Sigma). In fact, if we are given these vectors, the inconsistency can be checked in polynomial time. This implies that the problem belongs to co-NP.

We show the co-NP-hardness by reducing Independent Set to our problem. Given a problem instance G=(V={1,2,,n},E)G=(V=\{1,2,\ldots,n\},E) and kk of Independent Set, let us define a Horn theory ΣG\Sigma_{G} over At={x1,x2,{\mathit{A}t}=\{x_{1},x_{2}, ,xn}\ldots,x_{n}\} by

char(ΣG)={v(i,j),v(i,j,l){i,j}E,lV{i,j}},{\mathit{c}har}(\Sigma_{G})=\{v^{(i,j)},v^{(i,j,l)}\mid\{i,j\}\in E,l\in V\setminus\{i,j\}\},

where v(i,j)v^{(i,j)} and v(i,j,l)v^{(i,j,l)} are respectively the vectors defined by OFF(v(i,j))={i,j}{\mathit{O}FF}(v^{(i,j)})=\{i,j\} and OFF(v(i,j,l))={i,j,l}{\mathit{O}FF}(v^{(i,j,l)})=\{i,j,l\}. Let α=nk\alpha=n-k. Note that ΣG\Sigma_{G} is a negative theory, and hence σα(ΣG)\sigma_{-\alpha}(\Sigma_{G}) is consistent if and only if (000)(00\cdots 0) is a model of σα(ΣG)\sigma_{-\alpha}(\Sigma_{G}). Moreover, the latter condition is equivalent to the one that GG has no independent set of size at least k(=nα)k\,(=n-\alpha). This completes the proof. ∎

This result immediately implies the following corollary.

Corollary 14.

Given the characteristic set char(Σ){\mathit{c}har}(\Sigma) of a Horn theory Σ\Sigma, a clause cc and a positive integer α\alpha, it is NP-complete to decide whether a deductive query σα(Σ)c\sigma_{-\alpha}(\Sigma)\models c holds, even if c=c=\emptyset. ∎

Note that, different from the other hardness results, the hardness is not sensitive to the size of cc.

4.2 Exteriors

Let us consider the exteriors. Similarly to the formula-based representation, we have the following negative result.

Theorem 15.

Given the characteristic set char(Σ){\mathit{c}har}(\Sigma) of a Horn theory Σ\Sigma, a clause cc and a positive integer α\alpha, it is co-NP-complete to decide if a deductive query σα(Σ)c\sigma_{\alpha}(\Sigma)\models c holds.

Proof.

From Lemmas 3 and 9, σα(Σ)⊧̸c\sigma_{\alpha}(\Sigma)\not\models c if and only if there exists a subclause dd of cc such that |d|=|c|α|d|=|c|-\alpha and Σ⊧̸d\Sigma\not\models d. This dd is a witness that the problem belongs to co-NP.

We then show the hardness by a reduction from Vertex Cover which is known to be NP-hard. Vertex Cover is the problem to decide if a given graph G=(V,E)G=(V,E) has a vertex cover UU such that |U|k|U|\leq k for a given integer k(<n)k\,(<n). Here UVU\subseteq V is called vertex cover if UeU\cap e\not=\emptyset holds for all eEe\in E. For this problem instance, we construct our problem instance. For each eEe\in E, let We={e1,e2,,e|V|}W_{e}=\{e_{1},e_{2},\ldots,e_{|V|}\}, and let W=eEWeW=\bigcup_{e\in E}W_{e}. Let m(v)m^{(v)}, vVv\in V, be a model over VWV\cup W such that

ON(m(v))=(V{v})veWe,{\mathit{O}N}(m^{(v)})=(V\setminus\{v\})\cup\bigcup_{v\not\in e}W_{e},

and let char(Σ){\mathit{c}har}(\Sigma) be the characteristic set for some Horn theory Σ\Sigma defined by char(Σ)={m(v)vV}{\mathit{c}har}(\Sigma)=\{m^{(v)}\mid v\in V\}. We define cc and α\alpha by

c=iVx¯iiWxi and α=k,c=\bigvee_{i\in V}{\overline{x}}_{i}\vee\bigvee_{i\in W}x_{i}\ \mbox{ and }\ \alpha=k,

respectively. For this instance, we show that σα(Σ)⊧̸c\sigma_{\alpha}(\Sigma)\not\models c if and only if the corresponding GG has a vertex cover UU of size at most k(=α)k\,(=\alpha).

For the if part, let UU be such a vertex cover of GG. For this UU, we consider model m(U)=defvUm(v)m^{(U)}\stackrel{{\scriptstyle\mathrm{def}}}{{=}}\bigwedge_{v\in U}m^{(v)}, which is a model of Σ\Sigma by the intersection property of a Horn theory. Note that m(U)m^{(U)} does not satisfy a clause d=iVUx¯iiWxid=\bigvee_{i\in V\setminus U}{\overline{x}}_{i}\vee\bigvee_{i\in W}x_{i}. Since dd is a subclause of cc of length at least |c|α|c|-\alpha, m(U)m^{(U)} is not a model of σα(c)\sigma_{-\alpha}(c) by Lemma 3. This completes the if part by Lemma 9.

For the only-if part, let us assume that σα(Σ)⊧̸c\sigma_{\alpha}(\Sigma)\not\models c. Then by Lemmas 3 and 9, there exists a subclause dd of cc such that |d|=|c|α|d|=|c|-\alpha and Σ⊧̸d\Sigma\not\models d. This implies that Σd¯\Sigma\wedge{\overline{d}} contains a model mm. By α<n\alpha<n, for each eEe\in E, there exist an index jj in WeW_{e} such that mj=0m_{j}=0. Since any model mm^{\prime} in Σ\Sigma satisfy either mi=0m^{\prime}_{i}=0 or mi=1m^{\prime}_{i}=1 for all iWei\in W_{e}, we have mi=0m_{i}=0 for all iWi\in W. This means that VON(m)V\setminus{\mathit{O}N}(m) is a vertex cover of GG, and since |VON(m)|k|V\setminus{\mathit{O}N}(m)|\leq k, we have the only-if part. ∎

By using Lemma 10, we can see that the problem can be solved in polynomial time, if α\alpha or |N(c)||N(c)| is small. Namely, for each subset SS of N(c)N(c) such that |S||N(c)|α|S|\geq|N(c)|-\alpha, let vSv^{S} denotes the model such that ON(vS)=S{\mathit{O}N}(v^{S})=S. Then wS=wchar(Σ):wvSww^{S}=\bigwedge_{w\in{\mathit{c}har}(\Sigma):\atop w\geq v^{S}}w is the unique minimal model of Σ\Sigma such that ON(wS)S{\mathit{O}N}(w^{S})\supseteq S, and hence it follows from Lemma 10 that it is enough to check if |ON(ws)P(c)|α|N(c)|+|S|+1|{\mathit{O}N}(w^{s})\cap P(c)|\geq\alpha-|N(c)|+|S|+1. Clearly, this can be done in in O(p=0α(|N(c)|p)n|char(Σ)|)O\left(\sum_{p=0}^{\alpha}{{|N(c)|}\choose{p}}n|{\mathit{c}har}(\Sigma)|\right) time.

Moreover, if |P(c)||P(c)| is small, then the problem also become tractable, which contrasts with Theorem 8.

Lemma 16.

Let Σ\Sigma be a Horn theory, let cc be a clause, and α\alpha be a nonnegative integer. Then σα(Σ)c\sigma_{\alpha}(\Sigma)\models c holds if and only if each SP(c)S\subseteq P(c) such that |S||P(c)|α|S|\geq|P(c)|-\alpha satisfies

|OFF(w)N(c)|α|P(c)|+|S|+1|{\mathit{O}FF}(w)\cap N(c)|\geq\alpha-|P(c)|+|S|+1 (9)

for all models ww of Σ\Sigma such that OFF(w)P(c)=S{\mathit{O}FF}(w)\cap P(c)=S.

Note that (9) is monotone in the sense that, if a model ww satisfies (9), then all models vv with v<wv<w also satisfy it. Thus it is sufficient to check if (9) holds for all maximal models ww of Σ\Sigma such that OFF(w)P(c)=S{\mathit{O}FF}(w)\cap P(c)=S. Since such maximal models ww can be obtained from w(i)w^{(i)} (iS)(i\in S) with iOFF(w(i))P(c)Si\in{\mathit{O}FF}(w^{(i)})\cap P(c)\subseteq S by their intersection w=iSw(i)w=\bigwedge_{i\in S}w^{(i)}, we can answer the deduction problem in O(np=|P(c)|α|P(c)|(|P(c)|p)|char(Σ)|p)O\left(n\sum_{p=|P(c)|-\alpha}^{|P(c)|}{|P(c)|\choose p}|{\mathit{c}har}(\Sigma)|^{p}\right) time.

Theorem 17.

Given the characteristic set char(Σ){\mathit{c}har}(\Sigma) of a Horn theory, a clause cc, and a nonnegative integer α\alpha, a deductive query σα(Σ)c\sigma_{\alpha}(\Sigma)\models c can be answered in O(nmin{p=0α(|N(c)|p)|char(Σ)|,p=|P(c)|α|P(c)|(|P(c)|p)|char(Σ)|p})O\Bigl(n\min\{\sum_{p=0}^{\alpha}{{|N(c)|}\choose{p}}|{\mathit{c}har}(\Sigma)|,\sum_{p=|P(c)|-\alpha}^{|P(c)|}{|P(c)|\choose p}|{\mathit{c}har}(\Sigma)|^{p}\}\Bigr) time. In particular, it is polynomially solvable, if α=O(1)\alpha=O(1), |P(c)|=O(1)|P(c)|=O(1), or |N(c)|=O(logn|char(Σ)|)|N(c)|=O(\log n\cdot|{\mathit{c}har}(\Sigma)|).

5 Deductive Inference for Envelopes of the Exteriors of Horn Theories

We have considered the deduction for the interiors and exteriors of Horn theories. As mentioned before, the interiors of Horn theories are also Horn, while this does not hold for the exteriors. This means that the exteriors of Horn theories might lose beneficial properties of Horn theories. One of the ways to overcome such a hurdle is Horn Approximation, that is, approximating a theory by a Horn theory [15]. There are several methods for approximation, but one of the most natural ones is to approximate a theory by its Horn envelope. For a theory Σ\Sigma, its Horn envelope is the Horn theory Σe\Sigma_{e} such that mod(Σe)=Cl(mod(Σ)){\mathit{m}od}(\Sigma_{e})=Cl_{\wedge}({\mathit{m}od}(\Sigma)). Since Horn theories are closed under intersection, Horn envelope is the least Horn upper bound for Σ\Sigma, i.e., char(Σe)char(Σ){\mathit{c}har}(\Sigma_{e})\supseteq{\mathit{c}har}(\Sigma) and there exists no Horn theory Σ\Sigma^{*} such that char(Σe)char(Σ)char(Σ){\mathit{c}har}(\Sigma_{e})\supsetneq{\mathit{c}har}(\Sigma^{*})\supseteq{\mathit{c}har}(\Sigma). In this section, we consider the deduction for Horn envelopes of exteriors of Horn theories, i.e., σα(Σ)ec\sigma_{\alpha}(\Sigma)_{e}\models c.

5.1 Model-Based Representations

Let us first consider the case in which knowledge bases are represented by characteristic sets.

Proposition 18.

Let Σ\Sigma be a Horn theory, and let α\alpha be a nonnegative integer. Then we have

mod(σα(Σ)e)\displaystyle{\mathit{m}od}(\sigma_{\alpha}(\Sigma)_{e}) =\displaystyle= Cl(vchar(Σ)𝒩α(v)).\displaystyle Cl_{\wedge}(\bigcup_{v\in{\mathit{c}har}(\Sigma)}{\mathcal{N}}_{\alpha}(v)). (10)
Proof.

By definition, mod(σα(Σ)e)=Cl(mod(σα(Σ)))Cl(vchar(Σ)𝒩α(v)){\mathit{m}od}(\sigma_{\alpha}(\Sigma)_{e})=Cl_{\wedge}({\mathit{m}od}(\sigma_{\alpha}(\Sigma)))\supseteq Cl_{\wedge}(\bigcup_{v\in{\mathit{c}har}(\Sigma)}{\mathcal{N}}_{\alpha}(v)) holds. For the converse direction, let vv^{*} be a model of Horn envelope of the α\alpha-exterior, i.e., vmod(σα(Σ)e)v^{*}\in{\mathit{m}od}(\sigma_{\alpha}(\Sigma)_{e}). Then vv^{*} can be represented by v=wWwv^{*}=\bigwedge_{w\in W}w for some Wmod(σα(Σ))W\subseteq{\mathit{m}od}(\sigma_{\alpha}(\Sigma)). Assume that wWw\in W is contained in 𝒩α(u){\mathcal{N}}_{\alpha}(u) for some model uu of Σ\Sigma. Since such a uu can be represented by u=zSwzu=\bigwedge_{z\in S_{w}}z for some Swchar(Σ)S_{w}\subseteq{\mathit{c}har}(\Sigma), ww belongs to Cl(vSw𝒩α(v))Cl_{\wedge}(\bigcup_{v\in S_{w}}{\mathcal{N}}_{\alpha}(v)). This, together with v=wWwv^{*}=\bigwedge_{w\in W}w, implies that vv^{*} also belongs to Cl(vchar(Σ)𝒩α(v))Cl_{\wedge}(\bigcup_{v\in{\mathit{c}har}(\Sigma)}{\mathcal{N}}_{\alpha}(v)). ∎

For a clause cc, let vv^{*} be the unique minimal model such that c(v)=0c(v^{*})=0. We recall that, for a Horn theory Φ\Phi,

Φc if and only if c(vchar(Φ)vvv)=1.\Phi\models c\ \mbox{ if and only if }\ c(\bigwedge_{v\in{\mathit{c}har}(\Phi)\atop v\geq v^{*}}v)=1. (11)

Therefore, Proposition 18 immediately implies an algorithm for the deduction for σα(Σ)e\sigma_{\alpha}(\Sigma)_{e} from char(Σ){\mathit{c}har}(\Sigma), since we have char(σα(Σ)e)vchar(Σ)𝒩α(v){\mathit{c}har}(\sigma_{\alpha}(\Sigma)_{e})\subseteq\bigcup_{v\in{\mathit{c}har}(\Sigma)}{\mathcal{N}}_{\alpha}(v). However, for a general α\alpha, vchar(Σ)𝒩α(v)\bigcup_{v\in{\mathit{c}har}(\Sigma)}{\mathcal{N}}_{\alpha}(v) is exponentially larger than char(Σ){\mathit{c}har}(\Sigma), and hence this direct method is not efficient. The following lemma helps developing a polynomial time algorithm.

Lemma 19.

Let Σ\Sigma be a Horn theory, let cc be a clause, and let α\alpha be a nonnegative integer. Then σα(Σ)ec\sigma_{\alpha}(\Sigma)_{e}\models c holds if and only if the following two conditions are satisfied.

(i)

|OFF(v)N(c)|α|{\mathit{O}FF}(v)\cap N(c)|\geq\alpha holds for all vchar(Σ)v\in{\mathit{c}har}(\Sigma).

(ii)

If S={vchar(Σ)|OFF(v)N(c)|=α}S=\{v\in{\mathit{c}har}(\Sigma)\mid|{\mathit{O}FF}(v)\cap N(c)|=\alpha\}\not=\emptyset, P(c)P(c) is not covered with OFF(v){\mathit{O}FF}(v) for models vv in SS, i.e., P(c)vchar(Σ)|OFF(v)N(c)|=αOFF(v)P(c)\not\subseteq\bigcup_{v\in{\mathit{c}har}(\Sigma)\atop|{\mathit{O}FF}(v)\cap N(c)|=\alpha}{\mathit{O}FF}(v).

Proof.

To show the if part, let us first assume that (i) and (ii) in the lemma holds. Let vv be a model in char(Σ){\mathit{c}har}(\Sigma) such that |OFF(v)N(c)|>α|{\mathit{O}FF}(v)\cap N(c)|>\alpha. Then all models ww in 𝒩α(v){\mathcal{N}}_{\alpha}(v) satisfy OFF(w)N(c){\mathit{O}FF}(w)\cap N(c)\not=\emptyset. Therefore, if all the models vv in char(Σ){\mathit{c}har}(\Sigma) satisfy |OFF(v)N(c)|>α|{\mathit{O}FF}(v)\cap N(c)|>\alpha, then by Proposition 18, we have OFF(w)N(c){\mathit{O}FF}(w)\cap N(c)\not=\emptyset for any model ww of σα(Σ)e\sigma_{\alpha}(\Sigma)_{e}. This implies σα(Σ)ec\sigma_{\alpha}(\Sigma)_{e}\models c. Therefore, let us consider the case when S={vchar(Σ)|OFF(v)N(c)|=α}S=\{v\in{\mathit{c}har}(\Sigma)\mid|{\mathit{O}FF}(v)\cap N(c)|=\alpha\} is not empty. Let vv^{*} be the unique minimal model such that c(v)=0c(v^{*})=0. Then by Proposition 18, we have

{vchar(σα(Σ)e)vv}\displaystyle\{v\in{\mathit{c}har}(\sigma_{\alpha}(\Sigma)_{e})\mid v\geq v^{*}\} (12)
{wON(w)=ON(v)N(c) for some vS}.\displaystyle\hskip-85.35826pt\subseteq\{w\mid{\mathit{O}N}(w)={\mathit{O}N}(v)\cup N(c)\mbox{ for some }v\in S\}.

Since P(c)P(c) is not covered with OFF(v){\mathit{O}FF}(v) for models vv in SS, this, together with (11) implies σα(Σ)ec\sigma_{\alpha}(\Sigma)_{e}\models c.

Let us next show the only-if part. Assume that (i) is satisfied, but (2) is not. Then (11) and (12) imply σα(Σ)e⊧̸c\sigma_{\alpha}(\Sigma)_{e}\not\models c. On the other hand, if (1) is not satisfied, i.e., there exists a vchar(Σ)v\in{\mathit{c}har}(\Sigma) such that |OFF(v)N(c)|<α|{\mathit{O}FF}(v)\cap N(c)|<\alpha, let w(i)w^{(i)}, iP(c)i\in P(c), be a model in 𝒩α(v){\mathcal{N}}_{\alpha}(v) such that ON(w(i))N(c){\mathit{O}N}(w^{(i)})\supseteq N(c) and OFF(w(i)){i}{\mathit{O}FF}(w^{(i)})\supseteq\{i\}, and let w=iP(c)w(i)w^{*}=\bigwedge_{i\in P(c)}w^{(i)}. Then we have c(w)=0c(w^{*})=0 and wmod(σα(Σ)e)w^{*}\in{\mathit{m}od}(\sigma_{\alpha}(\Sigma)_{e}) by Proposition 18. This implies σα(Σ)e⊧̸c\sigma_{\alpha}(\Sigma)_{e}\not\models c. ∎

The lemma immediately implies the following theorem.

Theorem 20.

Given the characteristic set char(Σ){\mathit{c}har}(\Sigma) of a Horn theory Σ\Sigma, a clause cc, and a nonnegative integer α\alpha, a deductive query σα(Σ)ec\sigma_{\alpha}(\Sigma)_{e}\models c can be answered in linear time.

We remark that this contrasts with Corollary 14. Namely, if we are given the characteristic set char(Σ){\mathit{c}har}(\Sigma) of a Horn theory Σ\Sigma, σα(Σ)ec\sigma_{\alpha}(\Sigma)_{e}\models c is polynomially solvable, while it is co-NP-complete to decide if σα(Σ)c\sigma_{\alpha}(\Sigma)\models c.

5.2 Formula-Based Representation

Recall that a negative theory (i.e., a theory consisting of clauses with no positive literal) is Horn and the exteriors of negative theory are also negative, and hence Horn. This means that, for a negative theory Σ\Sigma, we have σα(Σ)e=σα(Σ)\sigma_{\alpha}(\Sigma)_{e}=\sigma_{\alpha}(\Sigma). Therefore, we can again make use of the reduction in the proof of Theorem 8, since the reduction uses negative theories.

Theorem 21.

Given a Horn theory Σ\Sigma, a clause cc, and a nonnegative integer α\alpha, it is co-NP-complete to decide whether σα(Σ)ec\sigma_{\alpha}(\Sigma)_{e}\models c holds, even if P(c)=P(c)=\emptyset.

Proof.

Since the hardness is proved similarly to Theorem 8, we show that the problem belongs to co-NP.

Let vv be a model of σα(Σ)e\sigma_{\alpha}(\Sigma)_{e}. Then vv can be represented by v=wWwv=\bigwedge_{w\in W}w for some Wchar(σα(Σ))W\subseteq{\mathit{c}har}(\sigma_{\alpha}(\Sigma)). Since char(σα(Σ))wchar(Σ)𝒩α(w){\mathit{c}har}(\sigma_{\alpha}(\Sigma))\subseteq\bigcup_{w\in{\mathit{c}har}(\Sigma)}{\mathcal{N}}_{\alpha}(w) by Proposition 18, we have

v\displaystyle v =\displaystyle= wchar(Σ)(uSwu)\displaystyle\bigwedge_{w\in{\mathit{c}har}(\Sigma)}\Bigl(\bigwedge_{u\in S_{w}}u\Bigr) (13)

for some Sw𝒩α(w)S_{w}\subseteq{\mathcal{N}}_{\alpha}(w). We claim that there exists such a representation that |Sw|n|S_{w}|\leq n holds for all ww’s in (13). Let w=uSwuw^{*}=\bigwedge_{u\in S_{w}}u, and let I=ON(w)OFF(w)I={\mathit{O}N}(w^{*})\cap{\mathit{O}FF}(w) and J=OFF(w)ON(w)J={\mathit{O}FF}(w^{*})\cap{\mathit{O}N}(w). Then we have w=jJ(we(j)+iIe(i))w^{*}=\bigwedge_{j\in J}\Bigl(w-e^{(j)}+\sum_{i\in I}e^{(i)}\Bigr), where e(i)e^{(i)} denotes the iith unit model. Since we(j)+iIe(i)𝒩α(w)w-e^{(j)}+\sum_{i\in I}e^{(i)}\in{\mathcal{N}}_{\alpha}(w) for all jJj\in J, the claim is proved.

Note that σα(Σ)e⊧̸c\sigma_{\alpha}(\Sigma)_{e}\not\models c if and only if there exists a model vv of σα(Σ)e\sigma_{\alpha}(\Sigma)_{e} such that c(v)=0c(v)=0. Since any model vv of σα(Σ)e\sigma_{\alpha}(\Sigma)_{e} can be represented by v=wchar(Σ)(uSwu)v=\bigwedge_{w\in{\mathit{c}har}(\Sigma)}\Bigl(\bigwedge_{u\in S_{w}}u\Bigr) for some Sw𝒩α(w)S_{w}\subseteq{\mathcal{N}}_{\alpha}(w) with |Sw|n|S_{w}|\leq n by our claim, the problem is in co-NP. ∎

However, if α\alpha or N(c)N(c) is small, the problem becomes tractable by algorithm Deduction-Envelope-Exterior-from-Horn-Theory (Algorithm 3).

Algorithm 3 Deduction-Envelope-Exterior-from-Horn-Theory
Input:

A Horn theory Σ\Sigma, a clause cc and a nonnegative integer α\alpha.

Output:

Yes, if σα(Σ)ec\sigma_{\alpha}(\Sigma)_{e}\models c; Otherwise, No.

Step 1.

/* Check if there exists a model vv of Σ\Sigma such that |OFF(v)N(c)|<α|{\mathit{O}FF}(v)\cap N(c)|<\alpha. */
For each NN(c)N\subseteq N(c) with |N|=|N(c)|α+1|N|=|N(c)|-\alpha+1 do

Check if the theory obtained from Σ\Sigma by assigning xi=1x_{i}=1 for iNi\in N is satisfiable.


If so, then output No and halt.
end{\{for}\}

Step 2.

/* Check if there exists a set S={vmod(Σ)|OFF(v)N(c)|=α}S=\{v\in{\mathit{m}od}(\Sigma)\mid|{\mathit{O}FF}(v)\cap N(c)|=\alpha\} such that vSOFF(v)P(c)\bigcup_{v\in S}{\mathit{O}FF}(v)\supseteq P(c). */
Let J:=J:=\emptyset.
For each NN(c)N\subseteq N(c) with |N|=|N(c)|α|N|=|N(c)|-\alpha do

Compute a unique minimal satisfiable model vv for the theory obtained from Σ\Sigma by assigning xi=1x_{i}=1 for iNi\in N is satisfiable.


Update J:=J{jP(c)vj=0}J:=J\cup\{j\in P(c)\mid v_{j}=0\}.
end{\{for}\}
If J=P(c)J=P(c), then output NO and halt.

Step 3.

Output Yes and halt. ∎

The algorithm is based on a necessary and sufficient condition for σα(Σ)ec\sigma_{\alpha}(\Sigma)_{e}\models c, which is obtained from Lemma 19 by replacing all char(Σ){\mathit{c}har}(\Sigma)’s with mod(Σ){\mathit{m}od}(\Sigma)’s. It is not difficult to see that such a condition holds from the proof of Lemma 19.

Theorem 22.

Given a Horn theory Σ\Sigma, a clause cc, and a nonnegative integer α\alpha, a deductive query σα(Σ)ec\sigma_{\alpha}(\Sigma)_{e}\models c can be answered in O(((|N(c)|α1)+(|N(c)|α))Σ+|P(c)|)O\Bigl(\bigl({|N(c)|\choose\alpha-1}+{|N(c)|\choose\alpha}\bigr)\parallel\!\Sigma\!\parallel+|P(c)|\Bigr) time. In particular, it is polynomially solvable, if α=O(1)\alpha=O(1) or |N(c)|=O(logΣ)|N(c)|=O(\log\parallel\!\Sigma\!\parallel).

Proof.

The correctness of the algorithm follows from the discussion after its description. For the time complexity, it is known [3] that the satisfiability problem, together with computing a unique minimal model for a Horn theory, is possible in linear time. Since the number of the iterations of for-loops in Steps 2 and 3 are bounded by (|N(c)|α1){|N(c)|\choose\alpha-1} and (|N(c)|α){|N(c)|\choose\alpha}, respectively, the algorithm requires O(((|N(c)|α1)+(|N(c)|α))Σ+|P(c)|)O\Bigl(\bigl({|N(c)|\choose\alpha-1}+{|N(c)|\choose\alpha}\bigr)\parallel\!\Sigma\!\parallel+|P(c)|\Bigr) time. ∎

References

  • [1] R. J. Brachman and H. J. Levesque. Knowledge Representation and Reasoning. Elsevier, 2004.
  • [2] R. Dechter and J. Pearl. Structure identification in relational data. Artificial Intelligence, 58 (1992) 237–270.
  • [3] W. Dowling and J. H. Galliear. Linear-time algorithms for testing the satisfiability of propositional Horn theories. Journal of Logic Programming 3 (1983) 267–284.
  • [4] T. Eiter, T. Ibaraki, and K. Makino. Computing intersections of Horn theories for reasoning with models. Artificial Intelligence, 110 (1999) 57-101.
  • [5] T. Eiter and K. Makino. On computing all abductive explanations. In Proceedings AAAI-2002 (2002) 62-67.
  • [6] D. Kavvadias, C. Papadimitriou, and M. Sideri. On Horn Envelopes and Hypergraph Transversals. In W. Ng, editor, Proceedings 4th International Symposium on Algorithms and Computation (ISAAC-93), LNCS 762, pages 399–405, Hong Kong, December 1993. Springer.
  • [7] H. Kautz, M. Kearns, and B. Selman. Reasoning with characteristic models. In Proceedings AAAI-93 (1993) 34–39.
  • [8] H. Kautz, M. Kearns, and B. Selman. Horn approximations of empirical data. Artificial Intelligence, 74 (1995) 129–245.
  • [9] R. Khardon and D. Roth. Reasoning with models. Artificial Intelligence, 87 (1996) 187–213.
  • [10] R. Khardon and D. Roth. Defaults and relevance in model-based reasoning. Artificial Intelligence, 97 (1997) 169–193.
  • [11] K. Makino and T. Ibaraki, Interior and exterior functions of Boolean functions, Discrete Applied Mathematics, 69 (1996) 209–231.
  • [12] K. Makino, H. Ono and T. Ibaraki, Interior and exterior functions of positive Boolean functions, Discrete Applied Mathematics, 130 (2003) 417–436.
  • [13] J. Makowsky. Why Horn formulas matter for computer science: Initial structures and generic examples. Journal of Computer and System Sciences, 34 (1987) 266–292.
  • [14] J. McKinsey. The decision problem for some classes of sentences without quantifiers. Journal of Symbolic Logic, 8 (1943) 61–76.
  • [15] B. Selman and H. Kautz, Knowledge compilation using Horn approximations, the Proceedings of the 9th National Conference on Artificial Intelligence AAAI-91, (1991) 904–909.