Skip to content
Part IA Lent Term

Degree and Clustering Coefficient

Degree

The 2025 exam graph showing nodes A through H with computed degree, clustering coefficient, and diameter values

Definition: kik_i = number of edges incident to node ii. For undirected graphs, this is simply the count of neighbours. For directed graphs, separate into in-degree (kiink_i^{\text{in}}) and out-degree (kioutk_i^{\text{out}}).

Interpretation: the simplest measure of a node’s local connectivity or “importance”. Nodes with high degree are local hubs. Degree alone does not tell you whether the neighbours are connected to each other — that requires the clustering coefficient.

Local Clustering Coefficient

Definition: the fraction of a node’s neighbours that are connected to each other.

Ci=2eiki(ki1)C_i = \frac{2e_i}{k_i(k_i - 1)}

where:

  • eie_i = number of edges between the neighbours of node ii.
  • ki(ki1)/2k_i(k_i - 1)/2 = total number of possible edges between kik_i neighbours (the number of unique unordered pairs of neighbours).

Interpretation:

  • Ci=0C_i = 0: none of ii‘s neighbours are connected to each other. ii is like the centre of a star.
  • Ci=1C_i = 1: all of ii‘s neighbours form a complete subgraph (a clique). Every pair of neighbours is directly connected.
  • For a node with ki<2k_i < 2, the denominator is 0, so CiC_i is undefined. By convention, Ci=0C_i = 0 for such nodes (or they are excluded from the average).

What it measures: the degree of triadic closure around node ii. High CiC_i means ii‘s friends are also friends with each other — characteristic of close-knit social groups. Low CiC_i means ii connects otherwise disconnected people — characteristic of brokers or connectors.

Worked Example: 2025 Q8 Graph

Graph edges: A–B, A–E, B–C, B–F, C–D, D–F, D–H, F–G, G–H, C–F.

Node A

kA=2k_A = 2 (neighbours: B and E).

Edges between neighbours {B,E}\{B, E\}: is there a B–E edge? No.

eA=0CA=2021=0e_A = 0 \qquad C_A = \frac{2 \cdot 0}{2 \cdot 1} = 0

A’s neighbours are not connected to each other. A is like the centre of a “V” shape spanning B and E.

Node C

kC=3k_C = 3 (neighbours: B, D, F).

Edges among {B,D,F}\{B, D, F\}:

  • B–F: yes (edge exists).
  • B–D: no (no direct edge).
  • D–F: yes (edge exists).

eC=2possible pairs=322=3CC=2232=46=0.667e_C = 2 \qquad \text{possible pairs} = \frac{3 \cdot 2}{2} = 3 \qquad C_C = \frac{2 \cdot 2}{3 \cdot 2} = \frac{4}{6} = 0.667

C’s neighbours are well-connected: 2 out of 3 possible edges exist. Only the B–D edge is missing. This reflects that C sits within a fairly tight social cluster.

Node H

kH=2k_H = 2 (neighbours: D and G).

Edges between neighbours {D,G}\{D, G\}: is there a D–G edge? No (D connects to H and F; G connects to H and F; D and G are not directly connected).

eH=0CH=2021=0e_H = 0 \qquad C_H = \frac{2 \cdot 0}{2 \cdot 1} = 0

H is at the end of the D–H–G branch with no closure between its two neighbours.

Measuring Overall Clustering

To measure the degree to which nodes form clusters in a network, compute the average local clustering coefficient over all nodes with ki2k_i \geq 2:

Cˉ=1{i:ki2}i:ki2Ci\bar{C} = \frac{1}{|\{i : k_i \geq 2\}|} \sum_{i: k_i \geq 2} C_i

There are other measures (global clustering coefficient, transitivity ratio), but the local clustering coefficient is the one required for MLRD exam answers. Social networks have high Cˉ\bar{C} (often 0.1–0.5); technological and information networks have low Cˉ\bar{C}.

Summary

MeasureFormulaNode ANode CNode H
Degree kik_iCount of incident edges232
eie_iEdges between neighbours020
Possible pairski(ki1)/2k_i(k_i-1)/2131
CiC_i2ei/(ki(ki1))2e_i / (k_i(k_i-1))00.6670.6670
InterpretationStar centrePartial cliqueLeaf

Past paper questions: y2025p3q8