Next Article in Journal
Higher-Order Benjamin–Ono Model for Ocean Internal Solitary Waves and Its Related Properties
Next Article in Special Issue
The Boundary Integral Equation for Kinetically Limited Dendrite Growth
Previous Article in Journal
Innovative Strategy for Constructing Soft Topology
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

The Clustering Coefficient for Graph Products

by
Jhon J. Aguilar-Alarcón
,
Juan C. Hernández-Gómez
and
Jesús Romero-Valencia
*
Faculty of Mathematics, Autonomous University of Guerrero, Chilpancingo 39000, Mexico
*
Author to whom correspondence should be addressed.
Axioms 2023, 12(10), 968; https://doi.org/10.3390/axioms12100968
Submission received: 19 July 2023 / Revised: 15 August 2023 / Accepted: 10 October 2023 / Published: 14 October 2023
(This article belongs to the Special Issue Advances in Mathematics: Theory and Applications)

Abstract

:
The clustering coefficient of a vertex v, of degree at least 2, in a graph Γ is obtained using the formula C ( v ) = 2 t ( v ) deg ( v ) ( deg ( v ) 1 ) , where t ( v ) denotes the number of triangles of the graph containing v as a vertex, and the clustering coefficient of Γ is defined as the average of the clustering coefficient of all vertices of Γ , that is, C ( Γ ) = 1 | V | v V C ( v ) , where V is the vertex set of the graph. In this paper, we give explicit expressions for the clustering coefficient of corona and lexicographic products, as well as for the Cartesian sum; such expressions are given in terms of the order and size of factors, and the degree and number of triangles of vertices in each factor.

1. Introduction

Leonhard Euler introduced graph theory in his well-known discussion of the Königsberg Bridge Problem in 1736, when he gave a representation of the situation by means of a graph (see reference [1]). However, such an article remained isolated for almost a century until there was a revival of interest in the problems of graph theory, mainly in England. In 1857, Arthur Cayley used his knowledge of these topics to represent and study the structure and properties of some alkanes and their isomers. In this way, his first contribution was knowing the different isomers of the alkanes as a function of the number of carbons that they contain. Moreover, his work allowed us to know exactly the number of isomers of the alkane with n carbons once the number of isomers of the alkane with n − 1 carbons is known (see references [2,3]). At present, the representation of some systems by means of graphs has allowed us to analyze complex structures, both their structure and properties, and summarize them in terms of some numerical parameters called (topological) indices (see reference [4]); these indices, which are graph invariants, carry information on the structure of the graph. Thus, graphs are used as models for studying computer interconnections, social networks, social structures, neural networks, and networks of interactions of species in trophic networks, to name a few (see reference [5]).
It is precisely in social networks, in a story published in 1929, that the six degrees of separation hypothesis arose, which says that any two people can be connected through a chain of acquaintances with, at most, five intermediaries (see reference [6]). This hypothesis led to the emergence of the small-world phenomenon, which is the notion that the world can be seen as a somewhat “small” social network; that is, every person can be reached through a small set of intermediaries from any other person (see reference [7]). One of the best known studies was carried out in the 1960s by S. Milgram, who performed the so-called Small-world experiment (see reference [8]). After this, the concept of small-world was transferred, in a natural way, to graphs. Thus, in 1998, Watts and Strogatz proposed a model to generate random graphs with the properties of a small-world, introducing the clustering coefficient as a parameter for their model (see reference [9]).
Clustering in graphs is a topic that has caught the attention of many people in recent years, due to the fact that this invariant gives information about its local and global structure. Depending on the situation, the clustering coefficient grants: the classification of graphs that display interactions between elements (scale-free and small-world) (see references [10,11]); and the identification of species in an ecosystem that are most relevant or important from a biological viewpoint (see references [12,13]). Moreover, there are some papers devoted to the clustering coefficient, for example, in reference [14] the authors present some expressions for this parameter of the tensor product of arbitrary graphs, regular graphs, and strongly regular graphs. In reference [15] it is shown that the global clustering coefficient of the tensor and Cartesian product for two complete graphs with m vertices approach 1 and 1 / 2 , respectively, as m . It is worth mentioning that the computation of this parameter is very hard when considering graphs with many vertices and edges (see references [16,17]).
As other structures, graphs can also be operated in such a way from two, given a third one is obtained (a graph product). Among these binary operations, there are some that are well known and that have been studied and investigated from different perspectives, for example: the total Roman domination number of the lexicographic product of graphs is studied in reference [18]; the exact value of the edge irregularity strength of the corona product of paths is determined in reference [19]; explicit expressions for the F-index of different types of corona product are derived in reference [20]; the super fair dominating sets of the corona and lexicographic product of two graphs are characterized in reference [21]; some tight bounds and closed formulas for the strong metric dimension of the Cartesian sum of graphs, in terms of some parameters of the factors, are obtained in reference [22]; and explicit expressions for the Schultz index of the Cartesian, corona, and lexicographic product, and the Cartesian sum, are given in reference [23].
In this work, we compute the number of triangles for the corona and lexicographic products, as well as for the Cartesian sum. Such expressions are given in terms of the order and size of factors, and the degree and number of triangles of vertices in each factor, and we use them to give explicit expressions for their clustering coefficient.

2. Preliminaries

