DegreeCentrality
✖
DegreeCentrality
gives a list of vertex degrees for the vertices in the underlying simple graph of 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 allBasic Examples (2)Summary of the most common use cases

https://wolfram.com/xid/0dc1llwye4ji-dprrh4

https://wolfram.com/xid/0dc1llwye4ji-3cvhh


https://wolfram.com/xid/0dc1llwye4ji-cut8tc

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

https://wolfram.com/xid/0dc1llwye4ji-gtfc0a

https://wolfram.com/xid/0dc1llwye4ji-hv6u0b

Scope (7)Survey of the scope of standard use cases
DegreeCentrality works with undirected graphs:

https://wolfram.com/xid/0dc1llwye4ji-u3xie


https://wolfram.com/xid/0dc1llwye4ji-cv4paj


https://wolfram.com/xid/0dc1llwye4ji-15kl6n


https://wolfram.com/xid/0dc1llwye4ji-czvddh

Use rules to specify the graph:

https://wolfram.com/xid/0dc1llwye4ji-bndh30

Compute in-degree and out-degree:

https://wolfram.com/xid/0dc1llwye4ji-dg57i


https://wolfram.com/xid/0dc1llwye4ji-l3awc2

DegreeCentrality works with large graphs:

https://wolfram.com/xid/0dc1llwye4ji-pq9ae

https://wolfram.com/xid/0dc1llwye4ji-c57uis

Applications (8)Sample problems that can be solved with this function
Rank vertices by their influence on other vertices in their immediate neighborhood:

https://wolfram.com/xid/0dc1llwye4ji-61b1r

https://wolfram.com/xid/0dc1llwye4ji-blo3c5

Highlight the degree centrality for CycleGraph:

https://wolfram.com/xid/0dc1llwye4ji-gzipus

https://wolfram.com/xid/0dc1llwye4ji-baipzx

https://wolfram.com/xid/0dc1llwye4ji-g2btke

https://wolfram.com/xid/0dc1llwye4ji-h351s2


https://wolfram.com/xid/0dc1llwye4ji-jbz7i6

https://wolfram.com/xid/0dc1llwye4ji-brg6kn

https://wolfram.com/xid/0dc1llwye4ji-hyiutu


https://wolfram.com/xid/0dc1llwye4ji-gca8u7

https://wolfram.com/xid/0dc1llwye4ji-gcylrp

https://wolfram.com/xid/0dc1llwye4ji-bp9wqg


https://wolfram.com/xid/0dc1llwye4ji-6ri66

https://wolfram.com/xid/0dc1llwye4ji-fh33ql

https://wolfram.com/xid/0dc1llwye4ji-iop80

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

https://wolfram.com/xid/0dc1llwye4ji-b0y0qv

https://wolfram.com/xid/0dc1llwye4ji-brq4tb

https://wolfram.com/xid/0dc1llwye4ji-fhkbog

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

https://wolfram.com/xid/0dc1llwye4ji-cs8b9l

https://wolfram.com/xid/0dc1llwye4ji-fxhma1

https://wolfram.com/xid/0dc1llwye4ji-o3hqni

Find the basal species or producers in a food chain:

https://wolfram.com/xid/0dc1llwye4ji-487f9


https://wolfram.com/xid/0dc1llwye4ji-fs2rhp

Find the top species or apex predators:

https://wolfram.com/xid/0dc1llwye4ji-e6fkts

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:

https://wolfram.com/xid/0dc1llwye4ji-ioc7z3

https://wolfram.com/xid/0dc1llwye4ji-bp4sus

https://wolfram.com/xid/0dc1llwye4ji-x82id

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

https://wolfram.com/xid/0dc1llwye4ji-b42lvi

Find the users who asked questions most often:

https://wolfram.com/xid/0dc1llwye4ji-b9dj1m

https://wolfram.com/xid/0dc1llwye4ji-hhr3gl

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

https://wolfram.com/xid/0dc1llwye4ji-e4ozbr

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

https://wolfram.com/xid/0dc1llwye4ji-utja1r

https://wolfram.com/xid/0dc1llwye4ji-cpr5lo

https://wolfram.com/xid/0dc1llwye4ji-4s9n3t

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

https://wolfram.com/xid/0dc1llwye4ji-bshqkk


https://wolfram.com/xid/0dc1llwye4ji-jmzqu9

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

https://wolfram.com/xid/0dc1llwye4ji-bnwnr6

https://wolfram.com/xid/0dc1llwye4ji-hjjk46

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

https://wolfram.com/xid/0dc1llwye4ji-bll44s
Centralization of social networks:

https://wolfram.com/xid/0dc1llwye4ji-lx0mlw


https://wolfram.com/xid/0dc1llwye4ji-o4377y

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:

https://wolfram.com/xid/0dc1llwye4ji-lqjjtr

https://wolfram.com/xid/0dc1llwye4ji-lhhinl


https://wolfram.com/xid/0dc1llwye4ji-2m6rf

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

https://wolfram.com/xid/0dc1llwye4ji-nch4i7


https://wolfram.com/xid/0dc1llwye4ji-h4bqa

Use VertexDegree to obtain the degree of a specific vertex:

https://wolfram.com/xid/0dc1llwye4ji-szwpd

https://wolfram.com/xid/0dc1llwye4ji-inlsn1

DegreeCentrality is equivalent to VertexDegree for simple graphs:

https://wolfram.com/xid/0dc1llwye4ji-30cgq

https://wolfram.com/xid/0dc1llwye4ji-lw9k

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

https://wolfram.com/xid/0dc1llwye4ji-c7g75m


https://wolfram.com/xid/0dc1llwye4ji-c59sh6


https://wolfram.com/xid/0dc1llwye4ji-cpgi3p

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
]}
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
]}