• Tidak ada hasil yang ditemukan

Directory UMM :Data Elmu:jurnal:O:Operations Research Letters:Vol26.Issue1.2000:

N/A
N/A
Protected

Academic year: 2017

Membagikan "Directory UMM :Data Elmu:jurnal:O:Operations Research Letters:Vol26.Issue1.2000:"

Copied!
4
0
0

Teks penuh

(1)

Operations Research Letters 26 (2000) 23–26

www.elsevier.com/locate/orms

Forward chaining is simple(

x

)

Julian Araoz

Universidad Simon Bolvar, Res. El Aleph, 2-A, Av. Los Samanes, La Florida, Caracas 1050, Venezuela Received 1 June 1996; received in revised form 1 August 1999

Abstract

We show that Forward Chaining in Horn Systems is merely the Simplex Algorithm, although they look completely dierent. This dierence is similar to the one between the Simplex and Transportation Algorithms, in that the latter takes advantage of special structure in the problem. We further show that Backward Chaining is the same as the Dual Simplex Algorithm.

c

2000 Published by Elsevier Science B.V. All rights reserved.

Keywords:Analysis of algorithms; Simplex; Knowledge bases

1. Introduction

In areas where every problem seems to need a spe-cial algorithm, time and again dierent algorithms are found to be merely instances of the same schema. This is good because problem solving techniques are en-riched. We present a new example of this phenomenon from the area of Expert Systems. In this area vari-ous schemes are used to represent a given knowledge base which is then used by the system to produce new knowledge. These operations have generally been seen as a particular case of logical deduction and have thus been treated logically, while search algorithms have been used to look for new statements of truth in the base.

An alternative point of view is that any knowl-edge representation model is essentially a combi-natorial data structure, since it can be viewed as a discrete set with some suitably dened combining rules. It follows that a deduction corresponds to a

E-mail address:[email protected] (J. Araoz)

search in such a structure. By using results from Combinatorial Optimization, we may formulate de-ductive models in knowledge-based systems.

In the present paper, we deal with propositional Horn Clauses. This is not the most general knowl-edge representation schema, but it is an expressive and widely used one. A directed hypergraph-based model for Horn Clause systems, which leads to the equiva-lence between logical deduction in such systems and a linear programming problem corresponding to a gen-eralization of ow in networks to directed hypergraphs has already been proposed [6].

We show that Forward Chaining in Horn Systems is equivalent to solving a Directed Hypergraph Flow Linear Program using the rst phase of the Simplex Algorithm with articial variables. Applying Simplex in this way we see that both algorithms behave identi-cally. This means that Forward Chaining is none other than the Simplex Algorithm, despite the fact that they look completely dierent. However, this dierence recalls that between the Bounded Simplex and the Transportation Algorithm which takes advantage of

(2)

24 J. Araoz / Operations Research Letters 26 (2000) 23–26 the special structure of the problem. In the same way

Backward Chaining is the Dual Simplex Algorithm. This is not really so strange, since the Simplex Algo-rithm is a search schema which traverses the vertices along the edges of the polyhedron.

2. Paths and ows in directed hypergraphs

Berge [2] introduced hypergraphs as a generaliza-tion of graphs, with hyperedges which are subsets of the nodes. Thus any matrix with only zero-, or one-valued entries is the incidence matrix of a hyper-graph.

The same idea may be trivially extended to directed graphs leading to the idea of directed hypergraphs, so any matrix with only zero-, one- or minus-one-valued entries is the incidence matrix of a directed hyper-graph. The hyperedges are given by two sets,tailand

head. Directed hypergraphs have been used for several applications. Most combinatorial problems and some algorithms on directed graphs can be extended to di-rected hypergraphs.

ADirected Hypergraphis a pairH= (V; E) of -nite sets, whereVis the set ofnodesandEis the set of

hyperedges. A hyperedge is an ordered and non-empty paire= (t(e); h(e)), of (possibly empty) disjoint sub-sets of nodes;t(e) is thetailofewhileh(e) is itshead. Now we present a generalization of Network Flow Problems to Directed Hypergraphs.

Let H be a Directed Hypergraph. Then a owF inH is just a function of the hyperedges ofH into the non-negative real numbers. The value F(e) will be called theuxof the hyperedgee. A owF is an

integral owif and only if for alleinE, the ux ofe is an integer.

The divergence function of F is a function DivF fromV into the real numbers dened as: DivF(v) =