In this section, we establish some notation and recall some definitions used throughout this paper.
By graph we mean a simple and finite graph Γ = ( V , E ) ; given two vertices u , v V , we say that they are neighbors or adjacent if they form an edge, that is u v E . The set of neighbors of v is denoted by N ( v ) . The degree of v V is the number of vertices that are its neighbors, that is,
deg ( v ) = | N ( v ) | .
A graph Γ is a tree if it is connected and contains no cycles. Γ is called bipartite if V can be written as the disjoint union of two non-empty subsets such that every edge has one endpoint in each subset. The cycle graph of order n 3 , denoted by C n , is the graph with the vertex set V ( C n ) = { v 1 , , v n } and edge set
E ( C n ) = { v 1 v 2 , v 2 v 3 , , v n 1 v n , v n v 1 } .
The complete graph of order n 1 , denoted by K n , is the graph with the vertex set V ( K n ) = { v 1 , , v n } and edge set
E ( K n ) = { v i v j : i , j = 1 , , n , and i j } .
We say that three vertices, u , v , and w, of a graph Γ produce a triangle if the subgraph induced by them is isomorphic to K 3 , the number of triangles of Γ that contain v is denoted by t ( v ) ; thus,
t ( v ) = | { u w E : v u , v w E } | .
For more concepts related to graphs, see reference [24].
Below, we state the definition of the graph invariant that concerns us in this paper.
Definition 1.
Let Γ = ( V , E ) be a graph and v V . The  clustering coefficient of v is defined using the formula
C ( v ) = 2 t ( v ) deg ( v ) ( deg ( v ) 1 ) , i f deg ( v ) 2 ; 0 , o t h e r w i s e .
And the  clustering coefficient of Γ is defined by
C ( Γ ) = 1 | V | v V C ( v ) .
In the literature, it is common to refer to the clustering coefficient of a vertex as local clustering and to that of the graph as global clustering.
Example 1.
I. 
Let Γ be the graph shown in Figure 1. Observe that, for the vertex v, we have deg ( v ) = 4 and t ( v ) = 3 ; thus, C ( v ) = 1 2 . Moreover, by doing the right calculations, we get C ( Γ ) = 17 36 .
II. 
If Γ is a tree, a bipartite graph, or a cycle of order 4 , it does not contain triangles; thus, for any vertex v we have t ( v ) = 0 and, consequently, C ( v ) = 0 , obtaining C ( Γ ) = 0 .
III. 
For the complete graph K n = ( V , E ) and v V , it is clear that it forms a triangle with any pair of distinct vertices. Thus, t ( v ) = ( n 1 ) ( n 2 ) 2 , which implies C ( v ) = 1 and C ( Γ ) = 1 . And, reciprocally, if any vertex v of a graph Γ satisfies C ( v ) = 1 , then Γ K n .

3. The Clustering Coefficient for Graph Products

In this section, for some graph products, we compute the number of triangles containing a vertex in terms of some parameters associated with the vertices of each entry to give an expression of the local and global clustering.

3.1. The Corona Product

Recall that, given two graphs, Γ 1 = ( V 1 , E 1 ) and Γ 2 = ( V 2 , E 2 ) , the corona product of Γ 1 with Γ 2 is defined as the graph Γ = ( V , E ) given by taking one copy of Γ 1 and | V 1 | copies of Γ 2 , joining the r-th vertex of Γ 1 to every vertex in the r-th copy of Γ 2 . That is,
V = V 1 × { v 0 } V 1 × V 2 and E = E 1 { ( u r , v i ) ( u r , v j ) : v i v j E 2 } { ( u r , v 0 ) ( u r , v i ) : v i V 2 } ,
where V 1 × { v 0 } are considered as the vertices of the copy of Γ 1 and V 1 × V 2 are those of the | V 1 | copies of Γ 2 . This graph is denoted by Γ 1 Γ 2 . Figure 2 shows the corona product of K 5 with K 4 .
Proposition 1.
Let Γ 1 = ( V 1 , E 1 ) and Γ 2 = ( V 2 , E 2 ) be two graphs with | E 2 | = m 2 . If ( u , v ) is a vertex of Γ 1 Γ 2 , then
t ( u , v ) = t 1 ( u ) + m 2 , i f v = v 0 ; t 2 ( v ) + deg ( v ) , o t h e r w i s e ,
where t 1 ( u ) and t 2 ( v ) denote the number of triangles containing the vertices u and v in Γ 1 and Γ 2 , respectively.
Proof. 
Let ( x , y ) , ( w , z ) V such that they form a triangle with ( u , v ) . We proceed by cases. If v = v 0 , then ( u , v 0 ) ( x , y ) E if and only if y = v 0 and u x E 1 or u = x , analogously for ( w , z ) . Moreover, ( x , y ) ( w , z ) E if and only if y = z = v 0 and x w E 1 or x = w and y z E 2 . Thus, ( u , v 0 ) , ( x , y ) , ( w , z ) form a triangle when u , x , w create a triangle in Γ 1 or y z E 2 . In this way, the number of triangles for ( u , v 0 ) is t 1 ( u ) + m 2 .
Now suppose v v 0 . Then, ( u , v ) ( x , y ) E if and only if u = x and v y E 2 or u = x and y = v 0 , analogously for ( w , z ) . And ( x , y ) ( w , z ) E if and only if x = w = u and y z E 2 or y = v 0 or z = v 0 , but not both. Thus, ( u , v ) , ( x , y ) , ( w , z ) form a triangle if v , y , z do it in Γ 2 or y = v 0 and v z E 2 . Consequently, the number of triangles for ( u , v ) is t 2 ( v ) + deg ( v ) . □
Under the conditions of the above proposition, the subsequent result follows immediately.
Theorem 1.
Let Γ 1 = ( V 1 , E 1 ) and Γ 2 = ( V 2 , E 2 ) be two graphs with | V 1 | = n 1 , | E 1 | = m 1 , | V 2 | = n 2 , and | E 2 | = m 2 . If Γ 1 Γ 2 = ( V , E ) and ( u , v ) V , then
I.
The local clustering of ( u , v ) is given by
C ( u , v ) = 2 t 1 ( u ) + m 2 ( deg ( u ) + n 2 ) ( deg ( u ) + n 2 1 ) , i f   v = v 0 ; 2 t 2 ( v ) + deg ( v ) ( deg ( v ) + 1 ) deg ( v ) , o t h e r w i s e ,
II.
And the global clustering by
C ( Γ 1 Γ 2 ) = 1 n 1 + n 1 n 2 ( u V 1 2 t 1 ( u ) + m 2 ( deg ( u ) + n 2 ) ( deg ( u ) + n 2 1 ) + n 1 v V 2 2 t 2 ( v ) + deg ( v ) ( deg ( v ) + 1 ) deg ( v ) ) .
Example 2.
Consider two complete graphs, K r and K s , of order r and s, respectively, and let Γ = ( V , E ) be the corona product of K r with K s . For ( u , v ) V
deg ( u , v ) = r + s 1 , i f   v = v 0 ; s , o t h e r w i s e .
According to Proposition 1, we have that the number of triangles containing ( u , v ) is
t ( u , v ) = ( r 1 ) ( r 2 ) + ( s 1 ) s 2 , i f   v = v 0 ; ( s 1 ) s 2 , o t h e r w i s e .
The first part of the last theorem implies
C ( u , v ) = ( r 1 ) ( r 2 ) + ( s 1 ) s ( r + s 1 ) ( r + s 2 ) , i f   v = v 0 ; 1 , o t h e r w i s e ,
obtaining
C ( Γ 1 Γ 2 ) = 1 s + 1 ( r 1 ) ( r 2 ) + ( s 1 ) s ( r + s 1 ) ( r + s 2 ) + s .
It is worth noting that, even when the first graph is not complete, it is enough that the second one is so that the value of the clustering coefficient of the vertices whose second entry is other than v 0 is 1. Figure 2 shows the corona product of K 5 with K 4 .

