The local clustering coefficient was originally defined on an unweighted, undirected graph—also called a bi-directed network (BUN). A simple BUN has no self-loops and no multiple edges.
Let G = (V, E) be a simple BUN with a set of nodes (vertices) V and a set of edges E.
The degree d i of node i is the number of nodes in V that are adjacent to i. A complete subgraph of three nodes of G is called a triangle. The number of triangles of node i is:
where a ij = 1 if there is an edge from i to j; otherwise a ij = 0.
A triple Ƴ at a node i is a path of length two for which i is the center node. The maximum number of triples of node i is:
The maximum number of triples occurs when every neighbor of node i is connected to every other neighbor of node i.
The clustering coefficient for a node i with d i ≥ 2 is:
c i = δ i / τ i