User:Barvazomer/sandbox/Degree Centrality

Degree centrality is a way to measure the centrality of a node in a graph, based on the number of connections it has to other nodes. It is calculated as the number of edges that are connected to the node. Nodes with a high degree centrality are considered important because they are connected to a large number of other nodes, potentially making them influential in the spread of information or influence within the network.

Definition
For a node $$v\in V$$ in a social network $$G= (V,E,\mu_G)$$, the degree centrality is defined as :
 * $$X^D_G(v)= \frac{d_v}{\sum_{u\in V}d_u}$$

when $$d_v$$ is defined as the Degree of v.

For a node $$v\in V$$ a weighted graph, centrability is defined as:


 * $$X^D_G(v)= \sum_{(v,u)\in E} \mu _G ((v,u))$$

Calculating degree centrality for all the nodes in a graph takes $\Theta(V^2)$ in a dense adjacency matrix representation of the graph, and for edges takes $$\Theta(E)$$ in a sparse matrix representation.

Indegree and Outdegree Centralities
In the case of a directed network (where ties have direction), we usually define two separate measures of degree centrality, namely indegree and outdegree. Accordingly, indegree is a count of the number of ties directed to the node and outdegree is the number of ties that the node directs to others. When ties are associated to some positive aspects such as friendship or collaboration, indegree is often interpreted as a form of popularity, and outdegree as gregariousness. In such cases, the degree is the sum of the indegree and the outdegree and therefore the degree centrality is the sum of the outdegree and indegree centralities. When speaking about social networks, a higher outdegree points to a more active and important character in the plot.