3.2. The Lexicographic Product

The lexicographic product of two graphs, Γ 1 = ( V 1 , E 1 ) and Γ 2 = ( V 2 , E 2 ) , is defined as the graph Γ = ( V , E ) with V = V 1 × V 2 and
E = { ( u , v ) ( x , y ) : u x E 1 } { ( x , v ) ( x , y ) : v y E 2 } .
We denote this graph by Γ 1 Γ 2 . Observe that Γ 1 Γ 2 can obtained by taking | V 1 | copies of Γ 2 and joining the vertices of Γ 2 , u with every vertex of Γ 2 , x (the corresponding copies to vertices u and x, respectively) if u x E 1 . Figure 3 shows a representation of the lexicographic product of S 3 and P 3 .
Note that the edge set of the lexicographic product is precisely the union of two sets. Assume that an edge of the first set is incident to one of the second ones, say ( u , v ) ( x , y ) to ( u , v ) ( u , z ) . Thus, u x E 1 and v z E 2 . We may note that ( x , y ) ( u , z ) E is the only edge incident to them, and it belongs to the first set. This implies that the only way of creating a triangle with edges in both sets is that two of them belong to the first set and the other to the second one. In this way, we consider triangles of three types.
Type 1: the three edges belong to the first set.
Type 2: two edges are in the first set and the other in the second one.
Type 3: the three edges are in the second set.
In contrast to the corona product case, we compute the number of triangles of each type separately to make our calculations clearer.
Before starting with our computations, we present some of these triangles in an example to illustrate some of our reasonings. The first graph of Figure 4 shows some triangles of type 1 in the lexicographic product of K 5 and K 4 , they are produced by vertices whose first entries are adjacent in K 4 . The second one shows triangles of type 2, they are formed by vertices such that two of them have the same first entry, the second entries are adjacent in K 5 , and the first entry of these vertices form an edge with the first of the third one. And the last one displays triangles of type 3; they are formed by vertices that have the same first entry and the second entries are adjacent in K 5 .
Throughout this subsection, n 1 and n 2 denote the order of Γ 1 and Γ 2 , respectively, m 1 and m 2 the size of Γ 1 and Γ 2 , respectively, and ( u , v ) a vertex of Γ 1 Γ 2 .
Lemma 1.
Under the above conditions, the number of triangles of type 1 containing ( u , v ) as a vertex is given by t 1 ( u ) n 2 2 .
Proof. 
Let ( x , y ) and ( w , z ) be two vertices such that they form a triangle of type 1 with ( u , v ) . Then, u x , u w , x w E 1 , that is, u , x , and w, produce a triangle in Γ 1 . Since y and z can be any of the vertices of Γ 2 , there are n 2 2 triangles of type 1 in Γ determined by this one in Γ 1 . Therefore, there are n 2 2 t 1 ( u ) triangles of this type containing ( u , v ) . □
Following lemma gives the number of triangles of type 2.
Lemma 2.
Under the initial conditions, there are deg ( u ) ( n 2 deg ( v ) + m 2 ) triangles of type 2 in Γ, having ( u , v ) as a vertex.
Proof. 
Let ( x , y ) , ( w , z ) V such that they form a triangle of type 2 with ( u , v ) . Then, ( u , v ) ( x , y ) or ( x , y ) ( w , z ) belong to the second set of edges. If ( u , v ) ( x , y ) is in the second set, then u = x and v y E 2 , that is, y N ( v ) and ( u , v ) ( w , z ) is an edge that belongs to the first set, which implies u w E 1 . Thus, w can be taken as any neighbor of u and z any vertex of Γ 2 . On the other hand, if ( x , y ) ( w , z ) is in the second set of edges, x = w and y z E 2 , since ( u , v ) ( x , y ) and ( u , v ) ( x , z ) are edges in the first set, x can be any neighbor of u; therefore, y z can be any edge of Γ 2 . Hence, the number of triangles of type 2 is deg ( u ) ( n 2 deg ( v ) + m 2 ) . □
Next, we characterize the triangles of type 3 by those in the second factor.
Lemma 3.
The number of triangles of type 3 in Γ, containing ( u , v ) as a vertex, is t 2 ( v ) .
Proof. 
Let ( x , y ) , ( w , z ) V such that they form a triangle of type 3 with ( u , v ) . Then u = x = w and v y , v z , y z E 2 , that is, v , y , and z are the vertices of a triangle in Γ 2 . Thus, the triangle with vertices ( u , v ) , ( u , y ) , and ( u , z ) is determined by the last one.
Therefore, there are t 2 ( v ) triangles of type 3 containing ( u , v ) . □
To summarize, we have the following proposition.
Proposition 2.
The number of triangles of Γ 1 Γ 2 having ( u , v ) as a vertex is given by
t ( u , v ) = n 2 2 t 1 ( u ) + deg ( u ) ( n 2 deg ( v ) + m 2 ) + t 2 ( v ) .
The next result follows immediately from the last one.
Theorem 2.
Let Γ 1 = ( V 1 , E 1 ) and Γ 2 = ( V 2 , E 2 ) be two graphs with | V 1 | = n 1 , | E 1 | = m 1 , | V 2 | = n 2 , and | E 2 | = m 2 . If Γ 1 Γ 2 = ( V , E ) and ( u , v ) V , then
I.
The clustering coefficient of ( u , v ) is given by
C ( u , v ) = 2 n 2 2 t 1 ( u ) + deg ( u ) ( n 2 deg ( v ) + m 2 ) + t 2 ( v ) ( deg ( v ) + n 2 deg ( u ) ) ( deg ( v ) + n 2 deg ( u ) 1 ) ,
II.
And the clustering coefficient of Γ 1 Γ 2 by the formula
C ( Γ 1 Γ 2 ) = 1 n 1 n 2 u V 1 v V 2 2 n 2 2 t 1 ( u ) + deg ( u ) ( n 2 deg ( v ) + m 2 ) + t 2 ( v ) ( deg ( v ) + n 2 deg ( u ) ) ( deg ( v ) + n 2 deg ( u ) 1 ) .
Example 3.
Again, we consider two complete graphs K r and K s . If ( u , v ) is a vertex of K r K s , Proposition 2 implies that
t ( u , v ) = s 2 ( r 1 ) ( r 2 ) 2 + ( r 1 ) s ( s 1 ) + s ( s 1 ) 2 + ( s 1 ) ( s 2 ) 2 = r 2 s 2 3 r s + 2 2 .
According to the above theorem, we obtain C ( u , v ) = 1 , for every vertex. Therefore,
C ( K r K s ) = 1 ,
which coincides with the fact that K r K s is the complete graph of r s vertices.

