<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>New inference algorithms based on rules partition</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Agnieszka Nowak-Brzezinska</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Roman Siminski</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Computer Science, Institute of Computer Science, Silesian University</institution>
          ,
          <country country="PL">Poland</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>This paper presents new inference algorithms based on rules partition. Optimisation relies on reducing the number of rules searched in each run of inference and reducing the number of unnecessary recursive calls and avoiding the extraction of too many new facts. The rst part of the paper presents the de nition of the model of knowledge base based on rules partition. The second part describes the modi cations of both forward and backward inference algorithms using knowledge base with rules assigned to the groups given by the partition strategy. At the end, the paper consists of an example of knowledge base with the description of inference processes for this particular knowledge base.</p>
      </abstract>
      <kwd-group>
        <kwd>knowledge base</kwd>
        <kwd>inference process</kwd>
        <kwd>goal driven</kwd>
        <kwd>data driven</kwd>
        <kwd>rules partition</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        Knowledge bases are still one of the most popular method of knowledge
representation. They are constantly increasing in volume, thus the knowledge stored
as a set of rules is getting progressively more complex. The ability to obtain large
rules sets in easy and automatic way has got an enormous negative impact on the
time of decision making | inference in large rules sets is time consuming
process and the results of inference are in many cases hard to understand [
        <xref ref-type="bibr" rid="ref1 ref11 ref7">1, 11, 7</xref>
        ].
E ectiveness of both forward and backward inference algorithms is a signi cant
problem when considering the large and complex rules bases, especially when
we consider inference used in systems which work in the real-time environments
and do not use a dialogue with user during inference.
      </p>
      <p>
        This paper presents a new idea of partitioning of rule knowledge base and
application of this idea in inference optimisation task. We introduce an approach,
which assumes that the rule knowledge base is decomposed into the groups of
rules, called rules partitions. Knowledge base in the form of rules partitions
allows to improve the e ciency of inference algorithms. The groups of rules on
which the knowledge base is partitioned let to reduce the search space for
inference algorithms and to decrease the time needed to browse rules. Thus we may
say that the knowledge base in the form of rules partition optimises inference
processes. In this work we introduce two types of strategies for partitioning of
knowledge base. First important strategy, divides the rules knowledge base into
groups of rules with similar premisses, the second divides the rules into groups of
rules with the same conclusion. The rst one is called strategy based on similar
premisses. The second one is known as decision strategy. Both of the strategies
will be used as a base for proposed modi cation of inference algorithms. The
introduced partition strategies correspond to the research carried out so far by
the authors on cluster analysis for the rules in the knowledge base [8{10] and the
application of the concept of decision unit idea [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]. The proposed modi cation
of knowledge base model is a kind of decomposition of knowledge base. Every
created group of rules has its' representatives and during the inference processes
the representatives of groups of rules are browsed instead of every rule one by
one. Improving of the e ciency of forward inference is signi cant if the
quality of groups' representatives is high enough. The modi cation of the classical
backward inference algorithm is based on extracting information of internal rules
dependencies. This information allows to perform only promising recursive calls
of backward inference algorithm. Optimisation relies on reducing the number of
rules searched for each run of inference and reducing the number of unnecessary
recursive calls.
      </p>
      <p>The rst part of the work presents the rules partitioning approach. The
second part consists of the description of interence algorithms modi cations. At
the end, the paper contains an example of knowledge base with the description
of inference processes for this particular knowledge base.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Decomposition of rule knowledge bases</title>
      <p>The proposed concept assumes division of knowledge base into coherent
subgroups of rules. This section presents the basic concepts and notations of
knowledge base partitioning, because this conception is a relatively new and it is not
widely known. A signi cant part of this work contains detailed description of
proposed approach.
2.1</p>
      <sec id="sec-2-1">
        <title>Preliminary information</title>
        <p>The rules-based knowledge base R consists of n rules: r1; : : : ; ri; : : : ; rn and is an
unordered set. Each rule ri 2 R is stored as a Horn's clause: ri : p1 ^ p2 ^ : : : ^
pm ! c, where m is the number of literals1 in conditional part of rule ri (m 0,
i = 1 : : : n) and c is the literal for the conclusion part of rule ri. An attribute
a 2 A may be a conclusion of rule ri as well as a premise of it. For each rule
ri 2 R, the function concl(ri) returns the conclusion literal of rule ri, whereas
the function cond(ri) returns the set of conditional literals of rule ri. The set of
facts is denoted as F = ff1; f2; : : : fsg, the facts are also stored as literals. The
knowledge base KB is de ned as a pair: KB = (R; F ).
1 literals in the form of pairs of attribute and its value (a; via) (or equally a = via). Let
A be a non empty nite set of conditional and conclusion (decision) attributes. For
every attribute a 2 A, the set Va is called the set of values of attribute a.</p>
      </sec>
      <sec id="sec-2-2">
        <title>Partition strategies</title>
        <p>For every rules base R with n rules the number of possible subsets is 2n. Any
arbitrarily created subset of rules R 2 2R is called a group of rules P R or rules
partition. It is created by partition strategy, denoted by P S, which generates
groups of rules P R: P S(R) g)en P R. Partition strategy P S for rules set R
generates the partition of rules P R 2R:P R = fR1; R2; : : : ; Rkg where: k is the
number of groups of rules formed by the partition P R, and Rj is j-th group
of rules, R 2 2R and j = 1; : : : ; k. Partition strategy P S is the general
concept. It is possible to show a lot of di erent approaches for creating groups of
rules. Each of them can be done with a di erent partition strategy. Every
simple partition strategy involves the necessity of de ning the membership criteria
mc : R P R ! [0::1]. We can de ne mc in a variety of ways, also we can
consider speci c form of this function (mc : R P R ! f0; 1g), for example:
mc(ri; Rj ) =
1 if sim(ri; Rj ) T
0 in the opposite case
(1)
where sim(ri; Rj ) is de ned in eq.3.</p>
        <p>In general, the value 1 denotes the situation when rule ri 2 R is de nitely
