# A New Rapid Incremental Algorithm for Constructing Concept Lattices

^{1}

^{2}

^{3}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. The Basis of Formal Concept Lattice

_{1}= (A

_{1}, B

_{1}) and C

_{2}= (A

_{2}, B

_{2}). If A

_{1}⊆ A

_{2}, we say that C

_{1}is a subconcept of C

_{2}and C

_{2}is a superconcept of C

_{1}. This relation can be expressed as (A

_{1}, B

_{1}) ≦ (A

_{2}, B

_{2}). If there is no C

_{3}= (A

_{3}, B

_{3}) which satisfies (A

_{1}, B

_{1}) < (A

_{3}, B

_{3}) < (A

_{2}, B

_{2}), we denote C

_{1}= (A

_{1}, B

_{1}) as the child of C

_{2}= (A

_{2}, B

_{2}) and C

_{2}as the parent of C

_{1}. Using this partial order relation, CS(K) can induce a concept lattice L(K), which is known as the concept lattice of K = (G, M, I).

_{i}= {m

_{1}, …, m

_{i}} ⊂ M, I

_{i}= I∩(G

_{i}× M), M

_{i+1}= M

_{i}∪{m*}, I

_{i+1}= I∩(G × M

_{i+1}), where m* is a newly added attribute. Given a formal context, K

_{i}= (G, M

_{i}, I

_{i}) and the corresponding concept lattice is L(K

_{i}). After adding m*, the new concept lattice is L(K

_{i+1}) and the corresponding formal context is K

_{i+1}= (G, M

_{i+1}, I

_{i+1}).

**Definition**

**1.**

_{i+1}).

**Definition**

**2.**

_{1}and L

_{2}be the concept lattice before and after inserting the new attribute m, respectively. The object set of m is denoted as m’ and (A, B) is a formal concept in L

_{2}. Then,

- (1)
- (A, B) is a new concept if A is not an extent of any concept in L
_{1}, - (2)
- (A, B) is a modified concept if A ⊆ m’ and A is an extent of one concept in L
_{1}, - (3)
- If (A, B) is unchanged from L
_{1}to L_{2}, it is an old concept, - (4)
- Assuming that (X, Y) is a new concept and (A, B) is an old concept, if they satisfy A∩m’ = X ≠ A, the concept (A, B) is the generator of the concept (X, Y). Otherwise, it is a general old concept.

**Proposition**

**1.**

_{1}, B

_{1}) is the canonical generator of a new concept (A

_{2}, B

_{2}), and (A

_{3}, B

_{3}) is a non-canonical generator of (A

_{2}, B

_{2}), in the case that A

_{1}⊂ A

_{3}, A ⊂ A

_{3}but A ⊄ A

_{1}, the concept (A, B) is neither a modified concept nor a canonical generator of any concept.

**Proposition**

**2.**

_{3}, B

_{3}) is an old concept and A

_{3}∩g(m*) = A

_{1}, and also in the condition of (A

_{1}, B

_{1}) ∈ L(K

_{i+1}), which is a modified concept, and A ⊂ A

_{3}, A ⊄ A

_{1}, the concept (A, B) is neither a modified concept nor a canonical generator of any concept.

## 3. Related Work

_{1}. On the basis of the set of attributes which g has (or the set of objects which m has) L

_{2}is built and the number of concepts of L

_{2}is larger than that of L

_{1}. According to existing researches, the concepts are divided into three categories after inserting a new object (or a new attribute): old concepts, new concepts and modified concepts, where old concepts consist of general old concepts and generator concepts. Complete definitions are listed in [27].

## 4. A New Rapid AddExtent Algorithm

#### 4.1. The Overall Procedure

