GlobalClusteringCoefficient[g]
gives the global clustering coefficient of the graph g.
GlobalClusteringCoefficient[{vw,…}]
uses rules vw to specify the graph g.
GlobalClusteringCoefficient
GlobalClusteringCoefficient[g]
gives the global clustering coefficient of the graph g.
GlobalClusteringCoefficient[{vw,…}]
uses rules vw to specify the graph g.
Details
- GlobalClusteringCoefficient is also known as clustering coefficient.
- GlobalClusteringCoefficient is typically used to quantify the level of transitivity in a graph.
- The global clustering coefficient of g is the fraction of paths of length two in g that are closed over all paths of length two in g.
- GlobalClusteringCoefficient works with undirected graphs, directed graphs, and multigraphs.
Examples
open all close allBasic Examples (2)
Find the global clustering coefficient of a graph:
GlobalClusteringCoefficient[[image]]Global clustering coefficient of the Watts–Strogatz model as a function of rewiring probability:
Plot[GlobalClusteringCoefficient[RandomGraph[WattsStrogatzGraphDistribution[10 ^ 3, p, 5]]], {p, 0, 1}, MaxRecursion -> 0]Scope (5)
GlobalClusteringCoefficient works with undirected graphs:
GlobalClusteringCoefficient[[image]]GlobalClusteringCoefficient[[image]]GlobalClusteringCoefficient[[image]]Use rules to specify the graph:
GlobalClusteringCoefficient[{1 -> 2, 1 -> 3, 2 -> 3, 2 -> 4, 3 -> 1, 3 -> 4}]GlobalClusteringCoefficient works with large graphs:
CirculantGraph[10000, Range[20]];GlobalClusteringCoefficient[%]//TimingProperties & Relations (6)
The global clustering coefficient is between 0 and 1:
RandomGraph[UniformGraphDistribution[10, 20]]N[GlobalClusteringCoefficient[%]]The global clustering coefficient for a graph with no paths of length two is 0:
Graph[{12, 34, 56}]GlobalClusteringCoefficient[%]The global clustering coefficient of a complete graph with at least three vertices is 1:
CompleteGraph[5]GlobalClusteringCoefficient[%]Distribution of global clustering coefficient in BernoulliGraphDistribution:
𝒟 = GraphPropertyDistribution[GlobalClusteringCoefficient[g], gBernoulliGraphDistribution[8, 0.6]];Histogram[RandomVariate[𝒟, 1000]]NExpectation[x, x𝒟]Distribution of a global clustering coefficient in WattsStrogatzGraphDistribution:
𝒟[n_, p_, k_] := GraphPropertyDistribution[GlobalClusteringCoefficient[g], gWattsStrogatzGraphDistribution[n, p, k]];Histogram[RandomVariate[𝒟[50, 0.05, 3], 1000]]With low rewiring probability and high mean vertex degree, the expected value is near
:
NExpectation[x, x𝒟[100, 0.01, 20]]With high rewiring probability, the expected value is near 0:
NExpectation[x, x𝒟[100, 0.99, 2]]Distribution of a global clustering coefficient in BarabasiAlbertGraphDistribution:
𝒢 = BarabasiAlbertGraphDistribution[100, 10];data = RandomVariate[GraphPropertyDistribution[GlobalClusteringCoefficient[g], g𝒢], 1000];Histogram[data]Compare with MeanClusteringCoefficient:
data2 = RandomVariate[GraphPropertyDistribution[MeanClusteringCoefficient[g], g𝒢], 1000];Histogram[{data, data2}]Related Guides
Text
Wolfram Research (2012), GlobalClusteringCoefficient, Wolfram Language function, https://reference.wolfram.com/language/ref/GlobalClusteringCoefficient.html (updated 2015).
CMS
Wolfram Language. 2012. "GlobalClusteringCoefficient." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/GlobalClusteringCoefficient.html.
APA
Wolfram Language. (2012). GlobalClusteringCoefficient. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/GlobalClusteringCoefficient.html
BibTeX
@misc{reference.wolfram_2026_globalclusteringcoefficient, author="Wolfram Research", title="{GlobalClusteringCoefficient}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/GlobalClusteringCoefficient.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_globalclusteringcoefficient, organization={Wolfram Research}, title={GlobalClusteringCoefficient}, year={2015}, url={https://reference.wolfram.com/language/ref/GlobalClusteringCoefficient.html}, note=[Accessed: 13-June-2026]}