included in the group Rj and 0 in the opposite case. The value between 0 and
1 denotes the degree of membership of rule ri to the group Rj . It is possible
to achieve many di erent partitions of rules. Generally, including op, as any
operator from the set [&gt;, &gt;, &lt;, 6, =, 6=], we can simply de ne partition P R as
follows: P R = fRj : Rj 2 2R ^ 8ri2Rj mc(ri; Rj ) op T g, where value mc(ri; Rj )
de nes the membership of rule ri to the group Rj which can be higher, higher
or equal, equal, less, less or equal to the threshold value T (0 T 1).</p>
        <p>The exceptional case of a simple strategy is the speci c partition called
further the selection. The selection divides the set of rules R into two subsets R
and R R in such a way, that all rules from R meet the membership criterion
for some partition strategy P S, and all other rules do not meet such criterion.
Partition P R = fR; R Rg, which is the result of the selection, is important in
practical terms. During the inference process, we search within the knowledge
base one rule by one (which is time consuming) in order to nd a set of relevant
rules. Selection serves the same role, because it provides rules necessary to be
activated during the inference process, but in a more e cient way.</p>
        <p>There are two types of partition strategies: simple and complex. Simple
strategy creates nal partition P R by a single search of rules set R and by assigning
each rule ri to group Rj according to the value of the membership function
mc(ri; Rj ). The example of simple strategy is a selection of a pair of most
similar rules or selection a group of rules to which a given rule is the most similar
according to the value of threshold T and membership function mc. The strategy
of creating groups of similar rules is the example of complex strategy because
it usually multiply runs the simple strategy of nding two most similar rules
or groups of rules. Complex strategies very often do not generate the nal
partition in a single step. Usually, they begin with a preliminary partition, which
is modi ed further in accordance to the methods of partition. It is de ned by
a combination of a few simple strategies, an iteration of one of them or the
combination of both methods.</p>
        <p>
          Partition strategy based on nding groups of rules with similar premisses is