3.3. The Cartesian Sum

Given two graphs Γ 1 = ( V 1 , E 1 ) and Γ 2 = ( V 2 , E 2 ) , the Cartesian sum of them is defined as the graph Γ = ( V , E ) with V = V 1 × V 2 and
E = { ( u , v ) ( x , y ) : u x E 1 or v y E 2 } .
This graph is denoted by Γ 1 Γ 2 . We may observe that Γ 1 Γ 2 is a subgraph of Γ 1 Γ 2 . Thus, the Cartesian sum can be obtained with the lexicographic product plus the edges obtained by joining the vertex v of the i-th copy with the vertex y of any other copy, whenever v y E 2 . Figure 5 shows a representation of the Cartesian sum of S 3 and P 3 .
To compute the number of triangles of a vertex in the Cartesian sum, we observe that two vertices form an edge if and only if there is an edge between the vertices of the first or the second entries; thus, we consider four types of triangles.
Type 1: there are three edges between the first entries.
Type 2: two edges are formed with the first entries and one with the second.
Type 3: one edge is formed with the first entries and two with the second.
Type 4: the three edges are formed between the second entries.
In order to make clearer our calculations, we compute the number of triangles of each type and those of the intersections between different types.
As in the lexicographic product, before starting our computations, we present examples of these triangles that help to illustrate some of our reasonings. Since K r K s K r s , then K r K s is also isomorphic to K r s . The first graph of Figure 6 shows some triangles of type 1 in the Cartesian sum of K 5 and K 4 ; they are produced by vertices whose first entries form a triangle in K 4 . The second one shows triangles of type 2; they are produced by vertices such that their first entries form two edges in K 4 and one edge is formed with the second entries in K 5 . The third graph displays triangles of type 3; they are formed by vertices such that their second entries form two edges in K 5 and one edge is formed with the first entries in K 4 . And the last one exhibits triangles of type 4 which are formed by vertices such that their second entries are in a triangle in K 5 .
Throughout this subsection, n 1 and n 2 denote the order of Γ 1 and Γ 2 , respectively, m 1 and m 2 the size of Γ 1 and Γ 2 , respectively, and ( u , v ) a vertex of the Cartesian sum Γ 1 Γ 2 .
Lemma 4.
For the vertex ( u , v ) there are n 2 2 t 1 ( u ) triangles of type 1 which contain it.
Proof. 
Let ( x , y ) and ( w , z ) be two vertices such that ( u , v ) , ( x , y ) , and ( w , z ) form a triangle of type 1, so u x , u w , x w E 1 . Thus, this triangle is induced by a triangle of Γ 1 . Note that a triangle in Γ 1 given by u , x , and w induces the triangles ( u , v ) , ( x , y ) , and ( w , z ) for any y , z V 2 . Consequently, the number of triangles induced is n 2 2 . Therefore, there are n 2 2 t 1 ( u ) triangles of type 1 containing ( u , v ) . □
Analogous arguments can be used for triangles of type 4, obtaining the following.
Lemma 5.
For the vertex ( u , v ) there are n 1 2 t 2 ( v ) triangles of type 4 which contain it.
Next, we compute the number of triangles of type 2.
Lemma 6.
The number of triangles of type 2 containing ( u , v ) as a vertex is
m 2 deg 2 ( u ) + n 2 deg ( v ) x N ( u ) deg ( x ) t 1 ( u ) deg 2 ( v ) + 2 z N ( v ) deg ( z ) t 2 ( v ) .
Proof. 
Consider two vertices ( x , y ) and ( w , z ) such that ( u , v ) , ( x , y ) , and ( w , z ) form a triangle of type 2. We have the following two cases.
  • Case 1: u x , u w E 1 and y z E 2 . Note that x and w can be any neighbor of u and they can even coincide, since y z . Moreover, y z can be any edge of Γ 2 , thus, there are m 2 deg 2 ( u ) of these triangles.
  • Case 2: u x , x w E 1 and v z E 2 . Notice that x can be any neighbor of u, and for each x any of its neighbors can be w, even the same u, since v z E 2 . In addition, z can be any vertex adjacent to v and y any vertex of Γ 2 , but when u , x , and w form a triangle in Γ 1 , there are triangles counted twice for each y N ( v ) , and since z is also any neighbor of v, the number of the triangles counted two times is t 1 ( u ) deg 2 ( v ) . Thus, we get n 2 deg ( v ) x N ( u ) deg ( x ) t 1 ( u ) deg 2 ( v ) triangles.
