DegreeCentrality

DegreeCentrality[g]

gives a list of vertex degrees for the vertices in the underlying simple graph of g.

DegreeCentrality[g,"In"]

gives a list of vertex in-degrees.

DegreeCentrality[g,"Out"]

gives a list of vertex out-degrees.

DegreeCentrality[{vw,},]

uses rules vw to specify the graph g.

Details

  • DegreeCentrality will give high centralities to vertices that have high vertex degrees.
  • The vertex degree for a vertex is the number of edges incident to .
  • For a directed graph, the in-degree is the number of incoming edges and the out-degree is the number of outgoing edges.
  • For an undirected graph, in-degree and out-degree coincide.
  • DegreeCentrality works with undirected graphs, directed graphs, multigraphs, and mixed graphs.

Background & Context

  • DegreeCentrality returns a list of non-negative integers ("degree centralities") that are particular centrality measures of the vertices of a graph. Degree centrality is a measure of the centrality of a node in a network and is defined as the number of edges (including self-loops) that lead into or out of the node. Degree centralities therefore lie between and inclusive, where is the number of vertices in a graph, and identify nodes in the network by their influence on other nodes in their immediate neighborhood. This measure has found applications in social networks, transportation, biology, and the social sciences.
  • A second argument "In" or "Out" can be used to give a list of vertex in- or out-degrees, respectively, which correspond to one another for undirected graphs.
  • DegreeCentrality is a local measure that is equivalent to VertexDegree for simple graphs. Similar centrality measures include EigenvectorCentrality and KatzCentrality.

Examples

open allclose all

Basic Examples  (2)

Compute degree centralities:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=

Highlight:

In[3]:=
Click for copyable input
Out[3]=

Rank vertices. Highest-ranked vertices have the most connections to other vertices:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=

Scope  (7)

Applications  (8)

Properties & Relations  (5)

See Also

ClosenessCentrality  BetweennessCentrality  EigenvectorCentrality  KatzCentrality  PageRankCentrality  HITSCentrality  VertexDegree

Introduced in 2010
(8.0)
| Updated in 2015
(10.3)