the example of complex strategy which uses simple strategy known as strategy of
choosing a pair of the most similar rules many times. Finding the pair of most
similar objects is a crucial step in every clustering algorithm. Thus the
partition strategy which divides rules into the groups of rules with similar premisses
has the result similar to the Agglomerative Hierarchical Clustering (AHC)
algorithm but the hierarchy does not need to be saved [
          <xref ref-type="bibr" rid="ref8 ref9">8, 9</xref>
          ]. Only the result of the
nal partition is important. The process can be terminated when the similarity
between merged clusters drops below given threshold (it was called the mAHC
algorithm in [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ]). The result of partitioning the set of all rules from R using the
mAHC algorithm is k groups of rules R1; : : : ; Rl; : : : ; Rk and it is following:
R = fR1; : : : ; Rl; : : : ; Rk : 8ri;rj2Rl sim(ri; rj )
T g:
(2)
Each group Rl consists of rules for which mutual similarity is at least equal to T .
To do this, at the beginning we have to use simple strategy forming R1; : : : ; Rk
groups where every rule belongs to exactly one group. This strategy is used
only once and is de ned as: R : [fR1 [ : : : [ Rn : 8Ri2R1;:::;Rn jRij = 1 ^
8Ri;Rj2R1;:::;Rn;Ri6=Rj Ri \Rj = ;g. In the next step the strategy based on nding
the most similar rules or groups of rules is multiply executed.
        </p>
        <p>To determine the similarity between rules here the authors use the function
R R ! [0::1] de ned as:
sim(ri; rj ) = jcond(ri) \ cond(rj )j :
jcond(ri) [ cond(rj )j
(3)
The value of sim(ri; rj ) is equal to 1 if rules are formed by the same literals and
0 when they do not have any common literals. The more similar the rules are,
the value of sim(ri; rj ) is closer to 1. It uses the similarity of conditional part
of rules. However, we may also use the information about conclusions of rules
while measuring the similarity of rules. This similarity measure works well with
either rules, groups of rules, representatives of rules or set of facts. It is worth
to mention that each group in created rules partition achieves its'
representative called Pro le. Instead of searching within the full structure of rules, only
representatives of groups are compared. They are usually given by the set of
common literals among all the literals belonging to all the rules forming a group
of rules, a set of the most frequent literals or the set of distinctive ones. To nd
a relevant group of rules during the inference process the maximal value of
similarity (see eq. 3) between the set of facts F (and/or hypothesis to be proven)
and the representatives of each group of rules P rof ile(Rj ) is searched. Value of
sim(F; P rof ile(Rj )) is equal to 0 if there is no such fact fi (or hypothesis to
prove) which is included in the representative of any group Rj . It is equal to 1 if
all facts (and/or hypothesis) are included in the P rof ile(Rj ) of group Rj . The
more facts with hypotesis included in the pro le of group Rj the greater the
value of similarity. Exhaustive search of rules is done only within a given group.
Details of inference process are given in the section 3.</p>
        <p>
          Partition strategy for rules with the same conclusions creates the groups
of rules from R by grouping rules with the same attribute in conclusions. It
also can be called decision oriented partition strategy. The membership criterion
for rule ri and group Rj is given by the function mc de ned in eq. 1. When
we will use the simple partition algorithm (described below in the next section
as Alg01:createPartitions ) with the mc function de ned in this way, we obtain
decision oriented partitions. Each group of the rules generated by this algorithm
may have the following form: R = fr 2 R : 8ri2R concl(ri) = concl(r)g. The
number of groups in the partition k : 1 k n depends on the number of
di erent decisions included in conclusions of such rules. When we distinguish
di erent decision by the di erent conclusions appearing in the rules | we get one
group for each conclusion. This partition strategy corresponds to the concept of
the decision units presented in [
          <xref ref-type="bibr" rid="ref10 ref9">9, 10</xref>
          ]. In accordance to more general conception
of rules partitions (presented here), decision units are just one of many possible
partitioning strategy. In every group we have rules with the same conclusion: a
xed (a; v) pair. All rules, grouped within a rule set, take part in an inference
process con rming the goal described by the particular attribute-value | for
each R 2 P R the conclusion set jConcl(R)j = 1.
        </p>
        <p>
          The attribute in knowledge base usually represents the particular concept
or property from real word. The value of attribute expresses the determined
meaning of the concept or state of the property. If we consider the speci ed
(a; v) pair, we think about particular kind of concept or about particular property
state. Similarly, in decision tables DT = (U; A [ fdg) | considered in the Rough
Set Theory | values of decision attributes d de nes partition of objects from
U into the decision class CLASSA(d) = fXA1; XA2; : : : XAr(d)g, where r(d) is the
cardinality of value set for attribute a and XAi is the i-th decision class of A [
          <xref ref-type="bibr" rid="ref13">13</xref>
          ].
Each group of rules from elementary partition is similar to i-th decision class
XAi [
          <xref ref-type="bibr" rid="ref14">14</xref>
          ].
2.3
        </p>
      </sec>
      <sec id="sec-2-3">
        <title>The partition algorithms</title>
        <p>The input parameters for rules partition algorithm based on simple strategy are:
knowledge base R, mc function and the value of the threshold T . Output data is
the partition P R. Time complexity of such algorithm is O(n k), where n = jRj,
k = jP Rj. For each rule r 2 R we have to check whether the goal partition P R
contains the group R with rule r (the value of the mc function has to be at least
equal to T : mc(r; R) &gt; T ). If such a rule doesn't exist the given rule r becomes
the seed of a new group which is added to the created partition P R. Alg01:</p>
      </sec>
      <sec id="sec-2-4">
        <title>The simple partition algorithm</title>
        <sec id="sec-2-4-1">
          <title>Require: R, mc, T ;</title>
          <p>Ensure: P R = fR1; R2; : : : ; Rkg;
procedure createPartitions ( R, var P R, mc, T )
var R, r;
begin
P R = fg;
for all r 2 R do
if 9R 2 P R : mc(r; R) &gt; T then</p>
          <p>R = R [ r;
else</p>
          <p>R = frg;</p>
          <p>P R = P R [ R;
end if
end for
end procedure</p>
          <p>The algorithm of creating the speci c partition called selection is presented
below. The input parameters are knowledge base R, the function mc which
de nes the membership criterion and the threshold value T . Output data is the
single group of rules R, which consists of rules from R, that ful ll the condition
of mc. In fact, each selection generates the partition which has two elements,
but the second group is de ned implicitly as R R. So the nal partition of P R
for the selection strategy is created as: P R = fR; R Rg. Time complexity of
this algorithm is O(n), where n = jRj.</p>
          <p>Let us notice that presented algorithm does not have any knowledge about the
speci cation of a given group of rules. It uses only the values of the membership
function mc. If the parameter R is an empty set, the function of mc determines
whether the rule r ful lls the condition given by the membership function for
empty group R. Alg02: Selection strategy algorithm</p>
        </sec>
        <sec id="sec-2-4-2">
          <title>Require: R, mc, T ;</title>
          <p>Ensure: R = fr1; r2; : : : ; rlg;
procedure createSelection ( R, var R, mc, T )
var r;
begin
for all r 2 R do
if mc(r; R) &gt; T then</p>
          <p>R = R [ r;
end if
end for
end procedure</p>
          <p>An example of partition algorithm (di erent to selection strategy algorithm)
is the algorithm based on clustering rules into groups of similar rules. For each
rule it checks if a particular rule should be included in a given group. The result
is a partition of k groups: P R = fR1; R2; : : : ; Rkg. This algorithm describes the
AHC or mAHC algorithms and it is presented as follows.</p>
        </sec>
      </sec>
      <sec id="sec-2-5">
        <title>Alg03: Partition algorithm given by clustering</title>
        <sec id="sec-2-5-1">
          <title>Require: R, mc, T ;</title>
          <p>Ensure: P R = fR1; R2; : : : ; Rkg;
procedure clustering ( R, var R, mc, T )</p>
        </sec>
      </sec>
      <sec id="sec-2-6">
        <title>INPUT: R ;</title>
        <p>repeat
carry out some processing</p>
        <p>ndTwoMostSimilarGroupsOfRules (R);
createNewGroup(pOR, R );
until maxfsim(Ri; Rj )g T</p>
      </sec>
      <sec id="sec-2-7">
        <title>OUTPUT: R' ;</title>
        <p>where R0 denotes the created rules' partition. ndTwoMostSimilarGroupsOfRules (
R ) is the procedure that compares groups' representatives and nds the two most
similar. The createNewGroup(pOR, R) function adds the new, recently created
group to the structure and reduces the size of the structure by removing the
elements which formed the newly created group.</p>
        <p>Partitions generated by the algorithms Alg01, Alg02, Alg03 are unique
and complete | each rule r 2 R is considered, and quali ed to one group R,
that matches the criteria of mc. Presented modi cation of backward inference
will utilise this features. For this reason algorithms which generates incomplete
or non-unique partitions will not be presented in this work.
3</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Inference in knowledge bases with partition of rules</title>
      <p>
        The main goal of the decision support systems (DSSs) is to infer new knowledge
from data stored in knowledge base. The inference is the process of proving (or
falsifying) the hypothesis, knowing that the facts used in the process are true
[
        <xref ref-type="bibr" rid="ref1 ref2">1, 2</xref>
        ]. The more rules in knowledge base, the greater the time needed to search
withing a given knowledge base. A lot also depends on the number of facts given
as input data. Choosing a proper methods of inference is very crucial and should
be considered due to a goal of the given user of DSS. If the user wants to prove
some hypothesis, the best choice is a goal driven inference process. When the
user does not know what to prove, but has some facts given as input knowledge,
the proper way is to use data driven inference process.
3.1
      </p>
      <sec id="sec-3-1">
        <title>Forward inference</title>
        <p>This type of inference is also called data or facts driven. Each rule is analysed
whether all its' premisses are satis ed. If that is the case, the rule is activated and
its' conclusions are added to the set of facts. The algorithm stops either where
there are no more rules which can be activated or when the starting hypothesis
is added to the set of facts [5{8]. Forward inference leads to a massive growth
of new facts, but most of them are nonessential to prove the starting hypothesis
and can slow down the inference process signi cantly. Unfortunately, when the
DSS consists of more than 100 rules, the vast majority of time (over 90%) is
consumed to nd the rules which can be activated [2{4]. The inference process
can be divided into three stages: matching, choosing and execution. At rst, the
premisses of each and every rule are analysed to match it to the current set
of facts. Then the subset of the con ict set is chosen consisting of those rules,
which are actually activated. At the end, previously selected rules are analysed
and the set of facts is updated. The matching phase usually takes the biggest
amount of processing time during the inference. To reduce the time necessary to
realise the matching phase, the authors propose to partition the rules into groups
that match the facts set with minimal covering threshold. It is not necessary to
build a full partition and to create the selection from all the rules which are
relevant to set of facts with some minimal covering factor. Having the structure
with rules' partition, the forward inference works as follows: in each iteration
the representatives of each group are browsed and only a group with the highest
similarity to the given set of facts is chosen for further analysis. This particular
group is the browsed. Each rule belonging to this group is analysed and when
the rules' premisses are fully covered by the set of facts, rule is activated. The
conclusion of the activated rule is added to the set of facts.</p>
        <p>The pseudocode of such inference process is following:</p>
        <sec id="sec-3-1-1">
          <title>Require: R, F ;</title>
          <p>Ensure: F ;
procedure forwardInference ( R, F )
var R;
begin
createFactsMatchingSelection ( R, F , R );
while R 6= ; do
applyRules ( R, F );
excludeRules ( R, R );
createFactsMatchingSelection ( R, F , R );
end while
end procedure</p>
          <p>The algorithm uses temporary variable R, which is the set of rules that is the
result of the previous selection. The procedure responsible for nding the most
relevant group to the given set of facts (F ) and thus - the rules to activate is
createFactsMatchingSelection. It is responsible for creating the selection of rules
that match the given condition de ned by mc. The membership function mc
checks whether the sim(ri; Rj ) is greater or equal to T . Using the
createFactsMatchingSelection procedure reduces the time necessary to nd relevant rules
signi cantly. The original time complexity O(n) is reduced to the O(k) where
k &lt;&lt; n, k denotes the number of created groups. If the result of the selection
is not empty (R 6= ;) the procedure applyRules is commenced. It adds the new
facts which are the conclusions of all rules activated from the set R to the set
of facts. The excludeRules function temporarily removes activated rules from
further searching. Afterwords, the createF actsM atchingSelection procedure is
called again. The whole presented process is repeated in while loop until the
selection becomes empty.</p>
          <p>It should now be clear that the most often used method of running the mc
function is to calculate the similarity value between a given set of facts and a
rule from the previously selected set R.</p>
          <p>Among the advantages of the proposed modi cation of the classical forward
inference process are: reducing the time necessary to search within the whole
knowledge base in order to nd rules to activate and achieving additional
information about fraction of rules that match the input knowledge (the set of
facts).
3.2</p>
        </sec>
      </sec>
      <sec id="sec-3-2">
        <title>Backward inference</title>
        <p>In this section we present the backward inference algorithm, which use the
conception of the decision partitions P R, created by the selection algorithm Alg01.
The proposed modi cation utilises the following concepts: (i) the reduction of
the search space by choosing only rules from particular rule group, according to
a current structure of decision oriented rules partition and (ii) the estimation of
the usefulness for each recursive call for sub-goals, only promising recursive calls
of classical backward algorithm will be made.</p>
        <p>Modi ed algorithm for backward inference will use the following input data:
P R | the decision partition, F | the set of facts, g | the goal of the inference.
The output data of the algorithm: F | the set of facts, including possible new
facts obtained through inference, the function's result as boolean value, true if
the goal g is in the set of facts: g 2 F , false otherwise.</p>
        <p>The proposed modi cation of backward inference algorithm utilises the
information from decision partitions of rules to reduce the number of unnecessary
recursive calls and the number of rules searched for in each run of the
inference. Only promising groups of rules are selected for further processing (select
R 2 P R where g 2 Concl(R)), where Concl(R) is the set of conclusions for
the group of rule R, containing literals appearing in the conclusion parts of the
rules r from R. Only the selected subset of the whole rules of (R A) is
processed in each iteration. Finally, only the promising recursive calls are made
(w 2 InC (R)). InC (R) denotes connected inputs of the rules group, de ned in
the following way: InC (R) = f(a; v) 2 Cond(R) : 9r2R (a; v) = concl(r)g, where
Cond(R) is the set of conditions for the group of rule R, containing literals
appearing in the conditional parts of the rules r from R. In each iteration the set
R contains only proper rules matching to the currently considered goal, it
completely eliminates the necessity of searching for rules with conclusion matching
to the inference goal, it is not necessary to search within the whole set of rules
R | this information is simply stored in the decision-units and does not have
to be generated.
3.3</p>
      </sec>
      <sec id="sec-3-3">
        <title>An example of knowledge base and inference processes</title>
        <p>To illustrate the conception of partitioning and exploring the knowledge base,
let us consider an example of knowledge base R which consists of following rules.
r1 : (a; 1) ^ (b; 1) ! (c; 1) r2 : (a; 1) ^ (b; 2) ! (c; 2) r3 : (a; 1) ^ (b; 3) ! (c; 1)
r4 : (b; 3) ^ (d; 3) ! (e; 1) r5 : (b; 3) ^ (d; 2) ! (e; 1) r6 : (b; 3) ! (e; 2)
r7 : (d; 4) ! (f; 1) r8 : (d; 4) ^ (g; 1) ! (f; 1) r9 : (a; 1) ! (d; 4)</p>
        <p>According to the knowledge base presented below and the set of facts F =
f(a; 1)g, in case of goal driven inference algorithm, for con rmation of the main
goal of the inference described by literal (f; 1), it is necessary to nd rules
matching to the goal. Next | if such rules exist | we have to select the rule to be
activated. In our simple example we select a group R1 with rules r7 and r8 from
which we are choosing r7 as the rule with higher similarity value. Now we have
to con rm the truth of the premise (d; 4). Because it doesn't appear in the facts
set, it becomes a new sub-goal of inference and inference algorithm runs
recursively. The classic version of the algorithm does not known whether the call is
promising | i.e. it is unknown if there is a rule that proves the new goal of
inference. For goal (d; 4) we use recursive call for (a; 1). It is a fact and when it
is con rmed the other subgoal will also be con rmed (d; 4) as well as the main
hypothesis (f; 1).</p>
        <p>According to the rules' partition based on nding similar rules and the set
of facts f(g; 1); (d; 4)g the process of data driven inference algorithm goes as
follows. Assuming that chosen partition strategy returns the following structure
of knowledge base:</p>
        <p>R1 = fr7; r8g R2 = fr1; r3g R3 = fr4; r5g R4 = fr2g R5 = fr6g R6 = fr9g
we check the similarity2 between the set of facts F and the representative of
each group:
sim(F; P rof ile(R1)) = 23 ; sim(F; P rof ile(R2)) = 0; sim(F; P rof ile(R3)) = 0;
sim(F; P rof ile(R4)) = 0; sim(F; P rof ile(R5)) = 0; sim(F; P rof ile(R6)) = 0:</p>
        <p>Next we choose the most similar group to the set of facts (which is R1) and
we check the similarity between every rule in this particular group:</p>
        <p>
          We activate rules with all known premisses (in our case it is only one rule r8).
Then we include new fact to F : F = F [ f(f; 1)g. The new fact is the conclusion
of activated rule r8. Of course we block rule r8 to make sure that it will not
be analyzed later because it would only increase the time of inference process
without gaining additional knowledge. We also block the whole group if all its'
rules are already blocked. The result of the inference process is eventually given
as a set of facts F = f(g; 1); (d; 4); (f; 1)g. If the rules partition is the result
of using the partition strategy based on clustering algorithm, it is necessary to
search the groups of rules using similarity measure based on searching using
pro les of groups. We may use any algorithms for rules clustering but the most
e cient one is, in authors' opinion, the AHC or mAHC algorithm presented
in [
          <xref ref-type="bibr" rid="ref8 ref9">8, 9</xref>
          ]. Therefore, it is quite easy to nd a group which would be suitable for
inference process. The time complexity of this operation is O(log n) where n is
the number of elements grouped during the clustering.
4
        </p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Summary</title>
      <p>We have introduced the approach, which assumes that the rule knowledge base
is decomposed into the groups of rules, called rules partitions. In our opinion
each knowledge base contains enough information, which allows to improve the
e ciency of the classic inference algorithms. We introduce partitions of rules as
the source of such information. Modi cation of the classical inference algorithms
is based on information extracted from the rules of groups generated by the
proposed, two partitioning strategy.</p>
      <p>The proposed modi cation of forward algorithm consists of the reduction
the time necessary to realise the matching phase of inference by choosing only
the rules from particular rule group, which match the facts set with minimal
covering threshold. The proposed modi cation of backward algorithm consists of
the reduction of the search space by choosing only the rules from particular rule
group, according to a current structure of decision oriented rules partition and
the estimation of the usefulness for each recursive call for sub-goals. Therefore,
2 the value for a pair F and P rof ile(R1) is equal to 23 because there are two common
literals ((g; 1); (d; 4)) both in the set of facts and the representative of a group R1 =
f(g; 1); (d; 4); (f; 1)g.
only necessary rules are searched and only promising recursive call of the classical
backward algorithm will made.</p>
      <p>
        The concept of rules partitions is the new proposition, based on the previous
research concerning on rules clusters [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] and decision units [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]. Proposition of
the modi ed inference algorithm is the continuation of the previous research on
optimisation of the inference in the knowledge based systems [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] .
      </p>
    </sec>
    <sec id="sec-5">
      <title>Acknowledgements</title>
      <p>This work is a part of the project ,,Exploration of rule knowledge bases" founded
by the Polish National Science Centre (NCN: 2011/03/D/ST6/03027).</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>R.</given-names>
            <surname>Akerkar</surname>
          </string-name>
          and
          <string-name>
            <given-names>P.</given-names>
            <surname>Sajja: Knowledge-Based</surname>
          </string-name>
          <string-name>
            <surname>Systems</surname>
          </string-name>
          , Jones &amp; Bartlett Learning, (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>D.</surname>
          </string-name>
          <article-title>Batory: The LEAPS Algorithms</article-title>
          , http://reports-archive.adm.cs.cmu.edu/ anon/1995/CMU-CS-
          <volume>95</volume>
          -113.pdf, (
          <year>1995</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>C. L. Forgy</surname>
          </string-name>
          <article-title>: On the e cient implementation of production systems</article-title>
          , CarnegieMellon University, (
          <year>1979</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>C. L.</surname>
          </string-name>
          <article-title>Forgy: Rete: A Fast Algorithm for the Many Pattern</article-title>
          .
          <source>Many Object Pattern Match Problem, Arti cial Intelligence</source>
          , (
          <year>1981</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>J. P.</given-names>
            <surname>Ignizio</surname>
          </string-name>
          :
          <article-title>An introduction to Expert Systems, McGraw-</article-title>
          <string-name>
            <surname>Hill</surname>
          </string-name>
          ,
          <article-title>(</article-title>
          <year>1991</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>D. P.</surname>
          </string-name>
          <article-title>Miranker: TREAT: A better match algorithm for AI Production Systems</article-title>
          , Department of Computer Sciences, University of Texas at Austin,(
          <year>1987</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>D.</given-names>
            <surname>Heckerman</surname>
          </string-name>
          ,
          <article-title>An Empirical Comparison of Three Inference Methods</article-title>
          , CoRR,
          <year>2013</year>
          , http://arxiv.org/abs/1304.2357, http://dblp.uni-trier.de.
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Nowak-Brzezinska</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          <string-name>
            <surname>Jach</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Siminski</surname>
          </string-name>
          , T. Xieski:
          <article-title>Towards a practical approach to discover internal dependencies in rule-based knowledge bases</article-title>
          ,
          <source>Lecture Notes in Computer Science, LNCS 6954</source>
          , Springer,
          <fpage>232</fpage>
          -
          <lpage>237</lpage>
          , (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <given-names>A.</given-names>
            <surname>Nowak-Brzezinska</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Wakulicz-Deja</surname>
          </string-name>
          :
          <article-title>The way of rules representation in composited knowledge bases</article-title>
          ,
          <source>Advanced In Intelligent and Soft Computing, Man - Machine Interactions</source>
          , Springer-Verlag,
          <fpage>175</fpage>
          -
          <lpage>182</lpage>
          , (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10. A.
          <string-name>
            <surname>Nowak-Brzezinska</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          <article-title>Siminski: Knowledge mining approach for optimization of inference processes in rule knowledge bases</article-title>
          ,
          <source>Lecture Notes in Computer Science</source>
          , vol.
          <volume>7567</volume>
          , Springer Berlin Heidelberg, (
          <volume>534</volume>
          -
          <fpage>537</fpage>
          ), (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11. W. Pedrycz:
          <article-title>Knowledge-Based Clustering: From Data to Information Granules</article-title>
          , Willey, (
          <year>2005</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12. R. Siminski:
          <article-title>Extraction of Rules Dependencies for Optimization of Backward Inference Algorithm</article-title>
          , Beyond Databases, Architectures, and Structures, vol.
          <volume>424</volume>
          , Communications in Computer and Information Science, Springer International Publishing,
          <volume>191</volume>
          -
          <fpage>200</fpage>
          , (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <given-names>A.</given-names>
            <surname>Skowron</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Komorowski</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Pawlak</surname>
          </string-name>
          , L. Polkowski:
          <article-title>Handbook of Data Mining and Knowledge Discovery</article-title>
          , Oxford University Press, Inc., (
          <year>2002</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <given-names>A.</given-names>
            <surname>Skowron</surname>
          </string-name>
          ,
          <string-name>
            <surname>Z.</surname>
          </string-name>
          <source>Suraj: Rough Sets and Intelligent Systems - Professor Zdzislaw Pawlak in Memoriam, Intelligent Systems Reference Library</source>
          , Vol.
          <volume>42</volume>
          , Springer Verlag, (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>