WOLFRAM

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

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.

Examples

open allclose all

Basic Examples  (2)Summary of the most common use cases

Compute degree centralities:

Out[2]=2

Highlight:

Out[3]=3

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

Out[2]=2

Scope  (7)Survey of the scope of standard use cases

DegreeCentrality works with undirected graphs:

Out[1]=1

Directed graphs:

Out[1]=1

Multigraphs:

Out[1]=1

Mixed graphs:

Out[1]=1

Use rules to specify the graph:

Out[1]=1

Compute in-degree and out-degree:

Out[1]=1
Out[2]=2

DegreeCentrality works with large graphs:

Out[2]=2

Applications  (8)Sample problems that can be solved with this function

Rank vertices by their influence on other vertices in their immediate neighborhood:

Out[2]=2

Highlight the degree centrality for CycleGraph:

Out[4]=4

GridGraph:

Out[7]=7

CompleteKaryTree:

Out[10]=10

PathGraph:

Out[13]=13

A friendship network in a school. Find the most popular students:

Out[3]=3

A citation network from the High Energy Physics Phenomenology section of the arXiv e-Print archive. Find the top 10 most-cited articles:

Out[3]=3

Find the basal species or producers in a food chain:

Out[1]=1
Out[2]=2

Find the top species or apex predators:

Out[3]=3

A network of email sent to the MathGroup list in November 2011. Construct a social network of users, with an edge from to if has sent at least one reply to . Find the users who are the most active at answering questions:

Out[3]=3

Count the users who only received replies and did not send any replies:

Out[4]=4

Find the users who asked questions most often:

Out[6]=6

Count the users who only sent replies and did not receive any replies:

Out[7]=7

The internet at the level of autonomous systems. The frequency of the degree centrality follows a power-law distribution:

Out[3]=3

Obtain the maximum likelihood parameter estimates, assuming a Zipf distribution:

Out[4]=4

Probability density function:

Out[5]=5

For graphs with vertices, the largest sum in differences in degree centrality between the most central vertex and all other vertices is :

Out[2]=2

Measure how central the most central vertex is with respect to other vertices:

Centralization of social networks:

Out[4]=4
Out[5]=5

Properties & Relations  (5)Properties of the function, and connections to other functions

The degree of a vertex of an undirected graph is the number of edges incident to the vertex:

Out[3]=3
Out[4]=4

For an undirected graph, the in-degree and out-degree centralities coincide:

Out[1]=1
Out[2]=2

Use VertexDegree to obtain the degree of a specific vertex:

Out[2]=2

DegreeCentrality is equivalent to VertexDegree for simple graphs:

Out[2]=2

For a directed graph, the sum of in- and out-degree centralities is equal to the vertex degree:

Out[1]=1
Out[2]=2
Out[3]=3
Wolfram Research (2010), DegreeCentrality, Wolfram Language function, https://reference.wolfram.com/language/ref/DegreeCentrality.html (updated 2015).
Wolfram Research (2010), DegreeCentrality, Wolfram Language function, https://reference.wolfram.com/language/ref/DegreeCentrality.html (updated 2015).

Text

Wolfram Research (2010), DegreeCentrality, Wolfram Language function, https://reference.wolfram.com/language/ref/DegreeCentrality.html (updated 2015).

Wolfram Research (2010), DegreeCentrality, Wolfram Language function, https://reference.wolfram.com/language/ref/DegreeCentrality.html (updated 2015).

CMS

Wolfram Language. 2010. "DegreeCentrality." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/DegreeCentrality.html.

Wolfram Language. 2010. "DegreeCentrality." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/DegreeCentrality.html.

APA

Wolfram Language. (2010). DegreeCentrality. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DegreeCentrality.html

Wolfram Language. (2010). DegreeCentrality. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DegreeCentrality.html

BibTeX

@misc{reference.wolfram_2025_degreecentrality, author="Wolfram Research", title="{DegreeCentrality}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/DegreeCentrality.html}", note=[Accessed: 16-April-2025 ]}

@misc{reference.wolfram_2025_degreecentrality, author="Wolfram Research", title="{DegreeCentrality}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/DegreeCentrality.html}", note=[Accessed: 16-April-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_degreecentrality, organization={Wolfram Research}, title={DegreeCentrality}, year={2015}, url={https://reference.wolfram.com/language/ref/DegreeCentrality.html}, note=[Accessed: 16-April-2025 ]}

@online{reference.wolfram_2025_degreecentrality, organization={Wolfram Research}, title={DegreeCentrality}, year={2015}, url={https://reference.wolfram.com/language/ref/DegreeCentrality.html}, note=[Accessed: 16-April-2025 ]}