Rough Set Theory Applied to Simple Undirected Graphs Giampiero Chiaselotti2 , Davide Ciucci1(B) , Tommaso Gentile2 , and Federico Infusino2 1
DISCo, University of Milano – Bicocca, Viale Sarca 336/14, 20126 Milano, Italy
[email protected] 2 Department of Mathematics and Informatics, University of Calabria, Via Pietro Bucci, Cubo 30B, 87036 Arcavacata di Rende, CS, Italy
[email protected], {gentile,f.infusino}@mat.unical.it
Abstract. The incidence matrix of a simple undirected graph is used as an information table. Then, rough set notions are applied to it: approximations, membership function, positive region and discernibility matrix. The particular cases of complete and bipartite graphs are analyzed. The symmetry induced in graphs by the indiscernibility relation is studied and a new concept of generalized discernibility matrix is introduced. Keywords: Undirected graphs · Neighborhood · Discernibility matrix · Complete graphs · Bipartite graphs · Symmetry
1
Introduction
There are several possibilities to mix graph theory with rough set theory. First of all, we can prove the formal equivalence between a class of graphs and some concept related to rough sets [2,10], and then use the techniques of one theory to study the other. On the other hand, we can study rough sets using graphs [9] or vice versa study graphs using rough set techniques [1,4,6]. Here, we are following this last line. Our approach is very general and intuitive. Indeed, we consider the incidence matrix of a simple undirected graph as a Boolean Information Table and apply to it standard rough set techniques. We will see that the indiscernibility relation introduces a new kind of symmetry in graphs: roughly speaking, two vertices are similar if they behave in the same way with respect to all other vertices. In particular, the cases of complete and complete bipartite graphs are fully developed, by considering the corresponding of approximations, membership function, positive region and discernibility matrix on them. Some results on n-cycle and n-path graphs will also be given and a generalized notion of discernibility matrix introduced in order to characterize a new symmetry on graphs.
2
Basic Notions
The basic notions on rough set theory and graphs are given. c Springer International Publishing Switzerland 2015 D. Ciucci et al. (Eds.): RSKT 2015, LNAI 9436, pp. 423–434, 2015. DOI: 10.1007/978-3-319-25754-9 37
424
2.1
G. Chiaselotti et al.
Rough Set Notation
A partition π on a finite set X is a collection of non-empty M subsets B1 , . . . , BM of X such that Bi ∩ Bj = ∅ for all i = j and such that i=1 Bi = X. The subsets B1 , . . . , BM are called blocks of π and we write π := B1 | . . . |BM to denote that π is a set partition having blocks B1 , . . . , BM . If Y ⊆ Bi , for some index i, we say that Y is a sub-block of π and we write Y π. If x ∈ X, we denote by π(x) the (unique) block of π which contains the element x. We assume the reader familiar with rough set theory, hence here we just fix the basic notations and refer to [7] for further details. An information table is denoted as I = U, Att, V al, F , where U are the objects, Att is the attribute set, V al is a non empty set of values and F : U × Att → V al is the information map, mapping (object,attribute) pairs to values. If V al = {0, 1} the table is said Boolean. The indiscernibility relation ≡A is an equivalence relation between objects and depending on a set of attributes A: u ≡A u if ∀a ∈ A, F (u, a) = F (u , a). Equivalence classes with respect to ≡A are denoted as [u]A and the indiscernibility partition of I is the collection of all equivalence classes: πI (A) := {[u]A : u ∈ U }. Given a set of objects Y and a set of attributes A, the lower and upper approximations of Y with respect to the knowledge given by A are: lA (Y ) := {x ∈ U : [x]A ⊆ Y } = {C ∈ πI (A) : C ⊆ Y } (1) (2) uA (Y ) := {x ∈ U : [x]A ∩ Y = ∅} = {C ∈ πI (A) : C ∩ Y = ∅}. The subset Y is called A-exact if and only if lA (Y ) = uA (Y ) and A-rough otherwise. Other notions that will be useful in the following are: |[u]A ∩Y | A – The rough membership function μA Y : U → [0, 1]: μY (u) := |[u]A | . – If B ⊆ Att is such that πI (B) = {Q1 , . . . , QN }, the positive region is
P OSA (B) :=
N
lA (Qi ) = {u ∈ U : [u]A ⊆ [u]B }
(3)
i=1
– The A-degree dependency of B is the number γA (B) :=
|P OSA (B)| |U |
Let us notice that, since Q1 , . . . , QN are pairwise-disjoint, we have |P OSA (B)| = N i=1 |lA (Qi )|. 2.2
Graphs
We denote by G = (V (G), E(G)) a finite simple (i.e., no loops and no multiple edges are allowed) undirected graph, with vertex set V (G) = {v1 , . . . , vn } and edge set E(G). If v, v ∈ V (G), we will write v ∼ v if {v, v } ∈ E(G) and v v otherwise. We denote by Adj(G) the adjacency matrix of G, defined as the n × n matrix (aij ) such that aij := 1 if vi ∼ vj and aij := 0 otherwise. If v ∈ V (G), we set (4) NG (v) := {w ∈ V (G) : {v, w} ∈ E(G)}
Rough Set Theory Applied to Simple Undirected Graphs
425
N G (v) is usually called neighborhood of v in G. If A ⊆ V (G) we set NG (A) := v∈A NG (v). Graphs of particular interest for our discussion will be complete and bipartite ones. If A and B are two vertex subsets of G we denote by A B the symmetric difference between A and B in V (G), that is A B := (A \ B) ∪ (B \ A). Definition 2.1. The complete graph on n vertices, denoted by Kn , is the graph with vertex set {v1 , . . . , vn } and such that {vi , vj } is an edge, for each pair of indexes i = j. Definition 2.2. A graph B = (V (B), E(B)) is said bipartite if there exist two non-empty subsets B1 and B2 of V (B) such that B1 ∩ B2 = ∅, B1 ∪ B2 = V (B) and E(B) ⊆ O(B) := {{x, y} : x ∈ B1 , y ∈ B2 }. In this case the pair (B1 , B2 ) is called a bipartition of B and we write B = (B1 |B2 ). It is said that B = (B1 |B2 ) is a complete bipartite graph if E(B) = O(B). If |B1 | = p and |B2 | = q we denote by Kp,q the complete bipartite graph having bipartition (B1 , B2 ). Definition 2.3. Let n be a positive integer. The n-cycle Cn is the graph having n vertices v1 , . . . , vn and such that E(Cn ) = {{v1 , v2 }, {v2 , v3 }, . . . , {vn−1 , vn }, {vn , v1 }}. The n-path Pn is the graph having n vertices v1 , . . . , vn and such that E(Pn ) = {{v1 , v2 }, {v2 , v3 }, . . . , {vn−1 , vn }}. We will denote by In the n × n identity matrix and by Jn the n × n matrix having 1 in all its entries.
3
The Adjacency Matrix as an Information Table
We interpret now a simple undirected graph G as a Boolean information table denoted by I[G]. Let V (G) = V = {v1 , . . . , vn }. We assume that the universe set and the attribute set of I[G] are both the vertex set V and we define the information map of I[G] as follows: F (vi , vj ) := 1 if vi ∼ vj and F (vi , vj ) := 0 if vi vj . If A ⊆ V (G), we will write πG (A) instead of πI[G] (A). The equivalence relation ≡A is in relation with the notion of neighborhood as follows. Theorem 3.1. [4]. Let A ⊆ V (G) and v, v ∈ V (G). The following conditions are equivalent: (i) v ≡A v . (ii) For all z ∈ A it results that v ∼ z if and only if v ∼ z. (iii) NG (v) ∩ A = NG (v ) ∩ A. The previous theorem provides us a precise geometric meaning for the indiscernibility relation ≡A : we can consider the equivalence relation ≡A as a type of symmetry relation with respect to the vertex subset A. In fact, by part (ii) of Theorem 3.1 we can see that two vertices v and v are A-indiscernible between them iff they have the same incidence relation with respect to all vertices z ∈ A. We say therefore that v and v are A-symmetric vertices if v ≡A v . Hence the A-indiscernibility relation in I[G] becomes an A-symmetry relation in V (G) and the A-granule [v]A becomes the A-symmetry block of v.
426
G. Chiaselotti et al.
Example 3.1. Consider the graph in the next picture:
v3
v4 v5
v1
v2
We have NG (v1 ) = {v2 , v3 }, NG (v2 ) = {v1 , v4 }, NG (v3 ) = {v1 , v4 , v5 }, NG (v4 ) = {v2 , v3 , v5 } and NG (v5 ) = {v3 , v4 }. If we fix the vertex subset A = {v1 , v5 }, we have v1 ≡A v5 , so πG (A) = v1 v5 |v2 |v3 |v4 . As a direct consequence of Theorem 3.1 we can provide the general form for the indiscernibility partitions when G = Kn and G = Kp,q . Proposition 3.1. [4] (i) Let n ≥ 1 and let A = {vi1 , . . . , vik } be a generic subset of V (Kn ) = {v1 , . . . , vn }. Then πKn (A) = vi1 |vi2 | . . . |vik |Ac . (ii) Let p and q be two positive integers. Let Kp,q = (B1 |B2 ). Then πKp,q (A) = B1 |B2 for each subset A ⊆ V (Kp,q ) such that A = ∅. In the next results we deal with the indiscernibility partitions of Cn and Pn . Lemma 3.1. Let G = Cn or G = Pn and let V = V (G) = {v1 , . . . , vn }. Fix a subset A ⊆ V , A = {vi1 , . . . , vik }, and let vi , vj ∈ V , with i < j. Then vi ≡A vj if and only if NG (vi ) ∩ A = NG (vj ) ∩ A = ∅ or NG (vi ) ∩ A = NG (vj ) ∩ A = {vi+1 } = {vj−1 }. Proof. At first, we observe that for each i ∈ {1, . . . , n}, NCn (vi ) = {vi−1 , vi+1 }, where the index sums are all taken mod(n), and ⎧ if i = 1 ⎨ {v2 } if i = n NPn (vi ) = {vn−1 } ⎩ {vi−1 , vi+1 } otherwise. The proof follows easily by observing that, since vi = vj , then |NG (vi ) ∩ NG (vj )| ≤ 1 and the equality holds if and only if j = i + 2. It follows that, if NG (vi )∩A = NG (vj )∩A, then NG (vi )∩A = (NG (vi )∩NG (vj ))∩A ⊆ NG (vi )∩ NG (vj ). By Theorem 3.1, vi ≡A vj if and only if NG (vi ) ∩ A = NG (vj ) ∩ A. Thus |NG (vi ) ∩ A| = |NG (vj ) ∩ A| ≤ 1 and the equality holds if and only if j = i + 2 and vi+1 = vj−1 ∈ A. This proves the thesis. We give now a complete description of the indiscernibility partition for both the two graphs Cn and Pn . Proposition 3.2. Let G and A as in Lemma 3.1. We set BG (A) := (NG (A))c and {vi ∈ A : vi−2 ∈ / A ∧ vi+2 ∈ / A} if G = Cn , CG (A) := / A ∧ vi+2 ∈ / A} if G = Pn . {vi ∈ A : 3 ≤ i ≤ n − 2 ∧ vi−2 ∈
Rough Set Theory Applied to Simple Undirected Graphs
427
Then, if vs1 , . . . , vsl are the vertices in V (G)\[BG (A)∪NG (CG (A))] and vj1 , . . . , vjh are the vertices in CG (A), we have πG (A) = BG (A)|vj1 −1 vj1 +1 | · · · |vjh −1 vjh +1 |vs1 | · · · |vsl . Proof. The proof follows directly by Lemma 3.1. In fact, let vi , vj ∈ V (G), with i < j and vi ≡A vj . By the previous lemma, then either (a) NG (vi ) ∩ A = NG (vj ) ∩ A = ∅ or (b) NG (vi ) ∩ A = NG (vj ) ∩ A = vi+1 = vj−1 . But (a) is equivalent to say that vi , vj ∈ BA , (b) that {vi , vj } = NG (v), for some v ∈ CA . The proposition is thus proved. Example 3.2. Let n = 7 and let G = C7 or G = P7 be, respectively, the 7-cycle and the 7-path on the set V = {v1 , . . . , v7 }. Let A = {v3 , v4 , v7 }. Then, {v7 } {v3 , v4 , v7 } if G = C7 , if G = C7 , BG (A) = CG (A) = if G = P7 , {v1 , v7 } if G = P7 , {v3 , v4 }
and V (G) \ [BG (A) ∪ NG (CG (A))] = Thus,
πG (A) =
4
∅ if G = C7 , {v6 } if G = P7 .
v1 v6 |v2 v4 |v3 v5 |v7 if G = C7 , v1 v7 |v2 v4 |v3 v5 |v6 if G = P7 .
Rough Approximations and Dependency of Graphs
In this section, we apply lower and upper approximations, rough membership, positive region and degree of dependency to simple graphs. The case of complete and bipartite complete graphs are fully developed. 4.1
Lower and Upper Approximations
For the A-lower and A-upper approximation functions we obtain the following geometrical interpretation in the simple graph context. Proposition 4.1. [4] Let G = (V (G), E(G)) be a simple undirected graph and let I[G] be the Boolean information system associated to G. Let A and Y be two subsets of V (G). Then: (i) lA (Y ) = {v ∈ V (G) : (u ∈ V (G) ∧ NG (u) ∩ A = NG (v) ∩ A) =⇒ u ∈ Y }. (ii) uA (Y ) = {v ∈ V (G) : ∃u ∈ Y : NG (u) ∩ A = NG (v) ∩ A}. Therefore, v ∈ lA (Y ) iff all A-symmetric vertices of v are in Y . That is, the lower approximation of a vertex set Y represents a subset of Y such that there are no elements outside Y with the same connections of any vertex in lA (Y ) (relatively to A). Similarly, for the upper approximation, v ∈ uA (Y ) iff v is an A-symmetric vertex of some u ∈ Y . That is, the upper approximation of Y is the set of vertices with the same connections (w.r.t. A) of at least one element in Y . So, it is natural to call lA (Y ) the A-symmetry kernel of Y and uA (Y ) the A-symmetry closure of Y . In [4] it has been given a complete description for both the A-lower and the A-upper approximations when G = Kn and G = Kp,q .
428
G. Chiaselotti et al.
Example 4.1. Let G be the graph in the Example 3.1. If A = {v1 , v5 } and Y = {v1 , v4 }, it is immediate to verify that lA (Y ) = {v4 } and uA (Y ) = {v1 , v4 , v5 }. 4.2
Rough Membership and Dependency
For the rough-membership function and the rough-positive region we obtain the following geometrical interpretation. Proposition 4.2. Let G = (V (G), E(G)) be a simple undirected graph and let I[G] be the Boolean information system associated to G. Let A and Y be two subsets of V (G). Then the rough-membership function is μA Y (v) =
|{v ∈ Y : NG (v) ∩ A = NG (v ) ∩ A}| . |{v ∈ V (G) : NG (v) ∩ A = NG (v ) ∩ A}|
If B ⊆ V (G) we have P OSA (B) = {v ∈ V (G) : (v ∈ V (G) ∧ NG (v) ∩ A = NG (v ) ∩ A) =⇒ (NG (v) ∩ B = NG (v ) ∩ B)}. Proof. It follows directly by (iii) of Theorem 3.1 and from the definitions of rough membership and positive region. Example 4.2. Let G be the graph in the Example 3.1. If A = {v1 , v5 } and Y = {v1 , v4 }, the corresponding rough membership function is ⎧ if v = v2 ∨ v = v3 ⎨0 1 if v = v4 μA Y (v) = ⎩ 1/2 if v = v1 ∨ v = v5 Moreover, if B = {v2 , v4 } then πG (B) = v1 v4 |v2 v3 v5 , therefore P OSA (B) = {v2 , v3 , v4 }. We consider now the complete graph G = Kn and compute the rough membership function, the A-positive region of B (when A and B are any two vertex subsets) and the degree dependency function. Proposition 4.3. Let G = Kn be the complete and Y be two subsets of V (G). Then ⎧ if ⎨0 1 if (v) = μA Y ⎩ c |A ∩ Y |/|Ac | if
graph on n vertices and let A v ∈A\Y v ∈A∩Y v∈ /A
A if |A| < n − 1 ∧ B A P OSA (B) = V (G) otherwise |A|/n if |A| < n − 1 ∧ B A γA (B) = 1 otherwise
(5)
(6)
(7)
Rough Set Theory Applied to Simple Undirected Graphs
Proof. 1. By (i) of Proposition 3.1 we deduce ⎧ if ⎨∅ if [v]A ∩ Y = {v} ⎩ c A ∩ Y if
429
that v ∈A∧v ∈ /Y v ∈A∧v ∈Y v∈ /A
Hence the thesis follows again by (i) of Proposition 3.1 and from the definition of rough membership function. 2. Let πI (B) = Q1 | . . . |QN . We suppose at first that |A| ≥ n − 1, then Ac is either empty or a singleton, therefore by (i) of Proposition 3.1 we have that πKn (A) = v1 | . . . |vn . This implies that lA (Qi ) = Qi for i = 1, . . . , N . Since Q1 | . . . |QN is a partition of V (G), by (3) it follows that P OSA (B) = V (G). We assume now that |A| ≤ n − 2 and B ⊆ A. By (3), in order to obtain the first part of our thesis we must show that {v ∈ V (G) : [v]A ⊆ [v]B } = V (G).
(8)
If v ∈ A, by (i) of Proposition 3.1 we have that [v]A = {v}, therefore [v]A ⊆ [v]B . If v ∈ Ac , again by (i) of Proposition 3.1 we have that [v]A = Ac . On the other hand, since B ⊆ A, then v ∈ Ac ⊆ B c , so that, again by (i) of Proposition 3.1, it results that [v]B = B c . Hence also in this case [v]A ⊆ [v]B . This proves (8). We suppose now that B A and |A| ≤ n − 2. In order to show the second identity for P OSA (B), we prove that {v ∈ V (G) : [v]A ⊆ [v]B } = A.
(9)
If v ∈ A, as previously [v]A = {v} ⊆ [v]B , therefore A ⊆ {v ∈ V (G) : [v]A ⊆ [v]B }. Let v ∈ Ac . As before we have [v]A = Ac . Since |A| < n − 1, we have |[v]A | = |Ac | > 1. We examine now [v]B . By (i) of Proposition 3.1 we have that [v]B = {v} or [v]B = B c . In the first case, [v]A [v]B because |[v]A | > 1. In the second case, [v]A = Ac [v]B = B c because otherwise B ⊆ A, that is contrary to our assumption. This proves that v ∈ Ac implies [v]A [v]B , that is A ⊇ {v ∈ V (G) : [v]A ⊆ [v]B }. Hence we obtain (9). 3. The universe set for the information system I[G] is U := V (G), therefore |U | = n in our case. The result follows then directly by definition and the previous point. Finally, we analyze the case of bipartite graphs G = Kp,q . Proposition 4.4. Let G = Kp,q be the complete bipartite graph on p+q vertices with bipartition (B1 |B2 ). If A and B are two subsets of V (G) we have that |B1 ∩ Y |/|B1 | if v ∈ B1 A (10) μY (v) = |B2 ∩ Y |/|B2 | if v ∈ B2 ∅ if A = ∅ ∧ B = ∅ P OSA (B) = (11) V otherwise 0 if A = ∅ ∧ B = ∅ γA (B) = (12) 1 otherwise
430
G. Chiaselotti et al.
Proof. 1. By (ii) of Proposition 3.1 we know that [v]A = Bi if v ∈ Bi , for i = 1, 2, therefore B1 ∩ Y if v ∈ B1 [v]A ∩ Y = B2 ∩ Y if v ∈ B2 and the thesis follows from the definition of rough membership function. 2. If A = ∅ and B = ∅ then πG (A) = V (G) and, by (ii) of Proposition 3.1, πB (G) = B1 |B2 .Thus [v]A = V and [v]B = Bi , for some i = 1, 2. This implies that [v]A [v]B for all v ∈ V , hence P OSA (B) = ∅. If A = B = ∅ then πG (A) = πB (G) = V , therefore [v]A = V ⊆ [v]B = V for all v ∈ V . Hence P OSA (B) = V . If A = ∅ and B = ∅ then πG (A) = B1 |B2 by (ii) of Proposition 3.1, and πB (G) = V . This implies that [v]A = Bi for some i = 1, 2 and [v]B = V for all v ∈ V . Hence P OSA (B) = V . Finally, if A = ∅ and also B = ∅, by (ii) of Proposition 3.1 we have that πG (A) = πG (A) = B1 |B2 . This implies that [v]A = [v]B = Bi for all v ∈ V and for some i = 1, 2. Hence also in this case P OSA (B) = V . 3. The result follows directly by definition and the above point.
5
Discernibility Matrix in Graph Theory
A fundamental investigation tool in rough set theory is the discernibility matrix of an information system [8]. In this section we discuss the important geometric role of the discernibility matrix in our graph theory context. Let I = U, Att, V al, F an information table such that U = {u1 , . . . , um } and |Att| = n. The discernibility matrix Δ[I] of I is the m × m matrix having as (i, j)-entry the following attribute subset: ΔI (ui , uj ) := {a ∈ Att : F (ui , a) = F (uj , a)}.
(13)
In the graph context we have the following result. Proposition 5.1. [3] If G is a simple undirected graph and vi , vj ∈ V (G), then ΔG (vi , vj ) := ΔI[G] (vi , vj ) = NG (vi ) NG (vj ).
(14)
In order to provide now a convenient geometrical interpretation of the identity (14), we can observe that if vi = vj then v ∈ ΔG (vi , vj ) iff v is connected with exactly one vertex between vi and vj . This means that v is a dissymmetry vertex for vi and vj and therefore it is natural to call ΔG (vi , vj ) the dissymmetry axis of vi and vj and dissymmetry number of vi and vj the integer δij (G) := |ΔG (vi , vj )|. In graph terminology then the discernibility matrix Δ[G] := Δ[I[G]] becomes the local dissymmetry matrix of G. We also call local numerical dissymmetry matrix of G the numerical matrix Δnum [G] := (δij (G)). We use the term local because the dissymmetry is evaluated with respect to only two vertices.
Rough Set Theory Applied to Simple Undirected Graphs
431
Example 5.1. Let G be the graph in the Example 3.1. Then, it is easy to see that ΔG (v1 , v2 ) = ΔG (v3 , v4 ) = {v1 , v2 , v3 , v4 }, ΔG (v1 , v3 ) = ΔG (v2 , v4 ) = V (G), ΔG (v1 , v4 ) = ΔG (v2 , v3 ) = {v5 }, ΔG (v1 , v5 ) = {v2 , v4 }, ΔG (v2 , v5 ) = {v1 , v3 }, ΔG (v3 , v5 ) = {v1 , v3 , v5 } and ΔG (v4 , v5 ) = {v2 , v4 , v5 }. We now introduce the following generalization of (13). If Z ⊆ U we define the generalized discernibility matrix as ΔI (Z) := {a ∈ Att : ∃ z, z ∈ Z : F (z, a) = F (z , a)},
(15)
and also set ΔcI (Z) := Att \ ΔI (Z) = {a ∈ Att : ∀ z, z ∈ Z, F (z, a) = F (z , a)}
(16)
It is clear then that Proposition 5.2. [3] ΔcI (Z) is the unique attribute subset C of I such that : (i) z ≡C z for all z, z ∈ Z; (ii) if A ⊆ Att and z ≡A z for all z, z ∈ Z, then A ⊆ C. In the graph context, the consequence of the Proposition 5.2 is that if Z ⊆ V (G), then ΔcI[G] (Z) is the maximum symmetry subset for Z, therefore we call ΔcG (Z) the symmetry axis of Z. Since ΔI[G] (Z) is the complementary subset of ΔcG (Z) in V (G), it will be called the dissymmetry axis of Z. In particular, when Z = {vi , vj } we re-obtain the previous definitions. It is also convenient to c (G) := |ΔcG ({vi , vj })|. Let us call symmetry number of vi and vj the integer δij c note that for all i and j we have δij (G) + δij (G) = |V (G)|. By analogy with the dissymmetry case, we call local symmetry matrix of G the subset matrix Δc [G] := (ΔcG (vi , vj )) and numerical local symmetry matrix of G the subset c (G)). matrix Δcnum [G] := (δij Example 5.2. Let G be the graph in the Example 3.1. Let Z = {v2 , v3 , v5 }, then ΔI (Z) = {v1 , v3 , v5 } and ΔcI (Z) = {v2 , v4 }. By analogy with the case of the average degree of a graph (see [5]) it is natural to introduce both the corresponding averages of local symmetry and dissymmetry for G. Definition 5.1. We call 2-local dissymmetry average of G the average number δ(G) and, analogously, 2-local symmetry average of G the average number δ c (G): c 1≤i