Knowledge-Based Systems 21 (2008) 429–433
Contents lists available at ScienceDirect
Knowledge-Based Systems journal homepage: www.elsevier.com/locate/knosys
Generating complete set of implications for formal contexts q Qu Kai-She *, Zhai Yan-Hui School of Computer and Information Technology, Shanxi University, Taiyuan 030006, China
a r t i c l e
i n f o
Article history: Received 26 January 2007 Accepted 4 March 2008 Available online 10 March 2008 Keywords: Formal context Formal concept analysis Implication Non-redundant set Minimal generator
a b s t r a c t In this paper, a necessary and sufficient condition on which a set of implications is complete is proposed with the help of the notion of model from logic. Besides, using the closure of an attribute subset to a set of implications, we present a formal method to remove the redundant implications from a complete set. Subsequently, we provide an algorithm to generate a complete set of implications and an illustrative example guarantees the availability of the algorithm. Crown Copyright Ó 2008 Published by Elsevier B.V. All rights reserved.
1. Introduction Formal concept analysis (FCA) is an order-theoretic method for the mathematical analysis of scientific data, pioneered by R.Wille [1] in mid 1980s. Over the past 20 years, FCA has been widely studied [2–5] and become a powerful tool for machine learning [6,7], software engineering [8–10] and information retrieval [11]. In essence, FCA is based on a formalization of the philosophical understanding of a concept as a unit of thought constituted by its extent and intent. The extent of a concept is understood as the collection of all objects belonging to the concept and the intent as the multitude of all attributes common to all those objects. The transformation from two-dimensional incidence tables to concept lattices structure is a crucial paradigm shift from which FCA derives much of its power and versatility as a modelling tool. The concept lattices obtained the way turn out to be exactly the complete lattices, and the particular way in which they structure and represent knowledge is very appealing and natural from the perspective of many scientific disciplines. In addition to being a technique for classifying and defining concepts from data, FCA may be exploited to discover implications among the objects and the properties. On extracting implications from formal contexts, some fruitful results have
q
This research is supported by National Natural Science Foundation of China (Nos. 60773133 and 207018) and Shanxi Provincial Natural Science Foundation of China (No. 2007011040). * Corresponding author. Tel.: +86 3517011566; fax: +86 3517018176. E-mail address:
[email protected] (K.-S. Qu).
been presented [12–15]. However, there has been only little work relating whether a set of implications is complete and redundant. This paper serves to solve the problem of completeness and redundancy of implications. In the sequel, a necessary and sufficient condition on which a set of implications is complete is proposed with the help of the notion of model. In general, a set of implications is redundant, so we present a formal method to remove the redundant implications from a complete set using the closure of an attribute subset to a set of implications. By means of lectical order defined on attribute sets, we refine Titanic algorithm [16] and further propose a new algorithm TComGen to generate the complete set of implications. An illustrative example guarantees the availability of the algorithm. 2. Basic notions This section provides a brief overview over FCA, in order to allow for a better understanding for the overall picture. We introduce the most basic notions of FCA, namely formal contexts, formal concepts, concept lattices and implications. For more extensive introduction refer to Ganter and Wille [2]. In FCA, an elementary form of the representation of data is defined mathematically as formal context. Definition 1. A formal context is a triple: K ¼ ðG; M; IÞ, where G and M are sets, and I G M is a binary relation. In the case, the members of G are called objects, the members of M are called attributes, and I is viewed as an incidence relation between two. Accordingly, we write gIm or ðg; mÞ 2 I expressing ‘the object g has the attribute m0 .
0950-7051/$ - see front matter Crown Copyright Ó 2008 Published by Elsevier B.V. All rights reserved. doi:10.1016/j.knosys.2008.03.001
430
K.-S. Qu, Y.-H. Zhai / Knowledge-Based Systems 21 (2008) 429–433
Formal contexts are mostly represented by rectangular tables and an example concerning living things is illustrated by Table 1, the rows of which are headed by the object names and the columns headed by the attribute names. In the table, a cross means that the row object has the column attribute. Definition 2. For a set X G of objects we define: X 0 ¼ fm 2 M j gIm; 8g 2 Xg (the set of attributes common to the objects in X). Correspondingly, for a set Y M we define: Y 0 ¼ fg 2 G j gIm; 8m 2 Yg (the set of objects which have all attributes in Y). And we call ðX 0 Þ0 ¼ X 00 the closure of X to formal context K, and ðY 0 Þ0 ¼ Y 00 the closure of Y to formal context K. Definition 3. Let K ¼ ðG; M; IÞ be a formal context, X G; Y M: A pair C ¼ ðX; YÞ is called a formal concept of K, if X 0 ¼ Y; Y 0 ¼ X: In the case, X ¼ inðCÞ is the intent of C and Y ¼ exðCÞ is the extent of C. BðKÞ denotes the set of all concepts of the context K. The description of a concept by extent and intent is redundant, because each of the two parts determines the other. But for many reasons this redundant description is very convenient. Formal concepts can be (partially) ordered in a natural way. Again, the definition is inspired by the way we usually order concepts in a subconcept*-superconcept hierarchy: ‘Pig’ is a subconcept of ‘mammal’, because every pig is a mammal. Transferring this to formal concepts, the natural definition is as follows: Definition 4. Let K ¼ ðG; M; IÞ be a C1 ¼ ðX 1 ; Y 1 Þ; C2 ¼ ðX 2 ; Y 2 Þ 2 YðKÞ. We define:
formal
context,
C1 C2 () X 1 X 2 ð () Y 1 Y 2 Þ: In the case, C2 is a superconcept of C1 and C1 is a subconcept of C2 . The relation ‘’ is called the hierarchical order of the concepts. The set of all concepts ordered in the way is called the concept lattice of the context K.
Theorem 1. If K ¼ ðG; M; IÞ is a formal context, A; A1 ; A2 are sets of objects and B; B1 ; B2 are set of attributes, then: ð2Þ
A1 A2 ) A02 A01 00
AA 0
ð10 Þ
B B00
0
B0 ¼ B000
ð2 Þ
000
ð3Þ
A ¼A
ð4Þ
A B0 () B A0
B1 B2 ) B02 B01
0
ð3 Þ
Definition 5. Let K ¼ ðG; M; IÞ be a formal context, A; B M. A ! B is true if each object which has all attributes from A has also all attributes from B. In the case, A ! B also is called an implication in the context K. From the logistic angle, A ! B is to represent the statement ‘‘A implies B” or ‘‘if A then B” and in FCA means that, if a object has the attributes A (i.e., g 2 A0 ) then it has the attributes B (i.e., gIm holds for all m 2 B). Definition 6. Let K ¼ ðG; M; IÞ be a formal context, T M and A ! B is an implication of the context K. T is called a model of the implication A ! B, denoted by T ðA ! BÞ, if the attribute subset T satisfies: T+A or T B. Let H be a set of implications. We call T a model of H, denoted by T H iff T ðA ! BÞ holds for each ðA ! BÞ 2 H. Definition 7. Let K ¼ ðG; M; IÞ be a formal context and H be a set of implications of K. An implication A ! B of K follows from the set H of implications, denoted by H ‘ ðA ! BÞ, if for each subset T M respecting T H; T ðA ! BÞ holds. If ðA ! BÞ 2 H and ðHn ðA ! BÞÞ ‘ ðA ! BÞ, we say that A ! B is redundant with respect to H. Definition 8. Let K ¼ ðG; M; IÞ be a formal context and H be a set of implications. H is called a complete set of implications of K, if H ‘ ðA ! BÞ holds for each implication A ! B of K. Definition 9. Let K ¼ ðG; M; IÞ be a formal context, C ¼ ðX; YÞ 2 BðKÞ, and A Y. A is called a minimal generator of the concept C, if A00 ¼ Y and B00 A00 , for all B A. RðKÞ denotes the set of all minimal generators of the context K.
4. Complete set of implications and implication deduction
We have the following simple facts:
ð1Þ
elementary. Dependencies between the attributes can be described by implications. An implication between attributes in M is a pair of subsets of M, denoted by A ! B. The set A is the premise of the implication A ! B, and B is its conclusion. Formally,
In this section, with the help of the notion of model, we will discuss the necessary and sufficient condition on which a set of implications is complete. Theorem 2. Let K ¼ ðG; M; IÞ be a formal context, A; B 2 M. The following conditions are equivalent: (i) A ! B is an implication of K; (ii) B A00 ; (iii) 8H 2 BðKÞ, inðHÞ ðA ! BÞ.
3. Implications One of the aspects of FCA thus is attribute logic, the study of possible attribute combinations. Most of the time, this will be very
Proof 1. (i) () (ii) We have, A ! B is an implication of K iff A0 B0 iff A00 B00 iff A00 B.
Table 1 A formal context concerning living things Incidence
Le Br Fr Dg SW Rd Bn Mz
Attributes
nw
lw
ll
nc
2lg
1lg
mo
lb
Objects
sk
Le Br Fr Dg SW Rd Bn Mz
Leech Bream Frog Dog Spike-Weed Reed Bean Maize
nw lw ll nc 2lg 1lg mo lb sk
Needs water Lives in water Lives on land Needs chlorophyll 2 Leaf germination 1 Leaf germination Is motile Has limbs Suckles young
431
K.-S. Qu, Y.-H. Zhai / Knowledge-Based Systems 21 (2008) 429–433
(ii) ) (iii) Let H 2 BðKÞ. If inðHÞ+A, then inðHÞ ðA ! BÞ holds by the Definition 5. If inðHÞ A, then inðHÞ A00 . From the condition B A00 , we have inðHÞ B, so inðHÞ ðA ! BÞ also holds by Definition 5. (iii) ) (ii) Let ðA0 ; A00 Þ 2 BðKÞ. The condition A00 ðA ! BÞ means A00 +A or A00 B. Obviously, A00 A, so A00 B has to hold. h Theorem 3. Let K ¼ ðG; M; IÞ be a formal context and H be a set of implications of K. Then, H is a complete set of implications iff for every T M respecting T H, T ¼ T 00 holds. Proof 2. If H is a complete set of implications, we need to prove that each T M, which respects T H should be an intent of K, i.e., T ¼ T 00 . We assume T M and T H. Then there is a minimal generator A T of T 00 , satisfying A00 ¼ T 00 A00 . By Proposition 1, A ! T 00 is an implication of K. Because H is complete, then H ‘ ðA ! T 00 Þ. Therefore by the assumption T H, we have T ðA ! T 00 Þ, that is to say, T+A or T T 00 . Because of T A, hence T T 00 holds, i.e., T ¼ T 00 , since T T 00 always holds in the context K. Conversely, if T is an intent of K for every T M respecting T H, we will show that H is a complete set of implications. First, let us assume that H is not complete. Then there exists an implication A ! B, which does not follow from H, i.e., H0ðA ! BÞ. So, by Definition 6, there must be an intent, satisfying T H and T2ðA ! BÞ. It means both T A and T+B must hold in the context. If T A, then T ¼ T 00 A00 . Since A ! B is an implication of K, by Proposition 1, we have T A00 B, a contradiction with T+B. Hence H is a complete set of implications. h Theorem 4. Let K ¼ ðG; M; IÞ be a formal context. For every X; Y; Z; T M, the following results are true: L1 : If Y X;
then
L2 : If T ðX ! YÞ; L3 : If T ðX ! YÞ
T ðX ! YÞ: then and
T ððX [ ZÞ ! ðY [ ZÞÞ: T ðY ! ZÞ;
then
T ðX ! ZÞ:
Proof 3. L1 : It suffices to show T+X or T Y. If T+X, then T ðX ! YÞ. If T X, according to X Y, then T Y, i.e., T ðX ! YÞ. L2 : If T+X, then T+X [ Z, and hence T ððX [ ZÞ ! ðY [ ZÞÞ. If T X and T+Z, then T+X [ Z, and hence T ððX [ ZÞ ! ðY [ ZÞÞ. If T X and T Z, by T ðX ! YÞ and T X, then T Y holds, and hence T Y [ Z, i.e., T ððX [ ZÞ ! ðY [ ZÞÞ. L3 : If T+X, then T ðX ! ZÞ. If T X, then T Y hold since T ðX ! YÞ. By T ðY ! ZÞ and T Y; T Z holds, i.e., T ðX ! ZÞ. h By Definition 6, we have the following corollary: Corollary 1. Let K ¼ ðG; M; IÞ be a formal context. The following inference rules hold in the context K for all X; Y; Z M: L01 ðReflexivityÞ : If Y X;
then
‘ ðX ! YÞ:
L02 ðAugmentationÞ : ðX ! YÞ ‘ ððX [ ZÞ ! ðY [ ZÞÞ L03 ðTransitivityÞ : fX ! Y; Y ! Zg ‘ ðX ! ZÞ: Proposition 2 provides a fitness semantic explanation for the three inference rules of Corollary 1. By means of Corollary 1, it is easy to see that the inference rules of formal concept analysis have the same form with those of database theory, namely, Armstrong rules [17] of FD (functional dependency). In fact, we can easily prove that the other inference rules of FD also hold in a formal context.
5. Redundant implications In general, a set of implications is redundant, so we need a method to remove the redundant implications from the set of implications. In this paper, by means of the notion of model and the attribute closure to a set of implication, we present a formal method to eliminate the redundant implications. Definition 10. Let K ¼ ðG; M; IÞ be a formal context and H be a set of implications of K. We define:(i) an extension operator of attribute subset X to H: [ XH ¼ X [ j ðA ! BÞ 2 H; A Xg: 2
(ii) formally, ðX H ÞH ¼ X H ; and due to the finiteness of M, there is a n nþ1 minimal positive integer n, satisfying X H ¼ X H . In the case, we Hn call X a closure of attribute subset X to H and denote HðXÞ. Theorem 5. Let K ¼ ðG; M; IÞ be a formal context and X M. The following conditions are true: ðiÞHðXÞ X 00 ; ðiiÞHðXÞ H: Proof 4. (i) It follows immediately from Proposition 1 and Definition 9. (ii) Set ðA ! BÞ 2 H. If HðXÞ+A, then HðXÞ ðA ! BÞ. If HðXÞ A, by Definition 9, then B HðXÞH ¼ HðXÞ holds, since ðA ! BÞ 2 H. It follows HðXÞ ðA ! BÞ, i.e., HðXÞ H. h Theorem 6. Let K ¼ ðG; M; IÞ be a formal context and H be a set of implications. For every X; T M; if T X and T H, then T HðXÞ. Proof 5. First, we prove that if T X, then T X H . By the definition of X H : [ XH ¼ X [ j ðA ! BÞ 2 H; A Xg; it suffices to show B T. From ðA ! BÞ 2 H and T H; T ðA ! BÞ follows, i.e., T+A or T B. Since T X A holds, T B must be sat2 isfied. So T X H , and in like manner, T X H ; . . ., until by analogy we obtain T HðXÞ. h Theorem 7. Let K ¼ ðG; M; IÞ be a formal context and H be a set of implications of K. Then, an implication A ! B follows from H iff B HðAÞ. Proof 6. If A ! B follows from H, we prove B HðAÞ. By Proposition 3, we have HðAÞ H. By means of H ‘ A ! B; HðAÞ ðA ! BÞ is true, i.e., HðAÞ+A or HðAÞ B. Because of HðAÞ A we have B HðAÞ as required. Conversely, if B HðAÞ, we prove that A ! B follows from H. We only need to prove that for every T M respecting T H; T is a model of ðA ! BÞ, i.e., T ðA ! BÞ. If T+A, obviously, T ðA ! BÞ holds. If T A, by Proposition 4, we have T HðAÞ. Because of HðAÞ B and hence T B, T ðA ! BÞ, which completes the proof. h Theorem 8. Let K ¼ ðG; M; IÞ be a formal context and W be a complete set of implications of K. Then, for each ðA ! BÞ 2 W, A ! B is redundant with respect to W iff HðAÞ ¼ A00 . Here, H ¼ W n ðA ! BÞ. Proof 7. If HðAÞ ¼ A00 , we show that A ! B is redundant with respect to W. Since A ! B is an implication of K, we have A00 B. By the condition HðAÞ ¼ A00 ; HðAÞ B holds. Then, ðA ! BÞ follows from H according to Theorem 2, that is to say, A ! B is redundant with respect to W.
432
K.-S. Qu, Y.-H. Zhai / Knowledge-Based Systems 21 (2008) 429–433
Conversely, if the implication A ! B is redundant with respect to W, we will prove HðAÞ ¼ A00 . If HðAÞ 6¼ A00 , by Proposition 3. (i) We have HðAÞ A00 and hence A00 n HðAÞ 6¼ ;. Because ðA00 n HðAÞÞ A00 , A ! A00 n HðAÞ is an implication of K as a result of Proposition 1. For W is a complete set and A ! B follows from W, H is also complete. So H ‘ ðA ! A00 n HðAÞÞ. By Proposition 3. (ii) From which it follows that HðAÞ H, we have HðAÞ ðA ! A00 n HðAÞÞ, i.e., HðAÞ+A or HðAÞ ðA00 n HðAÞÞ. Because ofHðAÞ A, therefore HðAÞ ðA00 n HðAÞÞ, a contradiction. Thus, HðAÞ ¼ A00 . h Theorem 3 expresses that in practice, we can check redundancy of an implication with respect to a set of implications by examining whether the closure of the premise of the implication to the formal context is identical with that to the set of implications without the implication.
6. Generation of a complete set of implications By employing minimal generator, in the section, we propose a complete set R of implications and bring forward an algorithm to generate the complete set. 6.1. A complete set R of implications
Definition 12. Let K ¼ ðG; M; IÞ be a formal context and X M: The support count of the attribute set X in K is defined as 0 Þ suppðXÞ ¼ cardðX . cardðGÞ Theorem 10. [16] Let K ¼ ðG; M; IÞ be a formal context, and X M. Then X 00 ¼ X [ fm 2 M n X j suppðXÞ ¼ suppðX [ fmgÞg: Definition 13. Let M be an attribute set and A; B M. If there exists i 2 B n A satisfying A \ f1; 2; . . . ; i 1g ¼ B \ f1; 2; . . . ; i 1g; A is called lectically smaller than B, denoted by: A B for simplification and A i B for detail. It is easily seen that the powerset of M is a totally ordered set in the presence of lectical order. Definition 14. Let M be an attribute set and X; Y; Z M. If Z j Y and Y i X, then Z m X, where m ¼ minfi; jg. Proof 9. If i ¼ j, by Y i X, we have i 62 Y. By Z j Y, however, j ¼ i 2 Y, a contradiction with i 62 Y proved above. If i > j, we have j 2 Y and j 62 Z, since Z j Y, and hence j 2 Y \ f1; 2; . . . ; j; . . . ; i 1g. By Y i X, then we have
Definition 11. Let K ¼ ðG; M; IÞ be a formal context, H 2 BðKÞ and A be a minimal generator of inðHÞ with A 6¼ A00 . We call A ! A00 a trivial implication generated by A, and A ! A00 n A a non-trivial implication generated by A.
and therefore j 2 X. So j 2 X n Z. Because
Theorem 9. Let K ¼ ðG; M; IÞ be a formal context. We form
and j 2 X n Z; the desired result that Z j X is obtained. Similarly if i < j, we also have Z i X. Thus Z m X, where m ¼ minfi; jg. h
j 2 Y \ f1; 2; . . . ; j; . . . ; i 1g ¼ X \ f1; 2; . . . ; j; . . . ; i 1g
X \ f1; 2; . . . ; j 1g ¼ Y \ f1; 2; . . . ; j 1g ¼ Z \ f1; 2; . . . ; j 1g
R ¼ fA ! A00 j A 2 CðKÞ; A 6¼ A00 g: Then R is a complete set of implications of K. Proof 8. By Theorem 1, it suffices to prove that, if T M and T R, then T ¼ T 00 . If T 6¼ T 00 , let A T be a minimal generator of T 00 . Noticing that ðA ! A00 ¼ T 00 Þ 2 R and T R, then we have T ðA ! T 00 Þ, that is to say, T+A or T T 00 . Because of T A, we have T T 00 and hence T ¼ T 00 as required. h Since A ! A is always an implication of K, the following corollary is true. Corollary 2. Let K ¼ ðG; M; IÞ be a formal context. Set
Definition 15. Let K ¼ ðG; M; IÞ be a formal context. For all P; Q 2 vk1 , if Q P and P; Q are not superaddable, then P and Z are not superaddable for all Z 2 vk1 respecting Z Q . Proof 10. First, by Q P, there exists i 2 P n Q with P \ f1; 2; . . . ; i 1g ¼ Q \ f1; 2; . . . ; i 1g; i.e., Q i P. Let P ¼ fx1 ; x2 ; . . . ; xk2 ; xk1 g. Since P and Q are not superaddable, then, i 6 xk2 . Next, let Z Q . Then there is j 2 Q n Z and Q \ f1; 2; . . . ; j 1g ¼ Z \ f1; 2; . . . ; j 1g, i.e., Z j Q . So Z j Q ; Q i P, and by Proposition 6, we have Z m P with m ¼ minfi; jg 6 i 6 xk2 . Hence P and Z are not superaddable. h
R ¼ fA ! A00 n A j A 2 CðKÞ; A 6¼ A00 g: Then R is also a complete set of implications of K.
Definition 16. Let K ¼ ðG; M; IÞ be a formal context and X ¼ P Q , where P; Q 2 vk1 . For each Z X with cardðZÞ ¼ k 1, if Z 6¼ P and Z 6¼ Q , then Z P and Z Q .
6.2. Generating the complete set R Let K ¼ ðG; M; IÞ be a formal context. For the sake of convenience, we denote the elements of M in order with 1; 2; 3; . . . ; n. Here, n is the cardinal number of M. So for each X M, we can express X with X ¼ fx1 ; x2 ; . . . ; xk g, where xi1 < xi ; i ¼ 2; 3; . . . ; k. For P ¼ fx1 ; . . . ; xk2 ; xk1 g and Q ¼ fx1 ; . . . ; xk2 ; xk g, only if xk1 < xk ; P and Q are called superaddable, and denoted by
Proof 11. Let P ¼ fx1 ; x2 ; . . . ; xk2 ; xk1 g and Q ¼ fx1 ; x2 ; . . . ; xk2 ; xk g. Then we can set X ¼ fx1 ; x2 ; . . . ; xk2 ; xk1 ; xk g. If Z X and cardðZÞ ¼ k 1, by Z 6¼ P and Z 6¼ Q , let Z ¼ fx1 ; x2 ; . . . xi1 ; xiþ1 . . . ; xk2 ; xk1 ; xk g, where i < k 1. Then there exists xi 2 P n Z, satisfying P \ f1; 2; . . . ; ðxi 1Þg ¼ Z \ f1; 2; . . . ; ðxi 1Þg:
P Q ¼ fx1 ; . . . ; xk2 ; xk1 ; xk g: Here, we show some notions: ~ vk ¼fP Q j P; Q 2 vk1 ; P and Q are superaddableg; vk ¼fX 2 ~ vk j 8x 2 X; X n fxg 2 vk1 g; k j suppðXÞ 6¼ minx2X ðsuppðX n fxgÞÞg; vk ¼fX 2 v where vk1 is a set of minimal generators whose cardinal number is k 1 and supp is defined as following.
Table 2 The complete set R ; ! nw nc ! nw ll,nc ! nw lw,nc ! nw,1lg sk ! nw,ll,mo,lb lw,ll,nc ! nw,1lg
mo ! nw lw,mo ! nw lw,lb ! nw,mo lw,1lg, ! nw,nc 2lg ! nw,ll,nc lw,ll,1lg ! nw,nc
lw ! nw lb ! nw,mo ll,mo ! nw,lb lw,ll, ! nw lw,ll,mo ! nw,lb
ll ! nw 1lg ! nw,nc ll,lb ! nw,mo ll,1lg ! nw,nc lw,ll,lb ! nw
K.-S. Qu, Y.-H. Zhai / Knowledge-Based Systems 21 (2008) 429–433
433
Table 3 Non-redundant complete set Non-redundant implications
The closures of premises
The objects satisfying premises
Explanation of implications
; ! nw 1lg ! nw,nc lb ! nw,mo ll,mo ! nw,lb lw,nc ! nw,1lg 2lg ! nw,ll,nc sk ! nw,ll,mo,lb
nw nw,nc,1lg nw,mo,lb nw,ll,mo,lb nw,lw,nc,1lg nw,ll,nc,2lg nw,ll,mo,lb,sk
All SW,Rd,Mz Br,Fr,Dg Fr,Dg SW,Rd Bn Dg
All objects need water SW,Rd,Mz need water and chlorophyll Br,Fr,Dg need water and are motile Fr,Dg need water and have limbs SW,Rd need water and are 1 leaf germination Bn lives on land, needs water and chlorophyll Dg needs water, lives on land, has limbs and Is mobile
Therefore we have Z P. Similarly, Z Q .
h
Now, we present an algorithm, namely, TComGen to generate the complete set R: Step 1: Initialization. v0 ¼ f;g; k ¼ 1; v1 ¼ ffmg j m 2 Mg, and for all X 2 v1 , minx2X fsuppðX n fxgÞg is assigned to 1; Step 2: For each X 2 vk , by Definition 11, calculate suppðXÞ; Step 3: For each X 2 vk1 , by Proposition 5, calculate the closure X 00 of X. If X 6¼ X 00 , then generate an implication X ! X 00 n X; Step 4: Generate vk by vk (vk is obviously lectical-ordered). If vk ¼ ;, then goto Step 7, otherwise goto Step 5; Step 5: Generate vkþ1 by vk : Step 5.1: for all P 2 vk (from left to right), take Step 5.2; Step 5.2: for all Q 2 vk and P Q (Q behind P), take Step 5.3; Step 5.3: if P and Q are not superaddable, then goto Step 5.1 (by Proposition 7); If P and Q are superaddable, goto Step 5.4; Step 5.4: Set X ¼ P Q . For all X n fxg; x 2 X, if X n fxg 6¼ P and X n fxg 6¼ Q , then match X with the elements of vk behind Q (by Proposition 8). If X n fxg is not in vk , then goto Step 5.2; Otherwise, calculate suppðX n fxgÞ. If all X n fxg; x 2 X are in vk , calculate minx2X fsuppðX n fxgÞg; Step 5.5: Merge X into vkþ1 , goto Step 5.1; Step 6: k ¼ k þ 1, goto Step 2; Step 7: Return all implications generated by Step 3, end. Note: vk generated by vk1 is a set of minimal generators whose cardinal number is k. In [16], generate vk at two steps. First traverse vk1 time after time and generate ~ vk , and then, traverse ~ vk time after time and generate vk . We define lectical order on attribute sets and discuss some characters of lectical order, so we can generate vk and vk at one step, which reduces the time complexity of generating vk and R. Even the complete set R is still redundant, so by Theorem 3, we can eliminate the redundant implications of R. In the end, a complete and non-redundant set of implications is obtained. 7. An illustrative example We demonstrate the algorithm TComGen by means of an illustrative example. First of all, a formal context concerning living things is presented in Table 1. The complete set R of implications is show in Table 2, where each implication has the form: X ! X 00 n X. Here X is a minimal generator satisfying X 6¼ X 00 . After eliminating the redundant implications by means of Theorem 3, we can get a non-redundant complete set as Table 3. With the help of Corollary 1, we can infer all implications of Table 1 using the implications showed in Table 3. For example, to the implication fll; ncg ! nw of Table 2, by ; ! nw and L02 , we have fll; ncg ! fnw; ll; ncg and from L01 , it follows that fll; ncg ! nw.
For mo flw; lb; nwg00 ¼ flw; lb; nw; mog, the implication flw; lb; nwg ! mo is an implication of Table 1. Although it is not in Table 2, we can derive it from Table 3. In fact, by the implication lb ! fnw; mog and L02 , we have the implication flb; nw; lwg ! fnw; mo; lwg. Then, the implication flw; lb; nwg ! mo is straightforward by L01 . Similarly, we can infer other implications of Table 1. 8. Conclusion This paper presents a necessary and sufficient condition, on which a set of implications is complete, and a formal method is proposed to remove the redundant implications. On the other hand, it is tellable that, opposite to the present method of extracting implications from contexts, our approach dispenses with the process of building concept lattices and thus provides an alternative for implication extracting. References [1] R. Wille, Restructuring lattice theory: an approach based on hierarchies of concepts, in: I. Rival (Ed.), Ordered Sets, Reidel, Dordrecht, 1982, pp. 445–470. [2] B. Ganter, R. Wille, Formal Concept Analysis: Mathematical Foundations, Springer-Verlag, Berlin, 1999. [3] K.-S. Qu, J.-Y. Liang, J.-H. Wang, et al., The algebraic properties of concept lattice, Journal of Systems Science and Information 2 (2) (2004) 271–277. [4] K.S. Qu, Y.H. Zhai, J.Y. Liang, et al., Study of decision implications based on formal concept analysis, International Journal of General Systems 36 (2) (2007) 147–156. [5] Y.Y. Yao, Concept lattices in rough set theory, in: Proceedings of 23rd International Meeting of the North American Fuzzy Information Processing Society, 2004. [6] B. Zupa, M. Bohance, Learning by discovering concept hierarchies, Artificial Intelligence 109 (1999) 211–242. [7] C. Carpineto, G. Romano, A lattice conceptual clustering system and its application to browsing retrieval, Machine Learning 24 (1996) 95–112. [8] P. Tonella, Using a concept lattice of decomposition slices for program understanding and impact analysis, IEEE Transactions on Software Engineering 29 (6) (2003) 495–509. [9] G. Arevalo, T. Mens, Analyzing object-oriented application frameworks using concept analysis, Lecture Notes in Computer Science 2426 (2002) 53–63. [10] U. Dekel, Revealing Java Class Structure with Concept Lattices Master’s Thesis, Technion Israel Institute of Technology, 2003. [11] W. Kollewe, Evaluation of a survey with methods of formal concept analysis, in: O. Opitz (Ed.), Conceptual and Numerical Analysis of Data, Springer-Verlag, Berlin-Heidelberg, 1989, pp. 123–134. [12] P. Valtchev, R. Missaoui, R. Godin, et al., J. Expt. Theor. Artif. Intell. 14 (2002) 115–142. [13] N. Pasquier, Y. Bastide, R. Taouil, L. Lakhal, Discovering frequent closed itemsets for association rules, Lecture Notes in Computer Science 1540 (1999) 398–416. [14] M.J. Zaki, M. Ogihara, Theoretical foundations of association rules, in: Third ACM SIGMOD Workshop on Research Issues in Data Mining and Knowledge Discovery, 1998. [15] J.-Y. Liang, J.-H. Wang, An algorithm for extracting rules generating set based on concept lattice, Journal of Computer Research and Development (in Chinese) 41 (8) (2004) 1339–1344. [16] G. Stumme, R. Taouil, Y. Bastide, et al. Fast computation of concept lattices using cata mining techniques, in: Proceedings Seventh International Workshop on Knowledge Representation Meets Databases, 2000, pp. 129–139. [17] W. Armstrong W, Dependency structure of data base relationships, Proceedings of IFIP Congress (1974) 580–583.