P

v∈h(e) F(e)−

P

v∈t(e) F(e).

LetH be a Directed Hypergraph andY a function fromEinto the real numbers. Then theincidence ma-trixH= (hv; e:v∈V; e∈E) ofH is dened by

Note that the divergence function forvican be cal-culated by multiplyingith row of the incidence matrix ofHby the vector F. Therefore, we have H∗F=DivF. LetHbe a Directed Hypergraph,V′andV′′disjoint subsets ofV, and letF be a ow in H. ThenF is a

unit owfromV′ intoV′′if and only if: (i) ∀u∈V′′ (DivF(v) = 1);

(ii) ∀v∈V−(V′∪V′′) (DivF(v) = 0):

Therefore, F is a unit ow if and only if it is a feasible solution to the linear program:

System 2.1.

Note that System 2:1 corresponds to the Path Poly-hedron fromV′toV′′without the redundant inequal-ity corresponding toV′.

Anincreasing hyperpathfroms0toskin a Directed

HypergraphH is a sequence of form: s0e1s1e2s2: : : sk−1eksk

We use the name increasing hyperpath because they correspond to the feasible solutions of System 2:1 as have been proved in [6].

3. Horn’s systems and rule hypergraphs

(3)

J. Araoz / Operations Research Letters 26 (2000) 23–26 25 [5]. In a propositional system a clause is nothing

more than a statement of the form:V

p∈P ⇒

W

p′∈P′,

whereP andP′ are both sets of atomic propositions, i.e. instances of propositional variables. A formula is in clausular form if it is a nite conjunction of clauses.

A particular class of clauses, very important for the simplicity of derivations using them and for their suitability for expressing the most knowledge, are Horn Clauses [3] in which there is only one atomic proposition on the right-hand side, i.e. clauses of the form:V

p∈P ⇒p

. A formula that is a nite conjunc-tion of Horn Clauses is said to be in Horn Clausular Form. Note that a clause of the form V

p∈P ⇒ p ′, wherep′P, is a tautology, so any formula in Horn Clausular Form can be assumed to have no such clauses.

Let P be a set of atomic propositions. Then a

Horn’s SystemSis a pair (P; C), whereCis a set of non-tautological Horn’s Clauses referencing only the atomic propositions inP.

A Horn’s system is then naturally modeled by a di-rected hypergraph with all hyperedges having a uni-tary head. In this model nodes represent the atomic propositions of the system and hyperedges represent the clauses.

A Directed HypergraphHis aRule Hypergraphif and only if:

∀e∈E (|h(e)|= 1):

Any hyperedge ofH will be called aruleand any node an atom of H. Any subset of V will be an

Information StateofH.

Now, we introduce a path-based concept of deriva-tion which is equivalent to deducderiva-tion in Horn Systems [6].

Let H be a Rule Hypergraph. A derivation of d fromT inH, wheredis an atom andT an information state, is an increasing hyperpath of the form:

s0e1s1e2s2: : : sk−1eksk; where

(i) s0T;

(ii) d∈sk\T:

The hyperedge sequence of a derivation will be calledrule sequence. A rule contained in the rule se-quence of a derivation is said to beappliedin it. Given

an information stateT, a ruleeis said to beapplicable

inT if and only ift(e)⊆T.

Note that the concept of derivation in rule hyper-graphs corresponds to that of logical derivation with Horn Clauses bymodus ponens. If information states are interpreted as the conjunction of the propositions represented by its atoms, which are assumed to be true, then a rule is applicable if its preconditions are true, and the set of true propositions after the rule is applied is augmented by its consequent. A rule with consequent already in the set of true propositions is called trivial.

4. Forward chainingversussimplex

In this section we will show that the rst phase of the Simplex Algorithm with articial variables applied to any systemQof the type given in System 2:1 behaves exactly as the Forward Chaining Algorithm. Hence the Forward Chaining Algorithm could be considered as a Simplex Algorithm which takes advantage of the special structure of the problem in the same way that the Transportation Algorithm does. First we present the Forward Chaining Algorithm.

Algorithm 4.1. LetT be the set of true atoms andd a given atom. Obtain a derivation ofdfromT if one exits.

Step1:s0:=T,

k:=0.

Step2: While (there exists a non-trivial rule appli-cable insk) and (d6∈sk) do

• Pick an applicable ruleek+1 insk,

• sk+1:=sk∪h(ek+1),

• k:=k+ 1.

