<!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>Reducing the Size of the Optimization Problems in Fuzzy Ontology Reasoning</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Fernando Bobillo</string-name>
          <email>fbobillo@unizar.es</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Umberto Straccia</string-name>
          <email>straccia@isti.cnr.it</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Dpt. of Computer Science &amp; Systems Engineering, University of Zaragoza</institution>
          ,
          <country country="ES">Spain</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Istituto di Scienza e Tecnologie dell'Informazione (ISTI - CNR)</institution>
          ,
          <addr-line>Pisa</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Fuzzy ontologies allow the representation of imprecise structured knowledge, typical in many real-world application domains. A key factor in the practical success of fuzzy ontologies is the availability of highly optimized reasoners. This short paper discusses a novel optimization technique: a reduction of the size of the optimization problems obtained during the inference by the fuzzy ontology reasoner fuzzyDL.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        In recent years, we have noticed an increase in the number of applications for
mobile devices that could bene t from the use of semantic reasoning services [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
Because of the limited capabilities of mobile devices, it is especially important to
develop reasoning algorithms performing e ciently in practice. In order to deal
with imprecise knowledge, such applications could use fuzzy ontologies [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. In
fuzzy ontologies, concepts and relations are fuzzy. Consequently, the axioms are
not in general either true or false, but they may hold to some degree of truth.
      </p>
      <p>
        However, little e ort has been paid so far to the study and implementation of
optimization techniques for fuzzy ontology reasoning, which is essential to reason
with real-world scenarios in practice (some exceptions are [
        <xref ref-type="bibr" rid="ref3 ref4 ref5 ref6">3,4,5,6</xref>
        ]). This short
paper discusses some optimization techniques to improve the performance of
the reasoning algorithm by reducing the size of optimization problems obtained
during the inference. In particular, we will provide optimized MILP encodings of
the restrictions involving n-ary operators and fuzzy membership functions. Such
optimizations have been implemented in fuzzyDL, arguably the most popular
and advanced fuzzy ontology reasoner [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], and proved their usefulness.
      </p>
    </sec>
    <sec id="sec-2">
      <title>Background on fuzzyDL reasoning</title>
      <p>
        We assume the reader to be familiar with the syntax and semantics of fuzzy
Description Logics (DLs) [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. The reasoning algorithm implemented in fuzzyDL
combines tableaux rules with an optimization problem. After some
preprocessing, fuzzyDL applies tableau rules decomposing complex concept expressions
into simpler ones, as usual in tableau algorithms, but also generating a system
of inequation constraints. These inequations have to hold in order to respect
the semantics of the DL constructors. After all rules have been applied, an
optimization problem must be solved before obtaining the nal solution. The tableau
rules are deterministic and the optimization problem is unique.
      </p>
      <p>
        This optimization problem has a solution i the fuzzy KB is consistent. In
fuzzyDL, we obtain a bounded Mixed Integer Linear Programming [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] (MILP)
problem, that is, minimising a linear function with respect to a set of constraints
that are linear inequations in which rational and integer variables can occur.
The problem is bounded, with rational variables ranging over [0; 1] and some
integer variables ranging over f0; 1g. For example, in Lukasiewicz fuzzy DLs, the
restriction x1 L x2 = z can be encoded using the set of constraints fx1 +x2 1
z; x1 + x2 1 z y; z 1 y; y 2 f0; 1gg. Observe that the MILP encoding
of the restriction has introduced a new variable y: the two possibilities y = 0
and y = 1 encode the non-deterministic choice implicit in the interpretation
of the conjunction under Lukasiewicz fuzzy logic. The complexity of solving a
MILP problem is NP-complete and it depends on the number of variables, so it
is convenient to reduce the number of new variables.
      </p>
      <p>
        Let x; z be [0; 1]-variables, and xu be a rational unbounded variable. fuzzyDL
has to solve some restrictions involving fuzzy connectives, such as x1 = x2,
x1 x2 = z, x1 x2 = z, or x1 ) x2 = z. Furthermore, it also needs to solve
some restrictions d(xu) z involving fuzzy membership functions d such as the
trapezoidal(k1; k2; q1; q2; q3; q4) (see Table 1 (a)), the triangular(k1; k2; q1; q2,
q3), lef t(k1; k2; q1; q2), or right(k1; k2; q1; q2) [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ].
3
      </p>
      <p>Optimizing Lukasiewicz N-ary Operators
Let us start with the case of conjunction concepts in Lukasiewicz fuzzy DLs.
An n-ary concept of the form (C1 u C2 u u Cn) can be represented, using
associativity, only using binary conjunctions (C1 u(C2 u( uCn)) : : : ). A binary
conjunction concept introduces a restriction of the form x1 L x2 = z which, as
shown in Section 2, can be encoded adding a new binary variable y. Hence, in
order to represent the n-ary conjunction, n 1 new variables yi would be needed.
However, it is possible to give a more e cient representation by considering the
conjunction as an n-ary operator. Indeed, a restriction of the form x1 L x2
xn = z can be encoded using only one new binary variable and, thus, saves
2n 2 possible alternative assignments to the variables yi.
y = 0 encodes the case z = Pin=1 xi (n 1) 0, and y = 1 encodes the case
z = 0 and Pin=1 xi (n 1) &lt; 0. Let us consider now disjunction concepts in
Lukasiewicz fuzzy DLs. A binary disjunction can be represented adding a new
binary variable y as fx1 + x2 z + y; y z; x1 + x2 z; y 2 f0; 1gg. Again, n 1
new binary variables would be needed but, similarly as before, considering the
disjunction as an n-ary operator we would need only one new binary variable:
An n-ary conjunction can be represented using binary conjunctions adding
restrictions of the form x1 G x2 = z, which can be encoded as follows:</p>
      <p>The idea is that if y = 0, x1 = z is the minimum; whereas if y = 1, x2 = z is
the minimum. This adds a new variable y, so in the case of n-ary conjunctions
there would be n 1 new variables. Treating the conjunction as an n-ary operator,
a more e cient representation is possible. An n-ary conjunction introduces a
restriction of the form x1 G x2 xn = z. To represent that the minimum
of n variables xi is equal to z, we can use n binary variables yi such that if yi
takes the value 0 then xi (representing the minimum) is equal to z, and such that
the sum of the yi is 1, so z takes the value of some xi. Note that the minimum
may not be unique. Such a representation is as follows:
z</p>
      <p>xi; for i 2 f1; : : : ; ng;
xi</p>
      <p>z + yi; for i 2 f1; : : : ; ng;
n
X yi = 1;
i=1
yi 2 f0; 1g; for i 2 f1; : : : ; ng:</p>
      <p>Now, we will show that it is possible to give a more e cient representation,
Essentially, we need to encode n possible states. However, n possible states can
be encoded using m = dlog2 ne new binary variables only. For instance, for n = 5,
only dlog2 5e = 3 binary variables are necessary, where we use the encoding of
the n = 5 states in Table 1 (b).</p>
      <p>The main point is now to correctly encode the condition xi z + yi of the old
encoding. We proceed as follows. Let bi be a string of length m, representing the
value i 1 in base 2 (1 i n). For instance, for i = 4, b = 011, as illustrated
in the table above. Let us de ne the expression eij (1 i n, 1 j m) as:
eij =
yj
1</p>
      <p>if the jth bit of bi is 0
yj otherwise.</p>
      <p>For i = 4, we have b = 011 and, thus, e41 = 1 y1, e42 = 1 y2, and e43 = y3.
Now we are ready to provide the whole encoding:</p>
      <p>xi</p>
      <p>The case of the disjunction in Godel fuzzy DLs is dual. If an n-ary concept
of the form (C1 t C2 t t Cn) is represented using binary disjunctions, n 1
new binary variables are needed. However, if we consider it as an n-ary concept,
it is possible to use dlog2 ne new binary variables only:</p>
      <p>m
xi + X eij</p>
      <p>j=1</p>
      <p>Optimizing Fuzzy Membership Functions
Let us start with the case of trapezoidal functions, which introduce a restriction
of the form trapezoidal(k1; k2; q1; q2; q3; q4)(xu) z. A restriction of that form
can be represented by adding 5 new binary variables yi as follows:
xu + (k1
xu + (k1
xu + (k1
xu + (k1
xu + (k2
xu + (k2
xu + (k2
xu + (k2
q1)y2
q2)y3
q3)y4
q4)y5
q1)y1
q2)y2
q3)y3
q4)y4</p>
      <p>xu
q1)y2
xu
1 y1
k1;
k1;
k1;
k1;
k2;
k2;
k2;
k2;
y5;
y3;
k2;
xu + (q1 q2)xu + (k2
xu + (q1 q2)xu + (k1
q2)y2</p>
      <p>To reduce now the number of binary variables, the idea is to have 5 binary
variables encoding the 5 possible states: xu q1 (y1 = 1), xu 2 [q1; q2] (y2 = 1),
xu 2 [q2; q3] (y3 = 1), xu 2 [q3; q4] (y4 = 1), and xu q4 (y5 = 1). However, as
shown in Table 1 (b), it is possible to represent 5 states using only 3 variables.</p>
      <p>The case of other fuzzy membership functions is similar. In triangular
functions, a nave encoding introduces 4 new variables to represent the 4 possible
states, but it is possible to consider only 2. Finally, in left and right shoulder
functions, it is necessary to consider 3 states, which can be achieved by adding 2
new binary variables, instead of the 3 ones needed in the non-optimal encoding.</p>
      <p>By considering the fact that even for moderate sized ontologies we may
easily generate thousands of such constraints, it is evident that the number of
saved binary variables n, and hence the number of saved assignments 2n, is
non-negligible.</p>
      <p>Acknowledgement This research work has been partially supported by the
CICYT project TIN2013-46238-C4-4-R and DGA-FSE.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>C.</given-names>
            <surname>Bobed</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Yus</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Bobillo</surname>
          </string-name>
          , and
          <string-name>
            <given-names>E.</given-names>
            <surname>Mena</surname>
          </string-name>
          .
          <article-title>Semantic reasoning on mobile devices: Do androids dream of e cient reasoners? Journal of Web Semantics</article-title>
          , In press.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>F.</given-names>
            <surname>Bobillo</surname>
          </string-name>
          and
          <string-name>
            <given-names>U.</given-names>
            <surname>Straccia</surname>
          </string-name>
          . fuzzyDL:
          <article-title>An expressive fuzzy description logic reasoner</article-title>
          .
          <source>In Proceedings of the 17th IEEE International Conference on Fuzzy Systems (FUZZIEEE</source>
          <year>2008</year>
          ), pages
          <fpage>923</fpage>
          {
          <fpage>930</fpage>
          ,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>F.</given-names>
            <surname>Bobillo</surname>
          </string-name>
          and
          <string-name>
            <given-names>U.</given-names>
            <surname>Straccia</surname>
          </string-name>
          .
          <article-title>On partitioning-based optimisations in expressive fuzzy description logics</article-title>
          .
          <source>In Proceedings of the 24th IEEE International Conference on Fuzzy Systems (FUZZ-IEEE 2015)</source>
          ,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>F.</given-names>
            <surname>Bobillo</surname>
          </string-name>
          and
          <string-name>
            <given-names>U.</given-names>
            <surname>Straccia</surname>
          </string-name>
          .
          <article-title>Optimising fuzzy description logic reasoners with general concept inclusions absorption</article-title>
          .
          <source>Fuzzy Sets and Systems</source>
          , In press.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>V.</given-names>
            <surname>Haarslev</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.-I.</given-names>
            <surname>Pai</surname>
          </string-name>
          , and
          <string-name>
            <given-names>N.</given-names>
            <surname>Shiri</surname>
          </string-name>
          .
          <article-title>Optimizing tableau reasoning in ALC extended with uncertainty</article-title>
          .
          <source>In Proceedings of the 20th International Workshop on Description Logics (DL</source>
          <year>2007</year>
          ), volume
          <volume>250</volume>
          , pages
          <fpage>307</fpage>
          {
          <fpage>314</fpage>
          . CEUR Workshop Proceedings,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>G. S. N.</given-names>
            <surname>Simou</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Mailis</surname>
          </string-name>
          and
          <string-name>
            <given-names>G.</given-names>
            <surname>Stamou</surname>
          </string-name>
          .
          <article-title>Optimization techniques for fuzzy description logics</article-title>
          .
          <source>In Proceedings of the 23rd International Workshop on Description Logics (DL</source>
          <year>2010</year>
          ), volume
          <volume>573</volume>
          .
          <source>CEUR Workshop Proceedings</source>
          ,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>H. M.</given-names>
            <surname>Salkin</surname>
          </string-name>
          and
          <string-name>
            <given-names>K.</given-names>
            <surname>Mathur</surname>
          </string-name>
          .
          <article-title>Foundations of Integer Programming</article-title>
          . North-Holland,
          <year>1989</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>U.</given-names>
            <surname>Straccia</surname>
          </string-name>
          .
          <article-title>Foundations of Fuzzy Logic and Semantic Web Languages</article-title>
          .
          <source>CRC Studies in Informatics Series. Chapman &amp; Hall</source>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>