Observe that these cases may occur simultaneously; when this happens we have u x , u w E 1 and x w E 1 , then u , x , w produce a triangle in Γ 1 . Furthermore, y z , v z E 2 or y z , v y E 2 , which can be read into 2-walks starting at v, but when v , y , and z form a triangle in Γ 2 , such walks are counted twice; this implies that the number of these triangles is t 1 ( u ) 2 ( z N ( v ) deg ( z ) t 2 ( v ) ) . Hence, the number of triangles of type 2 is
m 2 deg 2 ( u ) + n 2 deg ( v ) x N ( u ) deg ( x ) t 1 ( u ) deg 2 ( v ) + 2 z N ( v ) deg ( z ) t 2 ( v ) .
 □
A similar analysis can be done for triangles of type 3, obtaining the next result.
Lemma 7.
The number of triangles of type 3 containing ( u , v ) as a vertex is
m 1 deg 2 ( v ) + n 1 deg ( u ) y N ( v ) deg ( y ) t 2 ( v ) deg 2 ( u ) + 2 w N ( u ) deg ( w ) t 1 ( u ) .
Now, before starting to count triangles that have been considered in two or more cases, we present examples of these. The first graph of Figure 7 shows some triangles that are, at the same time, of type 1 and type 2 in the Cartesian sum of K 5 and K 4 ; they are produced by vertices whose first entries form a triangle in K 4 and their second entries form at least one edge in K 5 . The second one shows triangles of type 1 and type 3; they are produced by vertices such that their first entries form a triangle in K 4 and at least two edges are formed by the second entries in K 5 . The third graph displays triangles of type 1 and type 4; they are formed by vertices such that their first entries form a triangle in K 4 and the second entries form also a triangle in K 5 . The fourth one shows triangles of type 2 and type 3; they are produced by vertices such that the first entries of two of them form an edge in K 4 and the second entries form another in K 5 , and the other two edges are formed by one between the first entries and another between the second ones. The fifth graph displays triangles of type 2 and type 4 that are formed by vertices, such that their first entries form at least two edges in K 4 and the second ones are in a triangle in K 5 . And the last one shows triangles of type 3 and type 4 which are produced by vertices, such that their first entries form at least one edge in K 4 and the second ones are in a triangle in K 5 .
Lemma 8.
The number of triangles of type 1 and 2 that contain ( u , v ) is
t 1 ( u ) 2 m 2 + 2 n 2 deg ( v ) deg 2 ( v ) 2 z N ( v ) deg ( z ) t 2 ( v ) .
Proof. 
Suppose that ( x , y ) and ( w , z ) form a triangle with ( u , v ) , which is both types 1 and 2. Then, u x , u w , x w E 1 , that is, u, x, and w are vertices of a triangle in Γ 1 . Moreover, y z E 2 , v y E 2 or v z E 2 . We proceed by cases.
  • Case 1: if y z E 2 , there is no restriction for y and z, so that y z can be any edge of Γ 2 , counted twice, since it can be considered y z or z y .
  • Case 2: if v y E 2 , y can be any neighbor of v and z any vertex of Γ 2 .
  • Case 3: if v z E 2 , the reasoning is analogous to the last case.
Note that, if y and z are both adjacent to v, they are counted in both cases deg ( v ) times. In addition, if y z , v z E 2 , the first and third situations happen at the same time, or if y z , v y E 2 the first and second happen; this can be interpreted as a 2-walk starting at v. But if v , y , and z form a triangle in Γ 2 , these walks are counted twice. Therefore, the number of triangles that are of type 1 and 2 is
t 1 ( u ) 2 m 2 + 2 n 2 deg ( v ) deg 2 ( v ) 2 z N ( v ) deg ( z ) t 2 ( v ) .
 □
Analogous arguments lead to the next result.
Lemma 9.
The number of triangles of type 3 and 4 that contain ( u , v ) is
t 2 ( v ) 2 m 1 + 2 n 1 deg ( u ) deg 2 ( u ) 2 w N ( u ) deg ( w ) t 1 ( u ) .
Next, we state the correspondent result for triangles of types 1 and 3.
Lemma 10.
For the vertex ( u , v ) , the number of triangles of types 1 and 3 which contain it is
t 1 ( u ) deg 2 ( v ) + 2 y N ( v ) deg ( y ) 2 t 2 ( v ) .
Proof. 
Suppose that ( u , v ) , ( x , y ) , and ( w , z ) form a triangle of type 1, then u x , u w , x w E 1 and the vertices u , x , and w produce a triangle in Γ 1 . Since the triangle of the former vertices is also of type 3, we have that v y , v z E 2 , v y , y z E 2 , or v z , y z E 2 , again by cases.
  • Case 1: if v y , v z E 2 ; then y and z can be any neighbor of v, they may even be the same.
  • Case 2: if v y , y z E 2 , this can be treated as a 2-walk starting at v.
  • Case 3: if v z , y z E 2 , the reasoning is analogous to the last one.
In addition, if v y , v z , and y z occur at the same time, then v , y , and z create a triangle in Γ 2 , and since the triangle given by the edges v y , y z , and v z is the same as that formed by v z , z y , and v y , such a triangle is counted twice. Hence, the number of triangles of types 1 and 3 is
t 1 ( u ) deg 2 ( v ) + 2 y N ( v ) deg ( y ) 2 t 2 ( v ) .
 □