Step3: Ifd6∈skthen there is no derivation, other-wise the increasing hyperpath

s0e1s1e2s2: : : sk−1eksk

is a derivation ofdfromT.

(4)

26 J. Araoz / Operations Research Letters 26 (2000) 23–26

Proof. We prove the theorem by showing, using induction, that the derivation ofdfromT,

s0e1s1e2s2: : : sk−1eksk

is obtained withs0=T and at any pivoting stepkwe

can pivot in a columneonly if it is an applicable rule insk−1.

Note that, after adding the artical variables, the problem is to minimize their sum. The right-hand side are all 0 but for the one corresponding to atomdwhich is 1. The algorithm ends when this variable leaves the basis, that is, a rule with consequentdenters the basis and henced∈sk.

At any pivoting step, a variablej could enter the basis only if its transformed costzj−cj¿0.

If we show that at any step the basis, after rearrang-ing the columns have the shape

B O O I

where

B O

are the columns of the rules variables in the basis (denoted byEB) and

O I

are the columns of the articial variables in the basis, with O matrices of zeros of the appropriate dimen-sions. Let Abe the basis row indices of the articial variables. Then we have

zj−cj=X i∈A

hi; j;

sincecj=0 for the real variables,cj=1 for the articial variables, and the inverse of the basis is

B−1 O

O I

:

Therefore,ejcould enter the basis only ifzj−cj= 1. That is, it is a rule applicable in T ∪H =s|EB|

whereH ={h(e):e∈ EB}. Hence, we have proved the theorem.

(i) For k= 0, the basis is the identity matrix and

|EB|= 0.

(ii) At pivot stepk, we have |EB|=k; sk=T ∩H. Since the pivot element is 1 and the others are 0 we keep the same shape of the basis.

5. Remarks

Theorem 4.2 implies that any polyhedron cor-responding to a system of equations with 0;1;−1 entries with at most one per column, non-negative variables and non-negative right-hand side has inte-ger vertices. This was proved independently in [4,6]. The non-negative conditions are essential for integer vertices. It is also possible to give an explicit inverse of any basis. The values of the variables in a solution indicate how many times a rule is used to get the solution in an and=or tree.

The linear program given in System 2:1 could be modied changing the equal symbols to greater than or equal symbols. Hence the equations became inequal-ities, but the vertices remain the same. In this case the Dual Simplex Algorithm corresponds to Backward Chaining.

An early version of this work was reported in [1].

References

[1] J. Araoz, Search in Horn’s knowledge bases and the simplex algorithm, Proceedings of PANEL’91, edited by Coordinacion de Computacion, USB, Caracas, 1991, pp. 1273–1282. [2] C. Berge, Graphes et Hypergraphes, 2nd Edition, Dunot, Paris,

1976.

[3] A. Horn, On sentences which are true of direct unions of algebras, J. Symbolic Logic 16 (14) (1951).

[4] R.G. Jeroslow, Computation-oriented reductions of predicate to propositional logic, Decision Support Systems 4 (1988) 183–197.

[5] Z. Manna, Mathematical Theory of Computation, McGraw-Hill, New York, 1974.

Referensi

Dokumen terkait

After 12 weeks in the glasshouse, the leaves of acclimatized plants were completely covered with waxes (Fig. 1A and B), whereas those grown in airtight culture vessels or at low

It is useful to note that the results (Table 10) for fibre produced by anagen follicles creates particular cashmere are similar (a) to responses recorded in demands for sulphur

Therefore, if a sequential Prisoners Dilemma Game (the conventional transaction struc- ture) is converted into the transaction structure of the Indenture Game, Forward Induction

In this paper we will describe two algorithms which allow us to nd the second order linear dierence equation (SODE) which satisfy certain families of polynomials.. We will consider

The so-called classical continuous (Jacobi, Laguerre, Hermite) and discrete (Charlier, Meixner, Kravchuk, Hahn) orthogonal polynomials appear at dierent levels of the Askey tableau

CreditMetrics models the full forward distribution of the values of any bond or loan portfolio, say 1 year forward, where the changes in values are related to credit migration

The physiological function of LTP is not completely elucidated but in vitro studies have shown that LTP cata- lyzes the exchange and/or transfer of DAG: (1) between lipophorins

The agrarian economies of Central and Eastern Eu- rope (CEE) and the former Soviet Union are under- going a systemic change and transformation. Look- ing back, it can be seen that