Lably
Skip to content

Clustering coefficient

Measure of how connected and clustered a node is in its graph

  • 5 min read
  • 3 chapters

Related on Lably

Through Social network, Graph (discrete mathematics) and Directed graph

Two versions of this measure exist: the global and the local. The global version was designed to give an overall indication of the clustering in the network, whereas the local gives an indication of the extent of "clustering" of a single node.

Local clustering coefficient

The local clustering coefficient of a vertex (node) in a graph quantifies how close its neighbours are to being a clique (complete graph). Duncan J. Watts and Steven Strogatz introduced the measure in 1998 to determine whether a graph is a small-world network.

A graph G=(V,E) formally consists of a set of vertices V and a set of edges E between them. An edge eij connects vertex vi with vertex vj.

The neighborhood Ni for a vertex vi is defined as its immediately connected neighbours as follows:

Ni={vj:eij∈E∨eji∈E}.

We define ki as |Ni|, the number of vertices in Ni, the neighbourhood of vertex vi.

The local clustering coefficient Ci for a vertex vi is then given by a proportion of the number of links between the vertices within its neighbourhood divided by the number of links that could possibly exist between them. For a directed graph, eij is distinct from eji, and therefore for each neighbourhood Ni there are ki(ki−1) links that could exist among the vertices within the neighbourhood (ki is the number of neighbours of a vertex). Thus, the local clustering coefficient for directed graphs is given as

Ci=|{ejk:vj,vk∈Ni,ejk∈E}|ki(ki−1).

An undirected graph has the property that eij and eji are considered identical. Therefore, if a vertex vi has ki neighbours, ki(ki−1)2 edges could exist among the vertices within the neighbourhood. Thus, the local clustering coefficient for undirected graphs can be defined as

Ci=2|{ejk:vj,vk∈Ni,ejk∈E}|ki(ki−1).

Let λG(v) be the number of triangles on v∈V(G) for undirected graph G. That is, λG(v) is the number of subgraphs of G with 3 edges and 3 vertices, one of which is v. Let τG(v) be the number of triples on v∈G. That is, τG(v) is the number of subgraphs (not necessarily induced) with 2 edges and 3 vertices, one of which is v and such that v is incident to both edges. Then we can also define the clustering coefficient as

Ci=λG(v)τG(v).

It is simple to show that the two preceding definitions are the same, since

τG(v)=C(ki,2)=12ki(ki−1).

These measures are 1 if every neighbour connected to vi is also connected to every other vertex within the neighbourhood, and 0 if no vertex that is connected to vi connects to any other vertex that is connected to vi.

Since any graph is fully specified by its adjacency matrix A, the local clustering coefficient for a simple undirected graph can be expressed in terms of A as:

Ci=1ki(ki−1)∑j,kAijAjkAki

where:

ki=∑jAij

and Ci=0 when ki is zero or one. In the above expression, the numerator counts twice the number of complete triangles that vertex i is involved in. In the denominator, ki2 counts the number of edge pairs that vertex i is involved in plus the number of single edges traversed twice. ki is the number of edges connected to vertex i, and subtracting ki then removes the latter, leaving only a set of edge pairs that could conceivably be connected into triangles. For every such edge pair, there will be another edge pair which could form the same triangle, so the denominator counts twice the number of conceivable triangles that vertex i could be involved in.

Sign in to keep reading

2 more chapters are free with a Lably account.

More in Topics in mathematics