A similar reasoning shows the following result.
Lemma 11.
For the vertex ( u , v ) , the number of triangles of types 2 and 4 which contain it is
t 2 ( v ) deg 2 ( u ) + 2 x N ( u ) deg ( x ) 2 t 1 ( u ) .
Now, we formulate the statement for triangles of types 1 and 4.
Lemma 12.
The number of triangles of types 1 and 4 that have ( u , v ) as a vertex is 2 t 1 ( u ) t 2 ( v ) .
Proof. 
Suppose that the vertices ( u , v ) , ( x , y ) , and ( w , z ) give rise to a triangle of type 1 and 4, then u x , u w , x w E 1 and v y , v z , y z E 2 , that is, u , x , and w form a triangle in Γ 1 and v , y , and z form the same in Γ 2 . Note that ( u , v ) , ( x , z ) , and ( w , y ) is also a triangle of both types 1 and 4 and it is induced by the same triangles in Γ 1 and Γ 2 ; thus, for each triangle in Γ 1 and each triangle in Γ 2 , there are two triangles of type 1 and 4 in Γ . Therefore, the number of these triangles is 2 t 1 ( u ) t 2 ( v ) . □
We continue with triangles of types 2 and 3.
Lemma 13.
The number of triangles of type 2 and 3 that have ( u , v ) as a vertex is
deg 2 ( u ) y N ( v ) deg ( y ) t Γ 2 ( v ) + deg 2 ( v ) x N ( u ) deg ( x ) t 1 ( u ) + x N ( u ) deg ( x ) z N ( v ) deg ( z ) 2 [ t 1 ( u ) t 2 ( v ) + t 1 ( u ) y N ( v ) deg ( y ) t 2 ( v ) + t 2 ( v ) x N ( u ) deg ( x ) t 1 ( u ) ] .
Proof. 
Let ( x , y ) and ( w , z ) be two vertices such that they form a triangle of types 2 and 3 with ( u , v ) . Since such a triangle is of type 2, we have: u x , u w E 1 and y z E 2 , u x , x w E 1 and v z E 2 , or u w , x w E 1 and v y E 2 , and, for type 3: v y , v z E 2 and x w E 1 , v y , y z E 2 and u w E 1 , or v z , y z E 2 and u x E 1 . In this way, we obtain nine cases from which we analyze just three of them, since the others are contained in one of these. The cases are as follows.
  • Case 1: u x , u w E 1 and v y , y z E 2 . For this case, note that x and w can be any neighbor of u, while z is any neighbor of y which, in turn, can be any neighbor of v; this situation can be interpreted as the 2-walk v y z , but if v , y , and z form a triangle in Γ 2 , the triangle produced by ( u , v ) , ( x , y ) , and ( w , z ) , considering such a 2-walk, is counted twice, since it is the same as the triangle formed by ( u , v ) , ( w , z ) , and ( x , y ) with the 2-walk v z y . Thus, there are deg 2 ( u ) y N ( v ) deg ( y ) t 2 ( v ) triangles.
  • Case 2: u x , x w E 1 and v y , v z E 2 . Here, the reasoning is analogous to the last one, obtaining deg 2 ( v ) x N ( u ) deg ( x ) t 1 ( u ) triangles.
  • Case 3: u x , x w E 1 and v z , y z E 2 . In this case, observe that w can be any neighbor of x which, in turn, can be any neighbor of u, which is considered as the 2-walk u x w , while y can be any neighbor of z which, in turn, can be any neighbor of v, obtaining the 2-walk v z y , but, as in the first case, when u , x , and w form a triangle in Γ 1 and when v , y , and z form a triangle in Γ 2 , the 2-walks u x w , u w x , v y z , and v z y determine the two triangles counted twice. Thus, there are x N ( u ) deg ( x ) y N ( v ) deg ( y ) 2 t 1 ( u ) t 2 ( v ) triangles.
Now, we count the triangles when the first and second cases happen at the same time; in this situation, u , x , and w form a triangle in Γ 1 , as well as v , y , and z forming it in Γ 2 ; thus, there are 2 t 1 ( u ) t 2 ( v ) triangles.
When the second and third cases occur simultaneously, v , y , and z create a triangle in Γ 2 , while w can be any neighbor of x which, in turn, can be any neighbor of u, obtaining the 2-walk u x w , and again, when u , x , and w form a triangle in Γ 1 , the 2-walks u x w and u w x determine the same triangle in Γ , which must be counted twice, since the cases u w , x w E 1 and v y , v z E 2 , and u w , x w E 1 and v z , y z E 2 are then the same as the second and third cases, respectively, obtaining 2 t 2 ( v ) x N ( u ) deg ( x ) t 1 ( u ) triangles.
When the first and third cases take place at the same time, an analogous reasoning shows that there are 2 t 2 ( v ) y N ( v ) deg ( y ) t 2 ( v ) triangles.
Finally, if the three cases happen at the same time, u , x , and w form a triangle in Γ 1 and v , y , and z form it in Γ 2 , counting 2 t 1 ( u ) t 2 ( v ) triangles.
Therefore, the number of triangles of type 2 and 3 which contain ( u , v ) as a vertex is
deg 2 ( u ) y N ( v ) deg ( y ) t 2 ( v ) + deg 2 ( v ) x N ( u ) deg ( x ) t 1 ( u ) + x N ( u ) deg ( x ) z N ( v ) deg ( z ) 2 [ t 1 ( u ) t 2 ( v ) + t 1 ( u ) y N ( v ) deg ( y ) t 2 ( v ) + t 2 ( v ) x N ( u ) deg ( x ) t 1 ( u ) ] .
 □
