LinkRankCentrality[g,α]
gives the link-rank centralities for edges in the graph g and weight α.
LinkRankCentrality[g,α,β]
gives the link-rank centralities, using weight α and initial vertex page-rank centralities β.
LinkRankCentrality[{vw,…},…]
uses rules vw to specify the graph g.
LinkRankCentrality
LinkRankCentrality[g,α]
gives the link-rank centralities for edges in the graph g and weight α.
LinkRankCentrality[g,α,β]
gives the link-rank centralities, using weight α and initial vertex page-rank centralities β.
LinkRankCentrality[{vw,…},…]
uses rules vw to specify the graph g.
Details and Options
- Link-rank centralities represent the likelihood that a person randomly follows a particular link on the web graph.
- Link rank is a way of measuring the importance of links between vertices.
- The link-rank centrality of an edge is the page-rank centrality of its source vertex, divided by its out-degree.
- If β is a scalar, it is taken to mean {β,β,…}.
- LinkRankCentrality[g,α] is equivalent to LinkRankCentrality[g,α,1/VertexCount[g]].
- Link-rank centralities are normalized.
- The option WorkingPrecision->p can be used to control the precision used in internal computations.
- LinkRankCentrality works with undirected graphs, directed graphs, multigraphs, and mixed graphs.
Examples
open all close allBasic Examples (2)
Compute link-rank centralities:
g = ExampleData[{"NetworkGraph", "Friendship"}];LinkRankCentrality[g, 0.1]coloring = {EdgeList[g], Map[ColorData["TemperatureMap"], Rescale[%]]};HighlightGraph[g, Style[Style @@@ Transpose[coloring], Thick]]Find the probability that a random surfer follows that link:
g = [image];Part[LinkRankCentrality[g, 0.85], EdgeIndex[g, "map.wolfram""wolframalpha.com"]]Rank web links, with the most visible links first:
Part[EdgeList[g], Ordering[LinkRankCentrality[g, 0.85], All, Greater]]//ShortScope (7)
LinkRankCentrality works with undirected graphs:
LinkRankCentrality[[image], 0.5]LinkRankCentrality[[image], 0.5]LinkRankCentrality[[image], 0.5]LinkRankCentrality[[image], 0.5]Use rules to specify the graph:
LinkRankCentrality[{1 -> 3, 2 -> 1, 3 -> 6, 4 -> 6, 1 -> 5, 5 -> 4, 6 -> 1}, 0.5]Nondefault initial centralities:
LinkRankCentrality[[image], 0.5, {0.1, 0.2, 0.3, 0.1, 0.2, 0.1}]LinkRankCentrality works with large graphs:
g = GridGraph[{10, 10, 10, 10}];LinkRankCentrality[g, 0.5]//Short//TimingOptions (3)
WorkingPrecision (3)
By default, LinkRankCentrality finds centralities using machine-precision computations:
LinkRankCentrality[[image], 1 / 10]Specify a higher working precision:
LinkRankCentrality[[image], 1 / 10, WorkingPrecision -> 50]Infinite working precision corresponds to exact computation:
LinkRankCentrality[[image], 1 / 10, WorkingPrecision -> ∞]Applications (2)
Highlight the link-rank centrality for CycleGraph:
HighlightCentrality[g_, cc_] := HighlightGraph[g, Table[Style[EdgeList[g][[i]], ColorData["TemperatureMap"][cc[[i]] / Max[cc]]], {i, EdgeCount[g]}]];g = CycleGraph[8, DirectedEdges -> True];cc = LinkRankCentrality[g, 0.5];HighlightCentrality[g, cc]g = GridGraph[{10, 10}, DirectedEdges -> True];cc = LinkRankCentrality[g, 0.5];HighlightCentrality[g, cc]g = CompleteKaryTree[3, 3, DirectedEdges -> True];cc = LinkRankCentrality[g, 0.5];HighlightCentrality[g, cc]g = PathGraph[Range[20], DirectedEdges -> True];cc = LinkRankCentrality[g, 0.5];HighlightCentrality[g, cc]Rank website links based on the likelihood that a random surfer follows that link:
g = [image];SortBy[{EdgeList[g], LinkRankCentrality[g, 0.85]}, Last]//ReverseProperties & Relations (2)
LinkRankCentrality can be found using PageRankCentrality:
g = WheelGraph[6]LinkRankCentrality[g, 0.85]With[{c = PageRankCentrality[g, 0.85]}, c[[VertexIndex[g, #]]] / VertexOutDegree[g, #]& /@ (First /@ EdgeList[g])]Use EdgeIndex to obtain the centrality of a specific vertex:
g = ExampleData[{"NetworkGraph", "Friendship"}];LinkRankCentrality[g, 0.5][[EdgeIndex[g, "Anna""Rudy"]]]Related Guides
Text
Wolfram Research (2014), LinkRankCentrality, Wolfram Language function, https://reference.wolfram.com/language/ref/LinkRankCentrality.html (updated 2015).
CMS
Wolfram Language. 2014. "LinkRankCentrality." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/LinkRankCentrality.html.
APA
Wolfram Language. (2014). LinkRankCentrality. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/LinkRankCentrality.html
BibTeX
@misc{reference.wolfram_2026_linkrankcentrality, author="Wolfram Research", title="{LinkRankCentrality}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/LinkRankCentrality.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_linkrankcentrality, organization={Wolfram Research}, title={LinkRankCentrality}, year={2015}, url={https://reference.wolfram.com/language/ref/LinkRankCentrality.html}, note=[Accessed: 13-June-2026]}