Selected Reading

Graph Theory - Degree of a Vertex



Degree of a Vertex

The degree of a vertex in a graph is the number of edges incident to the vertex. In simpler terms, it is the count of connections a vertex has with other vertices in the graph.

In different types of graphs, the degree of a vertex can be defined as follows:

  • Undirected Graph: The degree of a vertex is the number of edges connected to it.
  • Directed Graph (Digraph): The degree is divided into: In-degree and Out-degree
  • Multigraph: The degree considers multiple edges between vertices.

Types of Degree

The degree of a vertex can be categorized based on the type of graph −

  • Total Degree ((deg(V))): The total number of edges incident to the vertex.
  • In-degree (deg(V)): The number of edges directed towards the vertex.
  • Out-degree((deg+(V))): The number of edges directed away from the vertex.

Calculating Degree of Undirected Graph

In an undirected graph, the degree of a vertex is simply the count of edges connected to it. For example −

Undirected Graph Degree

The degree of vertex "a" is 2, as it has edges connecting it to vertices "b" and "c".

Calculating Degree of Directed Graph

In a directed graph, we calculate the in-degree and out-degree separately −

Directed Graph Degree

The in-degree and out-degree for each vertex are −

Vertex A: In-degree = 1, Out-degree = 1
Vertex B: In-degree = 1, Out-degree = 1
Vertex C: In-degree = 1, Out-degree = 1
Vertex D: In-degree = 1, Out-degree = 1

Properties of Vertex Degree

The degree of vertices in a graph reveals important properties about the graph −

  • Handshaking Lemma: In any undirected graph, the sum of the degrees of all vertices is twice the number of edges. Mathematically, deg(v) = 2|E|, where |E| is the number of edges.
  • Eulerian Graph: A graph is Eulerian if all vertices have even degrees. This means it contains a Eulerian circuit (a circuit that visits every edge exactly once).
  • Vertex Degree Distribution: The degree distribution of a graph provides a statistical measure of the degrees of the vertices. It can help identify important properties, such as the presence of hubs in networks.

Example of Handshaking Lemma

Consider the following undirected graph −

A - B
|   |
C - D

The degrees of the vertices are −

A: 2
B: 2
C: 2
D: 2

The sum of the degrees is 2 + 2 + 2 + 2 = 8, which is twice the number of edges (4).

Graph Algorithms and Degree

Many graph algorithms rely on the degree of vertices to function effectively. Some examples are −

  • Degree Centrality: An algorithm used to measure the importance of a vertex based on its degree. It is defined as the number of edges incident to the vertex.
  • BFS and DFS: Breadth-First Search (BFS) and Depth-First Search (DFS) use the degree of vertices to explore the graph efficiently.
  • Topological Sorting: In a directed graph, topological sorting uses the in-degrees of vertices to determine the order of processing.
  • Graph Coloring: In graph coloring algorithms, the degree of vertices helps in determining the minimum number of colors needed to color the graph.

Real-World Examples

Let us explore some real-world examples where the degree of a vertex plays an important role −

  • Social Media Networks: In social media platforms like Facebook and Twitter, users are represented as vertices and friendships or followers as edges. The degree of a vertex (user) indicates the number of connections they have, helping identify popular users or influencers.
  • Transportation Networks: In transportation networks, intersections (vertices) and roads (edges) form graphs. The degree of a vertex (intersection) indicates the number of roads connected to it, which is vital for traffic management and route optimization.
  • Telecommunication Networks: In telecommunication networks, the degree of vertices (communication nodes) helps in designing routing algorithms and ensuring connectivity.
  • Biological Networks: In biological networks, proteins or genes (vertices) and their interactions (edges) form graphs. The degree of a vertex helps identify key proteins or genes involved in essential biological processes.
Advertisements