Now, we count considered triangles of three types.
Lemma 14.
For the vertex ( u , v ) , the number of triangles of type 1, 2, and 3 which contain it is
t 1 ( u ) deg 2 ( v ) + 2 y N ( v ) deg ( y ) 2 t 2 ( v ) .
Proof. 
We may note that, if a triangle is of type 1 and 3, it is automatically of type 2; thus, the number of these triangles is given by
t 1 ( u ) deg 2 ( v ) + 2 y N ( v ) deg ( y ) 2 t 2 ( v ) .
 □
Similar considerations can be carried out in order to obtain the next result.
Lemma 15.
For the vertex ( u , v ) , the number of triangles of type 2, 3, and 4 which contain it is
t 2 ( v ) deg 2 ( u ) + 2 x N ( u ) deg ( x ) 2 t 1 ( u ) .
The results of the next lemma follow from the subsequent reasoning: a triangle that is of type 1 and 4, is automatically of types 2 and 3.
Lemma 16.
For the vertex ( u , v ) , the number of triangles of type 1, 2, and 4; 1, 3, and 4; and 1, 2, 3, and 4 which contain it is 2 t 1 ( u ) t 2 ( v ) .
To sum up, we have the next result.
Proposition 3.
The number of triangles in Γ 1 Γ 2 that contain the vertex ( u , v ) is
t ( u , v ) = t 1 ( u ) n 2 2 + 2 y N ( v ) deg ( y ) m 2 + deg 2 ( u ) m 2 + t 2 ( v ) y N ( v ) deg ( y ) + n 1 deg ( u ) y N ( v ) deg ( y ) 2 t 2 ( v ) + t 2 ( v ) n 1 2 + 2 x N ( u ) deg ( x ) m 1 + deg 2 ( v ) m 1 + t 1 ( u ) x N ( u ) deg ( x ) + n 2 deg ( v ) x N ( u ) deg ( x ) 2 t 1 ( u ) x N ( u ) deg ( x ) y N ( v ) deg ( y ) 2 t 1 ( u ) t 2 ( v ) .
The following theorem is an immediate consequence of the aforementioned.
Theorem 3.
Let Γ 1 = ( V 1 , E 1 ) and Γ 2 = ( V 2 , E 2 ) be two graphs, with | V 1 | = n 1 , | E 1 | = m 1 , | V 2 | = n 2 , and | E 2 | = m 2 . If Γ = ( V , E ) denotes the Cartesian sum of Γ 1 Γ 2 and ( u , v ) V , then
I.
The local clustering of ( u , v ) is given by
C ( u , v ) = 2 t ( u , v ) n 1 deg ( v ) + n 2 deg ( u ) deg ( u ) deg ( v ) n 1 deg ( v ) + n 2 deg ( u ) deg ( u ) deg ( v ) 1 ;
II.
And the global clustering of Γ 1 Γ 2 is given by the formula
1 n 1 n 2 i = 1 n 1 j = 1 n 2 2 t ( u , v ) n 1 deg ( v ) + n 2 deg ( u ) deg ( u ) deg ( v ) n 1 deg ( v ) + n 2 deg ( u ) deg ( u ) deg ( v ) 1 ,
where t ( u , v ) is given as in the above proposition.
Example 4.
Consider the two complete graphs K r and K s . Our computations in Proposition 3 show that, for every vertex of Γ 1 Γ 2 , we obtain
t ( u , v ) = ( r 1 ) ( r 2 ) 2 s 2 + 2 ( s 1 ) 2 s ( s 1 ) 2 + ( r 1 ) 2 s ( s 1 ) 2 + ( s 1 ) ( s 2 ) 2 ( s 1 ) 2 + r ( r 1 ) ( s 1 ) 2 2 ( s 1 ) ( s 2 ) 2 + ( s 1 ) ( s 2 ) 2 r 2 + 2 ( r 1 ) 2 r ( r 1 ) 2 + ( s 1 ) 2 r ( r 1 ) 2 + ( r 1 ) ( r 2 ) 2 ( r 1 ) 2 + s ( s 1 ) ( r 1 ) 2 2 ( r 1 ) ( r 2 ) 2 ( r 1 ) 2 ( s 1 ) 2 2 ( r 1 ) ( r 2 ) 2 ( s 1 ) ( s 2 ) 2 = r 2 s 2 3 r s + 2 2 ,
according to the first part of the above theorem, we obtain C ( u , v ) = 1 for every vertex. Hence,
C ( K r K s ) = 1 ,
which obviously coincides with the observation we have already made that K r K s is isomorphic to K r s .

4. Conclusions

In this work, we study the clustering coefficient of some graph products (corona, lexicographic, and Cartesian sum) by computing the number of triangles formed in a vertex in each product. For the lexicographic product and Cartesian sum, we observe that these triangles can be classified into three or four types, respectively, and the computation of this number is carried out by counting the number of triangles of each type. We note that this calculation can be easier or harder, depending on the product considered and the specific type of triangle.
As mentioned in the introduction, this invariant ( C ( Γ ) ) has a lot of applications in areas as diverse as biology, sociology, or computer science, to name a few. Thus, the results obtained in this paper may be used in problems in these fields or in other areas that involve these concepts.

Author Contributions

