<!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>Comparing Algorithms for Computing Lower Covers of Implication-closed Sets</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Alexandre Bazin</string-name>
          <email>contact@alexandrebazin.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>LIMOS, CNRS, Blaise Pascal University</institution>
          ,
          <addr-line>Clermont-Ferrand</addr-line>
          ,
          <country country="FR">France</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>In this paper, we consider two methods for computing lower cover of elements in closure systems for which we know an implicational basis: intersecting meet-irreducible elements or computing minimal transversals of sets of minimal generators. We provide experimental results on the runtimes for single computations of lower covers and depth- rst searches.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        What we are interested in is the problem of performing depth- rst searches
starting from the maximal element in closure systems for which we know an
implicational basis. This amounts to computing lower covers of closed sets using
the implications, a problem shown to be NP-hard [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. In this work, we compare
two algorithms - one based on meet-irreducibles, the other on minimal generators
- that solve this problem. Section 2 reviews basic de nitions and properties of
lower covers that the algorithms use. Sections 3 and 4 respectively describe the
methods using meet-irreducible elements and minimal generators. In Section 5,
we present experimental results on the runtimes for both algorithms.
      </p>
    </sec>
    <sec id="sec-2">
      <title>Preliminaries</title>
      <p>Basic De nitions
Let us use E to denote a set of elements.</p>
      <p>De nition 1 A closure operator c : 2E 7! 2E is an extensive (X c(X)),
increasing (X Y ) c(X) c(Y )) and idempotent (c(c(X)) = c(X)) function.</p>
      <p>A set S 2 2E such that S = c(S) is said to be closed. The intersection of
two closed sets is closed. The set of all sets closed for a given closure operator c
ordered by inclusion forms a lattice that will here be denoted by c.
De nition 2 An implication on E is a pair (A; B) 2 2E
written A ! B.
2E , most commonly
De nition 3 Let I be a set of implications. We denote by I( ) the closure
operator, sometimes called logical closure, that maps a set X to its smallest
superset Y such that
8A ! B 2 I; A</p>
      <p>Y ) B</p>
      <p>Y</p>
      <p>The logical closure is a closure operator. As such, for an implication set I, we
will use I to denote the lattice of implication-closed sets ordered by inclusion.
De nition 4 A minimal generator G of X 2 2E for a closure operator c is an
inclusion-minimal set such that c(G) = X.</p>
      <p>In the remainder of this paper, we will use the term minimal generator,
without any more details, to talk about the minimal generators for the logical
closure. The set of minimal generators of a set S for an implication set I will be
denoted GenI (S).</p>
      <p>De nition 5 Let L = (E; ) be a lattice. A meet-irreducible element is an
element e E that has a single upper cover, i.e. fx 2 E j x &gt; eg has a single
inclusion-minimal element. We use M(L) to denote the set of meet-irreducible
elements of the lattice L.</p>
      <p>Any element of the lattice L is the in mum of a set of meet-irreducible
elements.</p>
      <p>E .</p>
      <p>De nition 6 Let H = (E ; V ) be a hypergraph. A minimal transversal of E is a
set S V such that 8X 2 E , X \ S 6= ;.</p>
      <p>We use T r(E ) to denote the set of minimal transversals of a set of hyperedges
2.2
If we want to perform a depth- rst search from the top in a lattice I for which
we know I, we have to be able to compute the lower covers of a set S 2 I . We
present here two methods that can be used to compute them.</p>
      <p>Proposition 1 For any S 2 I , the lower covers of S are the inclusion-maximal
elements of fS \ M j M 2 M( I ) and S 6 M g.</p>
      <p>Proof Every element of I is the in mum of a subset of M( I ). Additionally,</p>
      <p>I being a closure system, the in mum of two sets is their intersection. As such,
for any M 2 M( I ), S \M S is an I-closed set. S \M being strictly contained
in S, if it is inclusion-maximal then it is a lower cover of S.</p>
      <p>Using Proposition 1 to compute lower covers requires that we rst know the
meet-irreducible elements of the lattice. In most case, they must be explicitly
computed beforehand. Algorithm 1, presented in Section 3.1, does this.
Proposition 2 For any S 2
T 2 T r(GenI (S)).</p>
      <p>I , the lower covers of S are the sets S n T with