Algorithm 1: Procedure FastAddExtent(extent, generatorConcept, L, n) {#} |

1: tempConcept = generatorConcept {*} |

2: generatorConcept = GetClosureConcept(extent, generatorConcept, L, n) |

3: tempConcept.doExtent = extent {*} |

4: tempConcept.MaximalConcept = generatorConcept {*} |

5: if generatorConcept.Extent == extent then |

6: return generatorConcept |

7: end if |

8: GeneratorChildren = generatorConcept.Children |

9: newChildren = ∅ |

10: for each candidate in GeneratorChildren |

11: meet = candidate.Extent ∩ extent |

12: if meet != candidate.Extent then |

13: if candidate.visited == n then {*} |

14: candidate = candidate.NewConcept {*} |

15: else |

16: if meet ∩ candidate.doExtent == meet then {*} |

17: candidate = candidate.MaximalConcept {*} |

18: end if |

19: NC = FastAddExtent(meet, candidate, L, n) {#} |

20: candidate.NewConcept = NC {*} |

21: candidate.visited = n {*} |

22: candidate = NC {*} |

23: end if |

24: end if |

25: addChild = true |

26: for each Child in NewChildren |

27: if Candidate.Extent ⊆ Child.Extent then |

28: addChild = false |

29: exit for |

30: else if Child.Extent ⊆ Candidate.Extent then |

31: remove Child from NewChildren |

32: end if |

33: end for |

34: if addChild then |

35: add Candidate to NewChildren |

36: end if |

37: end for |

38: newConcept = (extent, generatorConcept.Intent) |

39: L = L∪{newConcept} |

40: for each Child in NewChildren |

41: removeLink(Child, generatorConcept, L) |

42: SetLink(Child, newConcept, L) |

43: end for |

44: SetLink(newConcept, generatorConcept, L) |

45: generatorConcept.NewConcept = newConcept {*} |

46: return newConcept |

- c
_{0}({1, 2, 3, 4, 5}, ∅) - c
_{1}({1, 2, 3, 5}, {c}) - c
_{2}({1, 2, 5}, {a, b, c}) - c
_{3}({1, 3, 5}, {c, d}) - c
_{4}({1, 5}, {a, b, c, d}) - c
_{5}({1, 2, 3}, {c, e}) - c
_{6}({1, 2}, {a, b, c, e}) - c
_{7}({1, 3}, {c, d, e}) - c
_{8}({1}, {a, b, c, d, e})

_{1}is the canonical generator of the new concept c

_{5}. Visibly c

_{1}has two candidates, and then the extent of two candidates need to do the intersection with {1, 2, 3}, respectively. At the same time, the results concluded from previous calls are that c

_{2}.NewConcept = c

_{6}, c

_{3}.NewConcept = c

_{7}, and the values of visited of c

_{2}and c

_{3}are both 5. Meanwhile, we suppose that c

_{6}is built earlier than c

_{7}. In the process, c

_{4}is a candidate of c

_{2}, and c

_{8}is generated by c

_{4}which is seen as the canonical generator, where c

_{4}.NewConcept = c

_{8}, c

_{4}.visited = 5. When creating c

_{7}, the candidate of c

_{7}is c

_{4}. Because c

_{4}.visited = 5, c

_{4}has been visited. Then, c

_{4}.NewConcept will be assigned directly to the candidate of c

_{7}. Eliminating a recursive call and many following comparisons greatly reduces the running time.

#### 4.2. Find the Canonical Generator

Algorithm 2: Procedure GetClosureConcept (extent, generator, L): |

1: extentConcept = L.Find(extent) |

2: if extentConcept ≠ ∅then |

3: return extentConcept |

4: end if |

5: childIsMinimal = true |

6: while childIsMinimal |

7: childIsMinimal = false |

8: Children = GetChildren(GeneratorConcept, L) |

9: for each Child in Children |

10: if extent ⊆ Child.Extent |

11: GeneratorConcept = Child |

12: childIsMinimal = true |

13: end if |

14: end for |

15: return GeneratorConcept |

Algorithm 3: Procedure CreateLatticeIncrementally(G, M, I |

1: topConcept = (G, ∅) |

2: L = {topConcept} |

3: i = 0 |

4: for each m in M |

5: i++ |

6: propertyConcept = FastAddIntent(m′,topConcept, L, i) |

7: Add m to the intent of propertyConcept and all concepts above |

8: end for |

9: return L |

## 5. Complexity Issues

^{3}) of a worst-case time complexity and the main details are discussed as follows [26]. The complexity relies on the number of invocations of the FastAddExtent function, while it calls the GetClosureConcept function only once for every extent of the lattice, as occurs in AddExtent. Since the length of the GeneratorChildren list never exceeds |M| [9] and the complexity of the GetClosureConcept function is restricted by O(|G||M|

^{2}) [26], the complexity of one call of FastAddExtent is roughly estimated as O(|G||M|

^{3}). Therefore, the total complexity is O(|L||G||M|

^{3}).

## 6. Experimental Evaluation and Analysis

## 7. Conclusions

## Author Contributions

## Funding

## Conflicts of Interest

## References

- Wille, R. Restructuring lattice theory: An approach based on hierarchies of concepts. In International Conference on Formal Concept Analysis; Springer: Berlin/Heidelberg, Germany, 2009; pp. 314–339. [Google Scholar]
- Ganter, B.; Wille, R. Formal Concept Analysis: Mathematical Foundations. (Translated from the German by Cornelia Franzke); Springer: Berlin/Heidelberg, Germany, 1999. [Google Scholar]
- Valtchev, P.; Missaoui, R. Building concept (Galois) lattices from parts: Generalizing the incremental methods. In International Conference on Conceptual Structures; Springer: Berlin/Heidelberg, Germany, 2001; pp. 290–303. [Google Scholar]
- Godin, R.; Missaoui, R.; Alaoui, H. Incremental concept formation algorithms based on Galois (concept) lattices. Comput. Intell.
**1995**, 11, 246–267. [Google Scholar] [CrossRef] - Ganter, B. Two basic algorithms in concept analysis. In International Conference on Formal Concept Analysis; Springer: Berlin/Heidelberg, Germany, 2010; pp. 312–340. [Google Scholar]
- Bordat, J.-P. Calcul pratique du treillis de Galois d’une correspondance. Mathématiques et Sciences Humaines
**1986**, 96, 31–47. [Google Scholar] - Norris, E.M. An algorithm for computing the maximal rectangles in a binary relation. Revue Roumaine de Mathématiques Pures et Appliquées
**1978**, 23, 243–250. [Google Scholar] - Kuznetsov, S.O.; Obiedkov, S.A. Comparing performance of algorithms for generating concept lattices. J. Exp. Theor. Artif. Intell.
**2002**, 14, 189–216. [Google Scholar] [CrossRef] [Green Version] - Zou, L.; Zhang, Z.; Long, J.; Zhang, H. A fast incremental algorithm for deleting objects from a concept lattice. Knowl.-Based Syst.
**2015**, 89, 411–419. [Google Scholar] [CrossRef] - Zou, L.; Zhang, Z.; Long, J. An efficient algorithm for increasing the granularity levels of attributes in formal concept analysis. Expert Syst. Appl.
**2016**, 46, 224–235. [Google Scholar] [CrossRef] - Wermelinger, M.; Yu, Y.; Strohmaier, M. Using formal concept analysis to construct and visualise hierarchies of socio-technical relations. In Proceedings of the 2009 31st International Conference on Software Engineering—Companion Volume, Vancouver, BC, Canada, 16–24 May 2009; pp. 327–330. [Google Scholar]
- Ganter, B.; Stumme, G.; Wille, R. Formal Concept Analysis: Foundations and Applications; Springer: Berlin/Heidelberg, Germany, 2005; Volume 3626. [Google Scholar]
- Priss, U. Linguistic applications of formal concept analysis. In Formal Concept Analysis; Springer: Berlin/Heidelberg, Germany, 2005; pp. 149–160. [Google Scholar]
- Ghani, I.; Jeong, S.R. Software Climate Change and its Disruptive Weather: A Potential Shift from”Software Engineering” to Vibrant/Dynamic Softology. KSII Trans. Internet Inf. Syst.
**2016**, 10, 3925–3942. [Google Scholar] - Dau, F.; Ducrou, J.; Eklund, P. Concept similarity and related categories in SearchSleuth. In International Conference on Conceptual Structures; Springer: Berlin/Heidelberg, Germany, 2008; pp. 255–268. [Google Scholar]
- Hong, S.-S.; Kong, J.-H.; Han, M.-M. The Adaptive SPAM Mail Detection System using Clustering based on Text Mining. KSII Trans. Internet Inf. Syst.
**2014**, 8, 2186–2196. [Google Scholar] - De Maio, C.; Fenza, G.; Gaeta, M.; Loia, V.; Orciuoli, F.; Senatore, S. RSS-based e-learning recommendations exploiting fuzzy FCA for Knowledge Modeling. Appl. Soft Comput.
**2012**, 12, 113–124. [Google Scholar] [CrossRef] - Ahmad, I.S. Text-based Image Indexing and Retrieval using Formal Concept Analysis. KSII Trans. Internet Inf. Syst.
**2008**, 2, 150–170. [Google Scholar] [CrossRef] - Amin, I.I.; Kassim, S.K.; ella Hassanien, A.; Hefny, H.A. Using formal concept analysis for mining hyomethylated genes among breast cancer tumors subtypes. In Proceedings of the 2013 International Conference on Advances in Computing, Communications and Informatics (ICACCI), Mysore, India, 22–25 August 2013; pp. 521–526. [Google Scholar]
- Viji Rajendran, V.; Swamynathan, S. Enhanced Cloud Service Discovery for Naïve users with Ontology based Representation. KSII Trans. Internet Inf. Syst.
**2016**, 10, 38–57. [Google Scholar] - Poelmans, J.; Kuznetsov, S.O.; Ignatov, D.I.; Dedene, G. Formal Concept Analysis in knowledge processing: A survey on models and techniques. Expert Syst. Appl.
**2013**, 40, 6601–6623. [Google Scholar] [CrossRef] - Ahn, B.; Abbas, E.; Park, J.A.; Choi, H.-J. Increasing Splicing Site Prediction by Training Gene Set Based on Species. KSII Trans. Internet Inf. Syst.
**2012**, 6, 2784–2799. [Google Scholar] [CrossRef] - Sun, Z.; Wang, B.; Sheng, J.; Hu, Y.; Wang, Y.; Shao, J. Identifying Influential Nodes in Complex Networks Based on Weighted Formal Concept Analysis. IEEE Access
**2017**, 5, 3777–3789. [Google Scholar] [CrossRef] - Song, G.Y.; Cheon, Y.; Lee, K.; Park, K.M.; Rim, H.C. Inter-category Map: Building Cognition Network of General Customers through Big Data Mining. KSII Trans. Internet Inf. Syst.
**2014**, 8, 583–600. [Google Scholar] - Lv, L.; Zhang, L.; Zhu, A.; Zhou, F. An improved addintent algorithm for building concept lattice. In Proceedings of the 2011 2nd International Conference on Intelligent Control and Information Processing (ICICIP), Harbin, China, 25–28 July 2011; pp. 161–165. [Google Scholar]
- Van Der Merwe, D.; Obiedkov, S.; Kourie, D. AddIntent: A new incremental algorithm for constructing concept lattices. In International Conference on Formal Concept Analysis; Springer: Berlin/Heidelberg, Germany, 2004; pp. 372–385. [Google Scholar]
- Kourie, D.G.; Obiedkov, S.; Watson, B.W.; van der Merwe, D. An incremental algorithm to construct a lattice of set intersections. Sci. Comput. Programm.
**2009**, 74, 128–142. [Google Scholar] [CrossRef] [Green Version] - Outrata, J.; Vychodil, V. Fast algorithm for computing fixpoints of Galois connections induced by object-attribute relational data. Inf. Sci.
**2012**, 185, 114–127. [Google Scholar] [CrossRef] - Kuznetsov, S.O. A fast algorithm for computing all intersections of objects from an arbitrary semilattice. Nauchno-Tekh. Informatsiya Ser. 2-Informatsionnye Protsessy I Sist.
**1993**, 1, 17–20. [Google Scholar] - Valtchev, P.; Missaoui, R.; Godin, R. A framework for incremental generation of closed itemsets. Discret. Appl. Math.
**2008**, 156, 924–949. [Google Scholar] [CrossRef] [Green Version] - Zou, L.; Zhang, Z.; Long, J. A fast incremental algorithm for constructing concept lattices. Expert Syst. Appl.
**2015**, 42, 4474–4481. [Google Scholar] [CrossRef] - Van Der Merwe, F.; Kourie, D. AddAtom: An Incremental Algorithm for Constructing Concept Lattices and Concept Sublattices; Technical Report; Department of Computer Science, University of Pretoria: Pretoria, South Africa, 2002. [Google Scholar]

**Figure 2.**Concept lattice of the formal context in Table 1.

**Figure 3.**Concept lattice of the formal context in Table 2.

a | b | c | d | e | |
---|---|---|---|---|---|

1 | × | × | × | × | |

2 | × | × | × | ||

3 | × | × | |||

4 | |||||

5 | × | × | × | × |

a | b | c | d | e | |
---|---|---|---|---|---|

1 | × | × | × | × | × |

2 | × | × | × | × | |

3 | × | × | × | ||

4 | |||||

5 | × | × | × | × |

© 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Zhang, J.; Liu, R.; Zou, L.; Zeng, L.
A New Rapid Incremental Algorithm for Constructing Concept Lattices. *Information* **2019**, *10*, 78.
https://doi.org/10.3390/info10020078

**AMA Style**

Zhang J, Liu R, Zou L, Zeng L.
A New Rapid Incremental Algorithm for Constructing Concept Lattices. *Information*. 2019; 10(2):78.
https://doi.org/10.3390/info10020078

**Chicago/Turabian Style**

Zhang, Jingpu, Ronghui Liu, Ligeng Zou, and Licheng Zeng.
2019. "A New Rapid Incremental Algorithm for Constructing Concept Lattices" *Information* 10, no. 2: 78.
https://doi.org/10.3390/info10020078