DegreeCentrality - Maple Help

GraphTheory

 DegreeCentrality
 compute degree centrality

 Calling Sequence DegreeCentrality(G) DegreeCentrality(G, v)

Parameters

 G - graph v - (optional) a vertex of G

Description

 • DegreeCentrality returns the degree centrality for a specified vertex in the given graph G, or if no vertex is specified, returns a list of the degree centralities for each vertex in G.
 • The degree centrality of a vertex v is simply the normalized degree of v; that is, the degree of v divided by NumberOfVertices(G)-1.

Examples

 > $\mathrm{with}\left(\mathrm{GraphTheory}\right):$

Compute the degree centrality for a specified graph.

 > $G≔\mathrm{Graph}\left(6,\left\{\left\{1,3\right\},\left\{1,6\right\},\left\{2,4\right\},\left\{2,6\right\},\left\{3,6\right\},\left\{4,5\right\},\left\{4,6\right\},\left\{5,6\right\}\right\}\right)$
 ${G}{≔}{\mathrm{Graph 1: an undirected unweighted graph with 6 vertices and 8 edge\left(s\right)}}$ (1)
 > $\mathrm{DegreeSequence}\left(G\right)$
 $\left[{2}{,}{2}{,}{2}{,}{3}{,}{2}{,}{5}\right]$ (2)
 > $\mathrm{DegreeCentrality}\left(G\right)$
 $\left[\frac{{2}}{{5}}{,}\frac{{2}}{{5}}{,}\frac{{2}}{{5}}{,}\frac{{3}}{{5}}{,}\frac{{2}}{{5}}{,}{1}\right]$ (3)

Compatibility

 • The GraphTheory[DegreeCentrality] command was introduced in Maple 2020.