Degree Centrality

Count direct connections - simplest centrality metric

Degree centrality measures how many connections a node has. For directed graphs, distinguishes in-degree (incoming) and out-degree (outgoing).

What It Computes

For each node:

  • In-degree: Number of incoming edges
  • Out-degree: Number of outgoing edges
  • Total degree: In + out (or just degree for undirected)

When to Use It

  • Quick analysis: Fastest centrality metric
  • Volume metrics: Total activity level
  • Hubs: Nodes with many connections

Performance

Time: O(V)
Space: O(V)
Scales to: Unlimited (trivial operation)

Example

Use Cases

Transaction Volume

Financial: Accounts with highest transaction counts

Social Popularity

Social: Users with most followers (in-degree)

Activity Monitoring

Systems: Services with most connections

Degree vs PageRank

  • Degree: Quantity of connections
  • PageRank: Quality of connections

Example:

  • Node A: 1000 connections from low-value nodes
  • Node B: 10 connections from high-value nodes

Degree → A wins
PageRank → B likely wins

When to Use Each

Use Degree when:

  • Simple volume matters
  • Quick exploration needed
  • Baseline metric before sophisticated analysis

Use PageRank when:

  • Quality matters
  • Influence propagation
  • Ranking by importance

See Also