# degreeCentrality -- Returns the degreeCentrality of a vertex of a graph

## Synopsis

• Usage:
x = degreeCentrality (G, v)
• Inputs:
• G, an instance of the type Graph,
• v, , v must be a vertex of G
• Outputs:
• x, , x is a real number between 0 and 1

## Description

The degreeCentrality of a vertex of a graph is the degree of a vertex divided by 2 times the number of edges of the graph. Intuitively, this number will give a measure of how "central" a vertex is in a graph. In other words, if a vertex has a relatively high degreeCentrality, it is connected to more vertexSet than other vertexSet of G, so it is more central or a bottleneck in the graph. Note that the sum of the degree centralities must be 1.

 i1 : L = apply(vertexSet pathGraph 5, i -> degreeCentrality (pathGraph 5, i)) 1 1 1 1 1 o1 = {-, -, -, -, -} 8 4 4 4 8 o1 : List i2 : sum L o2 = 1 o2 : QQ

## See also

• center -- Returns the center of a graph
• distance -- Computes the distance between two vertexSet in a graph
• degree

## Ways to use degreeCentrality :

• "degreeCentrality(Graph,Thing)"

## For the programmer

The object degreeCentrality is .