> library("igraph")
> g <- barabasi.game(5000)
> centralization.betweenness(g)$theoretical_max
[1] 345973414
> centralization.betweenness(g)$centralization
[1] 0.07282635
> g <- barabasi.game(10000)
> centralization.betweenness(g)$theoretical_max
[1] -1127329970
> centralization.betweenness(g)$centralization
[1] -0.02273176
> sessionInfo()
R version 2.15.2 (2012-10-26)
Platform: x86_64-w64-mingw32/x64 (64-bit)
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] igraph_0.6-3
loaded via a namespace (and not attached):
[1] tools_2.15.2