• No se han encontrado resultados

5. Estado de la cuestión

5.3. Educación en medio de la vulnerabilidad

In the same way as in other fields, the use of formulas in a given normal form allows the design of simpler methods with a better performance than those working with arbitrary expressions (e.g. the use of Horn clauses in Logic Programming). Thus, in FCA the usual normal form to improve the meth- ods to get the direct-optimal basis is the unitary implication. Nevertheless, the advantages provided by the limited languages have a counterpart: a significant growth of the input set.

2.2. DIRECT-OPTIMAL BASES 51

After Bertet et al. [12] proposed the method that we have just described, Bertet proposed a second method which works with unitary implicational systems [9]. The main advantage in the use of general implicational sys- tems is the minor size of the input implication set while the use of unitary implicational system allows a better performance of the second method.

They provided versions of the above functions for unit implicational systems. First, the method calculates a direct unitary implicational system Σd by exhaustively applying the following inference rule:

Pseudo Transitivity [PsTran]: A → b, Cb → d

AC → d , if d 6= b and d 6∈ A

This procedure is carried out by Bertet-Unit-Direct. Function Bertet-Unit-Direct(Σ)

input : A proper unitary implicational system Σ

output: A direct unitary implicational system Σdequivalent to Σ

begin

Σd:= Σ

foreach A → b ∈ Σddo

foreach Cb → d ∈ Σddo

if b 6= d and d 6∈ A then add AC → d to Σd

return Σd

The second stage is strongly based on a slight derivation of the Arm- strong’s [Augm] Rule:

Unit Augmentation [UnAugm]: C → b

A → b, if C ( A

The above rule is indeed used to narrow the implications. It leads to the following equivalence, which is a particular case of (Co-Eq):

If C ( A then {A → b, C → b} ≡ {C → b} (Na-Eq)

Unlike the previous case, we do not have to check whether the conclusion is empty. Working with unitary implicational system, we do not remove attributes from the conclusion so, it will never be the empty set.

Function Bertet-Unit-Minimize(Σd)

input : A direct unitary implicational system Σd

output: The direct-optimal unitary basis Σdo equivalent to Σ

begin

Σdo:= Σd

foreach A → b ∈ Σdo do

foreach C → b ∈ Σdodo

if A C then remove C → b from Σdo

return Σdo

The above functions were used in [9] to build a method which trans- forms an arbitrary unitary implicational system into an equivalent unitary implicational system with the same properties that the direct-optimal basis for general implicational systems. Since any non-unitary implicational sys- tem can be trivially turned into an unitary implicational system, we may encapsulate both functions to provide another method to get the direct- optimal basis from an arbitrary implicational system. Thus, the following function, which solves the problem proposed in this section, incorporates a first step to convert any implicational system into its equivalent unitary implicational system and concludes with the converse switch.

Function Bertet-Unit-DO(Σ) input : An implicational system Σ

output: The direct-optimal basis Σdo equivalent to Σ

begin Σu:= {A → b | A → B ∈ Σ and b ∈ B r A} Σud:= Bertet-Unit-Direct(Σu) Σudo:= Bertet-Unit-Minimize(Σud) Σdo:=A → B | B = {b | A → b ∈ Σudo} and B 6= ∅ return Σdo

The following theorem ensures the correctness of the Bertet-Unit-DO function.

2.2. DIRECT-OPTIMAL BASES 53

output of Bertet-Unit-DO(Σ) is the unique direct-optimal implicational

system equivalent to Σ.

We illustrate the method in the following example:

Example 2.2.12. The unitary implicational system equivalent to the im- plicational system showed in Example 2.1.7 is:

Σu= { OPEC → Gr77,

OPEC → NA, NA → Gr77, MASC → Gr77,

Gr77 NA MASC OPEC → LLDC, Gr77 NA MASC OPEC → ACP, Gr77 NA LLDC OPEC → MASC, Gr77 NA LLDC OPEC → ACP}

First, from this set with 8 unitary implications, the following direct unitary implicational system with 26 implications is generated by Bertet-Unit-Direct:

Σud= { OPEC → Gr77, OPEC → NA,

NA → Gr77, MASC → Gr77,

OPEC Gr77 NA MASC → LLDC, OPEC Gr77 NA MASC → ACP,

OPEC Gr77 NA LLDC → MASC, OPEC Gr77 NA LLDC → ACP,

OPEC NA LLDC → ACP, OPEC NA MASC LLDC → ACP,

OPEC Gr77 LLDC → ACP, OPEC NA LLDC → MASC,

OPEC Gr77 LLDC → MASC, OPEC NA MASC → ACP,

OPEC Gr77 MASC → ACP, OPEC NA MASC → LLDC,

OPEC Gr77 MASC → LLDC, OPEC MASC LLDC → ACP,

OPEC NA LLDC → Gr77, OPEC MASC → ACP,

OPEC MASC → LLDC, OPEC LLDC → ACP,

OPEC LLDC → MASC, OPEC LLDC → Gr77,

OPEC NA MASC → Gr77, OPEC MASC → Gr77}

Notice that in this case, the intermediate direct basis is smaller than those presented in Example 2.2.10 for non-unitary implicational systems. Now, Bertet-Unit-Minimize is applied, returning the unitary direct-optimal ba- sis with 8 unitary implications.

Σudo= { OPEC → Gr77,

OPEC → NA, NA → Gr77, MASC → Gr77,

OPEC, MASC → LLDC, OPEC, MASC → ACP, OPEC, LLDC → MASC, OPEC, LLDC → ACP}

When it is turned into a non-unitary implicational system, we reach the direct-optimal basis of the Example 2.2.10.

An analysis of both methods provides a set of interesting conclusions which motivate the design of new methods proposed in this work (see Chap- ter 4). Although the use of unitary implicational systems causes a signif- icant growth of the set of implications with respect to non-unitary ones (from 5 to 8 in the cardinality and from 19 to 28 in the size, for the case of the implicational system of Example 2.1.7), the method based on unitary implicational system shows a better performance. One reason is that the intermediate direct basis built after the first step is smaller in the unitary implicational system method than in the non-unitary implicational system one (26 vs 31 in cardinality and 95 vs 144 in size respectively). This is a key point in the better performance of the unitary implicational system method because the size of the implicational set has a direct impact on it due to a decreasing number of applications of the rules and equivalences. Thus, the total number of applications is 57 in the case of the non-unitary implicational system method and 36 in the unitary one, i.e. a reduction of 63%. This significant difference is due to the fact that unitary impli- cations have a lower possibility to fit the set of conditions imposed in the equivalences, which are based on the operators of inclusion and intersec- tion. Thus, the growth induced by the use of unitary implicational systems provides a greater number of reading of the implication set, but the lower number of further set transformations balances out such initial growth.

Nevertheless, the growth in the use of unitary implicational systems deserves further attention. A right direction to improve even more the efficiency of these methods may be to reduce the cardinality/size of the intermediate direct basis, which strongly influences the cost of the second stage. Thus, our aim is to design a new method which combines the best of these two approaches: to work with implicational systems so that we limit the cardinality and size of the set of implications at any time and to define new rules which reduce the number of applications, avoiding a growth in the first stage that have to be narrowed in the second stage.

In Table 2.1 we summarize the performance of the methods presented in [12] and [9] over Example 2.1.7. This table shows the cardinality and the size of the implicational set at each stage of the methods and the number

Documento similar