- Graph Theory - Home
- Graph Theory - Introduction
- Graph Theory - History
- Graph Theory - Fundamentals
- Graph Theory - Applications
- Types of Graphs
- Graph Theory - Types of Graphs
- Graph Theory - Simple Graphs
- Graph Theory - Multi-graphs
- Graph Theory - Directed Graphs
- Graph Theory - Weighted Graphs
- Graph Theory - Bipartite Graphs
- Graph Theory - Complete Graphs
- Graph Theory - Subgraphs
- Graph Theory - Trees
- Graph Theory - Forests
- Graph Theory - Planar Graphs
- Graph Theory - Hypergraphs
- Graph Theory - Infinite Graphs
- Graph Theory - Random Graphs
- Graph Representation
- Graph Theory - Graph Representation
- Graph Theory - Adjacency Matrix
- Graph Theory - Adjacency List
- Graph Theory - Incidence Matrix
- Graph Theory - Edge List
- Graph Theory - Compact Representation
- Graph Theory - Incidence Structure
- Graph Theory - Matrix-Tree Theorem
- Graph Properties
- Graph Theory - Basic Properties
- Graph Theory - Coverings
- Graph Theory - Matchings
- Graph Theory - Independent Sets
- Graph Theory - Traversability
- Graph Theory Connectivity
- Graph Theory - Connectivity
- Graph Theory - Vertex Connectivity
- Graph Theory - Edge Connectivity
- Graph Theory - k-Connected Graphs
- Graph Theory - 2-Vertex-Connected Graphs
- Graph Theory - 2-Edge-Connected Graphs
- Graph Theory - Strongly Connected Graphs
- Graph Theory - Weakly Connected Graphs
- Graph Theory - Connectivity in Planar Graphs
- Graph Theory - Connectivity in Dynamic Graphs
- Special Graphs
- Graph Theory - Regular Graphs
- Graph Theory - Complete Bipartite Graphs
- Graph Theory - Chordal Graphs
- Graph Theory - Line Graphs
- Graph Theory - Complement Graphs
- Graph Theory - Graph Products
- Graph Theory - Petersen Graph
- Graph Theory - Cayley Graphs
- Graph Theory - De Bruijn Graphs
- Graph Algorithms
- Graph Theory - Graph Algorithms
- Graph Theory - Breadth-First Search
- Graph Theory - Depth-First Search (DFS)
- Graph Theory - Dijkstra's Algorithm
- Graph Theory - Bellman-Ford Algorithm
- Graph Theory - Floyd-Warshall Algorithm
- Graph Theory - Johnson's Algorithm
- Graph Theory - A* Search Algorithm
- Graph Theory - Kruskal's Algorithm
- Graph Theory - Prim's Algorithm
- Graph Theory - Borůvka's Algorithm
- Graph Theory - Ford-Fulkerson Algorithm
- Graph Theory - Edmonds-Karp Algorithm
- Graph Theory - Push-Relabel Algorithm
- Graph Theory - Dinic's Algorithm
- Graph Theory - Hopcroft-Karp Algorithm
- Graph Theory - Tarjan's Algorithm
- Graph Theory - Kosaraju's Algorithm
- Graph Theory - Karger's Algorithm
- Graph Coloring
- Graph Theory - Coloring
- Graph Theory - Edge Coloring
- Graph Theory - Total Coloring
- Graph Theory - Greedy Coloring
- Graph Theory - Four Color Theorem
- Graph Theory - Coloring Bipartite Graphs
- Graph Theory - List Coloring
- Advanced Topics of Graph Theory
- Graph Theory - Chromatic Number
- Graph Theory - Chromatic Polynomial
- Graph Theory - Graph Labeling
- Graph Theory - Planarity & Kuratowski's Theorem
- Graph Theory - Planarity Testing Algorithms
- Graph Theory - Graph Embedding
- Graph Theory - Graph Minors
- Graph Theory - Isomorphism
- Spectral Graph Theory
- Graph Theory - Graph Laplacians
- Graph Theory - Cheeger's Inequality
- Graph Theory - Graph Clustering
- Graph Theory - Graph Partitioning
- Graph Theory - Tree Decomposition
- Graph Theory - Treewidth
- Graph Theory - Branchwidth
- Graph Theory - Graph Drawings
- Graph Theory - Force-Directed Methods
- Graph Theory - Layered Graph Drawing
- Graph Theory - Orthogonal Graph Drawing
- Graph Theory - Examples
- Computational Complexity of Graph
- Graph Theory - Time Complexity
- Graph Theory - Space Complexity
- Graph Theory - NP-Complete Problems
- Graph Theory - Approximation Algorithms
- Graph Theory - Parallel & Distributed Algorithms
- Graph Theory - Algorithm Optimization
- Graphs in Computer Science
- Graph Theory - Data Structures for Graphs
- Graph Theory - Graph Implementations
- Graph Theory - Graph Databases
- Graph Theory - Query Languages
- Graph Algorithms in Machine Learning
- Graph Neural Networks
- Graph Theory - Link Prediction
- Graph-Based Clustering
- Graph Theory - PageRank Algorithm
- Graph Theory - HITS Algorithm
- Graph Theory - Social Network Analysis
- Graph Theory - Centrality Measures
- Graph Theory - Community Detection
- Graph Theory - Influence Maximization
- Graph Theory - Graph Compression
- Graph Theory Real-World Applications
- Graph Theory - Network Routing
- Graph Theory - Traffic Flow
- Graph Theory - Web Crawling Data Structures
- Graph Theory - Computer Vision
- Graph Theory - Recommendation Systems
- Graph Theory - Biological Networks
- Graph Theory - Social Networks
- Graph Theory - Smart Grids
- Graph Theory - Telecommunications
- Graph Theory - Knowledge Graphs
- Graph Theory - Game Theory
- Graph Theory - Urban Planning
- Graph Theory Useful Resources
- Graph Theory - Quick Guide
- Graph Theory - Useful Resources
- Graph Theory - Discussion
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 −
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 −
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.