Proof Let T be a minimal transversal of GenI (S). For any e 2 S n T , (S n T ) [
feg = S n (T n feg) contains a minimal generator of S because of the minimality
of T . Therefore, there is no closed set between S and S n T and S n T is a lower
cover of S.</p>
      <p>Using Proposition 2 to compute the lower covers of S would require that we
compute the minimal generators S rst, then their minimal transversals. The
algorithms we use for these problems are described in Section 4.</p>
    </sec>
    <sec id="sec-3">
      <title>Computing with Meet-irreducible Elements 3</title>
      <p>3.1</p>
      <p>
        Computing Meet-irreducible Elements from an Implication
Base
We use Wild's algorithm [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] to compute the set of meet-irreducible elements of
the lattice I for which we know an implication base I. It is based on the fact
that a set S 2 I is meet-irreducible if and only if it is maximal among closed
sets that do not contain some element e. Let us call max(e; I) the set of maximal
elements of I that do not contain e and max0(e; I n fIg) and max00(e; I n fIg)
the subsets of max(e; I n fIg) for which I = A ! B respectively holds and does
not hold. We then have
max(e; I)
max0(e; I n fIg) [
      </p>
      <p>a2A
where X</p>
      <p>Y = fx \ y j x 2 X; y 2 Y g.</p>
      <p>max00(e; I n fIg)
max(a; I n fIg)</p>
      <p>Algorithm 1 uses this property to compute the meet-irreducible elements of
I from I = fA1 ! B1; :::; An ! Bng by computing the meet irreducibles of
every lattice Ii such that Ii = fA1 ! B1; :::; Ai ! Big with 0 i n.</p>
      <sec id="sec-3-1">
        <title>Algorithm 1: Meet-irreducibles</title>
        <p>Algorithm 1 has a runtime exponential in the size of its output, which can
itself be exponential in the size of the implication base.
Once the meet-irreducible elements of the lattice are known, we can compute
the lower covers of a set S by intersecting it with the meet-irreducible sets that
are not supersets of S and keeping the inclusion-maximal elements. Algorithm
2 runs in time polynomial in the size of M( I ).</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Computing with Transversals of Minimal Generators</title>
      <p>
        Computing Minimal Generators
We compute the minimal generators of an implication-closed set with Algorithms
3 and 4 proposed in [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ].
      </p>
      <p>Algorithm 2: Intersection of meet-irreducible elements</p>
      <sec id="sec-4-1">
        <title>Input : A set S and meet-irreducibles M( I )</title>
        <p>Output: The lower covers of S
1 C = ;
2 foreach M 2 M( I ) do
3 C = C [ (S \ M )
4 end
5 Return max(C)
Algorithm 3: First minimal generator</p>
        <p>
          Algorithm 3, given a set P and an implication set L, computes a rst minimal
generator of P . Algorithm 4 computes all the minimal generators of a set P for
an implication set L. It has time complexity O(jLj jGj jPj (jGj + jPj)).
The problem of computing minimal transversals is a classic that, while
extensively studied, still holds many interesting question [
          <xref ref-type="bibr" rid="ref3 ref4 ref5">4, 5, 3</xref>
          ]. It has been shown to
be solvable in quasi-polynomial total time. Here, we chose to compute minimal
transversals using the, arguably, most simple algorithm, Berge Multiplication [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ].
Given two hypergraphs H1 and H2, their edgewise union is de ned as :
        </p>
        <p>H1 _ H2 = fh1 [ h2 j h1 2 H1 and h2 2 H2g
We then have
Which gives rise to Algorithm 5.</p>
        <p>T r(H1 [ H2 = min(T r(H1) _ T r(H2))
5</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>Experimental Results</title>
      <p>We implemented both methods, used them on randomly generated
implicational bases and compared their runtimes. Implications were generated by using</p>
      <sec id="sec-5-1">
        <title>Algorithm 5: All minimal transversals</title>
        <sec id="sec-5-1-1">
          <title>Input : Hypergraph H</title>
          <p>Output: T r(H)
1 T = ;
2 foreach E 2 H do
3 T = min(T _ ffvg j v 2 Eg)
4 end
5 Return T
NextClosure on formal contexts (O; A; R) randomly generated with 50 objects,
12 attributes and a probability d (called density ) to have (o; a) 2 R.</p>
          <p>Two cases were considered:
{ Single computations of lower covers
{ Depth- rst searches in lattices involving multiple computations of lower
covers</p>
          <p>For the rst case, we simply computed the lower covers of A. For the second
case, we removed some implications as to introduce, in the lattice, sets that are
not intents of the formal contexts and we performed the depth- rst searches
starting from A and going deeper everytime we encountered a non-intent.
5.1</p>
          <p>Single Computations
We generated 1000 contexts with varying numbers of implications and computed
the lower covers of A using the two methods we presented. Figure 1 presents the
quadratic interpolation of the runtimes for each method relative to the number
of implications in the basis.</p>
          <p>In our experiments, the algorithm using meet-irreducible elements
outperformed the one based on minimal generators 79% of the time. Computing the
meet-irreducible elements represents 98% of its runtime. The second method
devotes 75% of its time to computing minimal generators and 25% on minimal
transversals.
As with single computations, we randomly generated 1000 contexts with varying
numbers of implications and performed depth- rst searches starting from A.
Runtimes Relative to the Size of the Basis Figure 2 presents the
interpolation of the runtimes for each methods relative to the number of implications
in the basis.</p>
          <p>Once again, using meet-irreducibles is the most e cient method (it
outperformed the minimal generators 72% of the time) and this trend accentuates with
the size of the implicational basis. Computing the meet-irreducible elements
represents 86% of the total runtime. The second methods devotes 69% of its runtime
to the computation of minimal generators and 31% on minimal transversals.
Runtimes Relative to the Depth Figure 3 presents the interpolation of the
runtimes for each methods relative to the depth of the search.</p>
          <p>We can notice that the algorithm using meet-irreducible elements is much
less a ected by the depth of the search, most likely due to the fact that most of
the computation is done prior to the actual search. Interestingly, the algorithm
using minimal generators is least e cient for relatively shallow searches. We
believe this is due to the fact that deep searches imply that the lattice is mostly
composed of sets that have the property we are looking for. As we used closedness
relative to a formal context, this means that those lattices correspond to nearly
empty implicational bases.</p>
          <p>Runtimes with Increasing Bases We used both methods to perform
depthrst searches in a sequence of lattices corresponding to implicational bases ;
I1 ::: In. Results are presented in Figure 4.</p>
          <p>Once again, the runtime of the algorithm using minimal generators skyrockets
when the basis grows. The meet-irreducibles method presents much less variance.
It should be noted that the meet-irreducible elements are computed from scratch
for each basis when Algorithm 1 could be used to speed up the process by using
the meet-irreducible elements of the previous lattice to compute the new ones.
6</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-6">
      <title>Discussion</title>
      <p>Experimental results indicate that the most e cient way to compute lower covers
of implication-closed sets is to rst compute the meet-irreducible elements of the
lattice and then intersect them. It outperforms the method based on computing
minimal transversals of minimal generators even when minimal generators have
to be computed only once. During deeper searches, minimal generators have to
be computed at each step and the di erence is thus more pronounced.</p>
      <p>While the algorithm we used for computing minimal transversals is not the
most e cient, the fact that this computation represents only a small portion
of the second method indicates that, even with the best algorithm, using
meetirreducible elements would be best. Computing these meet-irreducible elements is
time-consuming but, once we have them, they are easy to intersect. We believe
there is still more room for improvement on the problem of computing
meetirreducible elements from implicational bases.</p>
      <p>Acknowledgments The author was supported by the European Union and the
French Region Auvergne - Rh^one-Alpes.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Mikhail</surname>
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>Babin</surname>
            and
            <given-names>Sergei O. Kuznetsov.</given-names>
          </string-name>
          <article-title>Dualization in lattices given by ordered sets of irreducibles</article-title>
          .
          <source>Theoretical Computer Science</source>
          ,
          <year>2016</year>
          . CoRR, abs/1504.01145,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>Claude</given-names>
            <surname>Berge</surname>
          </string-name>
          .
          <source>Hypergraphs: Combinatorics of Finite Sets</source>
          , volume
          <volume>45</volume>
          .
          <string-name>
            <surname>Elsevier</surname>
          </string-name>
          ,
          <year>1984</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>Thomas</given-names>
            <surname>Eiter</surname>
          </string-name>
          , Georg Gottlob, and
          <string-name>
            <given-names>Kazuhisa</given-names>
            <surname>Makino</surname>
          </string-name>
          .
          <article-title>New Results on Monotone Dualization and Generating Hypergraph Transversals</article-title>
          .
          <source>SIAM J. Comput.</source>
          ,
          <volume>32</volume>
          (
          <issue>2</issue>
          ):
          <volume>514</volume>
          {
          <fpage>537</fpage>
          ,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>Thomas</given-names>
            <surname>Eiter</surname>
          </string-name>
          , Kazuhisa Makino, and
          <string-name>
            <given-names>Georg</given-names>
            <surname>Gottlob</surname>
          </string-name>
          .
          <article-title>Computational Aspects of Monotone Dualization: A Brief Survey</article-title>
          .
          <source>Discrete Applied Mathematics</source>
          ,
          <volume>156</volume>
          (
          <issue>11</issue>
          ):
          <year>2035</year>
          {
          <year>2049</year>
          ,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Michael</surname>
            <given-names>L.</given-names>
          </string-name>
          <string-name>
            <surname>Fredman</surname>
            and
            <given-names>Leonid</given-names>
          </string-name>
          <string-name>
            <surname>Khachiyan</surname>
          </string-name>
          .
          <article-title>On the Complexity of Dualization of Monotone Disjunctive Normal Forms</article-title>
          .
          <source>J. Algorithms</source>
          ,
          <volume>21</volume>
          (
          <issue>3</issue>
          ):
          <volume>618</volume>
          {
          <fpage>628</fpage>
          ,
          <year>1996</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>Bernhard</given-names>
            <surname>Ganter</surname>
          </string-name>
          and
          <string-name>
            <given-names>Klaus</given-names>
            <surname>Reuter</surname>
          </string-name>
          .
          <article-title>Finding all Closed Cets: A General Approach</article-title>
          . Order,
          <volume>8</volume>
          (
          <issue>3</issue>
          ):
          <volume>283</volume>
          {
          <fpage>290</fpage>
          ,
          <year>1991</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>Miki</given-names>
            <surname>Hermann and Baris Sertkaya</surname>
          </string-name>
          .
          <article-title>On the Complexity of Computing Generators of Closed Sets</article-title>
          . In Raoul Medina and
          <article-title>Sergei A</article-title>
          . Obiedkov, editors,
          <source>ICFCA</source>
          , volume
          <volume>4933</volume>
          of Lecture Notes in Computer Science, pages
          <volume>158</volume>
          {
          <fpage>168</fpage>
          . Springer,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>Petr</given-names>
            <surname>Krajca</surname>
          </string-name>
          , Jan Outrata, and
          <string-name>
            <given-names>Vilem</given-names>
            <surname>Vychodil</surname>
          </string-name>
          .
          <article-title>Advances in Algorithms Based on CbO</article-title>
          .
          <source>In Marzena Kryszkiewicz and Sergei A</source>
          . Obiedkov, editors,
          <source>CLA</source>
          , volume
          <volume>672</volume>
          <source>of CEUR Workshop Proceedings</source>
          , pages
          <volume>325</volume>
          {
          <fpage>337</fpage>
          . CEUR-WS.org,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <given-names>Marcel</given-names>
            <surname>Wild</surname>
          </string-name>
          .
          <article-title>Computations with Finite Closure Systems and Implications</article-title>
          .
          <source>In Ding-Zhu Du and Ming Li</source>
          <volume>0001</volume>
          , editors,
          <source>COCOON</source>
          , volume
          <volume>959</volume>
          of Lecture Notes in Computer Science, pages
          <volume>111</volume>
          {
          <fpage>120</fpage>
          . Springer,
          <year>1995</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>