All authors have contributed equally to the manuscript. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Gribkovskaia, I.; Halskau Sr., Ø.; Laporte, G. The bridges of Königsberg—A historical perspective. Networks 2007, 49, 199–203. [Google Scholar] [CrossRef]
  2. Boulanger, P. Cayley et le calcul des isomères chimiques. Bibliothèque Tangente 2012, 43, 90–92. [Google Scholar]
  3. Rains, E.M.; Sloane, N.J. On Cayley’s enumeration of alkanes (or 4-valent trees). J. Integer Seq. 1999, 2, 9911. [Google Scholar]
  4. Trinajstić, N. Chemical Graph Theory, 2nd ed.; CRC Press: Boca Raton, FL, USA, 1992. [Google Scholar]
  5. Estrada, E. The Structure of Complex Networks, 1st ed.; Oxford University Press: New York, NY, USA, 2011. [Google Scholar]
  6. Newman, M.; Barabási, A.L.; Watts, D.J. The Structure and Dynamics of Networks, 1st ed.; Princeton University Press: Princeton, NJ, USA, 2006. [Google Scholar]
  7. Watts, D.J. Six Degrees: The Science of a Connected Age, 1st ed.; W. W. Norton & Company: New York, NY, USA, 2003. [Google Scholar]
  8. Traver, J.; Milgram, S. An experimental study of the small-world problem. Sociometry 1969, 32, 425–443. [Google Scholar] [CrossRef]
  9. Watts, D.J.; Strogatz, S.H. Collective dynamics of ’small world’ networks. Nature 1998, 393, 440–442. [Google Scholar] [CrossRef] [PubMed]
  10. Van den Heuvel, M.P.; Stam, C.J.; Boersma, M.; Hulshoff Pol, H.E. Small-world and scale-free organization of voxel-based resting-state functional connectivity in the human brain. Neuroimage 2008, 43, 528–539. [Google Scholar] [CrossRef] [PubMed]
  11. Klemm, K.; Eguiluz, V.M. Growing scale-free networks with small-world behavior. Phys. Rev. E 2002, 65, 057102. [Google Scholar] [CrossRef] [PubMed]
  12. Tsitsulin, A.; Palowitch, J.; Perozzi, B.; Müller, E. Graph clustering with graph neural networks. J. Mach. Learn. Res. 2023, 24, 1–21. [Google Scholar]
  13. Liu, J.; Wang, C.; Danilevsky, M.; Han, J. Large-scale spectral clustering on graphs. In Proceedings of the 2013 International Joint Conference on Artificial Intelligence, Beijing, China, 3–9 August 2013. [Google Scholar]
  14. Damalerio, R.J.; Eballe, R.G. Clustering coefficient of the tensor product of graphs. Asian Res. J. Math. 2022, 18, 36–42. [Google Scholar] [CrossRef]
  15. Damalerio, R.J.; Eballe, R.G. Global clustering coefficient of the products of complete graphs. Asian Res. J. Math. 2022, 18, 62–69. [Google Scholar] [CrossRef]
  16. Schaeffer, S.E. Graph clustering. Comput. Sci. Rev. 2007, 1, 27–64. [Google Scholar] [CrossRef]
  17. Frigui, H.; Krishnapuram, R. A robust competitive clustering algorithm with applications in computer vision. IEEE Trans. Pattern Anal. Mach. Intell. 1999, 21, 450–465. [Google Scholar] [CrossRef]
  18. Campanelli, N.; Kuziak, D. Total roman domination in the lexicographic product of graphs. Discret. Appl. Math. 2019, 263, 88–95. [Google Scholar] [CrossRef]
  19. Tarawneh, I.; Hasni, R.; Ahmad, A. On the edge irregularity strength of corona product of graphs with paths. Appl. Math. -Notes 2016, 16, 80–87. [Google Scholar]
  20. De, N. Computing F-Index of different corona products of graphs. Bull. Math. Sci. Appl. 2017, 19, 24–30. [Google Scholar] [CrossRef]
  21. Enriquez, E.L.; Gemina, G.T. Super fair domination in the corona and lexicographic product of graphs. Int. J. Math. Trends Technol. 2020, 66, 203–210. [Google Scholar] [CrossRef]
  22. Kuziak, D.; Yero, I.G.; Rodríguez-Velázquez, J.A. On the strong metric dimension of cartesian sum graphs. Fundam. Informaticae 2015, 141, 57–69. [Google Scholar] [CrossRef]
  23. Aguilar-Alarcón, J.J.; Reyna-Hernández, G.; Romero-Valencia, J.; Rosario-Cayetano, O. The Schultz index for product graphs. Iranian J. Math. Chem. 2022, 13, 1–17. [Google Scholar]
  24. Harary, F. Graph Theory; Addison-Wesley: Reading, MA, USA, 1969. [Google Scholar]
Figure 1. A representation of a graph Γ .
Figure 1. A representation of a graph Γ .
Axioms 12 00968 g001
Figure 2. A representation of the corona product of K 5 with K 4 .
Figure 2. A representation of the corona product of K 5 with K 4 .
Axioms 12 00968 g002
Figure 3. A representation of the lexicographic product of S 3 and P 3 .
Figure 3. A representation of the lexicographic product of S 3 and P 3 .
Axioms 12 00968 g003
Figure 4. Triangles of the three types in the lexicographic product of K 5 and K 4 .
Figure 4. Triangles of the three types in the lexicographic product of K 5 and K 4 .
Axioms 12 00968 g004
Figure 5. The cartesian sum of S 3 and P 3 .
Figure 5. The cartesian sum of S 3 and P 3 .
Axioms 12 00968 g005
Figure 6. Triangles of the four types in the Cartesian sum of K 5 and K 4 .
Figure 6. Triangles of the four types in the Cartesian sum of K 5 and K 4 .
Axioms 12 00968 g006
Figure 7. Triangles that are of two types at the same time in the Cartesian sum of K 5 and K 4 .
Figure 7. Triangles that are of two types at the same time in the Cartesian sum of K 5 and K 4 .
Axioms 12 00968 g007
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Aguilar-Alarcón, J.J.; Hernández-Gómez, J.C.; Romero-Valencia, J. The Clustering Coefficient for Graph Products. Axioms 2023, 12, 968. https://doi.org/10.3390/axioms12100968

AMA Style

Aguilar-Alarcón JJ, Hernández-Gómez JC, Romero-Valencia J. The Clustering Coefficient for Graph Products. Axioms. 2023; 12(10):968. https://doi.org/10.3390/axioms12100968

Chicago/Turabian Style

Aguilar-Alarcón, Jhon J., Juan C. Hernández-Gómez, and Jesús Romero-Valencia. 2023. "The Clustering Coefficient for Graph Products" Axioms 12, no. 10: 968. https://doi.org/10.3390/axioms12100968

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop