- 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 - Girth and Circumference
Girth of a Graph
The girth of a graph is defined as the length of the shortest cycle within the graph. If the graph does not contain any cycles (i.e., it is acyclic), its girth is considered to be infinite.
Girth provides details of the smallest cyclic structure within the graph, which is useful in various graph theory applications and analyses.
Calculating the Girth
To compute the girth of a graph, follow these steps −
- Identify all cycles in the graph.
- Determine the length of each cycle.
- The girth is the length of the shortest cycle.
Example: Simple Graph Girth
Consider the following graph with 6 vertices −
Let us identify the cycles in the graph −
- Cycle 1: 1 - 2 - 3 - 1 (length = 3)
- Cycle 2: 2 - 3 - 4 - 2 (length = 3)
- Cycle 3: 3 - 4 - 5 - 3 (length = 3)
- Cycle 4: 2 - 3 - 5 - 2 (length = 3)
- Cycle 5: 2 - 3 - 5 - 4 - 2 (length = 4)
Therefore, the girth of the graph is 3, as the shortest cycles have a length of 3.
Importance of Girth
Understanding the girth of a graph is important for various reasons −
- It provides information about the smallest cycle in the graph, which is crucial for cycle detection algorithms.
- Graphs with large girths are sparse and have fewer short cycles, which is important in network design and analysis.
- Girth is used in studying extremal graph theory and properties of random graphs.
Girth in Tree
A tree is a connected graph with no cycles. Therefore, the girth of any tree is infinite, as there are no cycles present. Trees have the property that there is exactly one path between any pair of vertices, making them minimally connected. A tree with n vertices has exactly n1 edges.
For example, consider the following tree graph −
Since the graph has no cycles, its girth is infinite.
Girth of Complete Graphs
A complete graph Kn is a graph where there is an edge between every pair of vertices. The girth of a complete graph with more than 2 vertices is 3, as any three vertices form a triangle, which is the shortest cycle.
Girth of Bipartite Graphs
A bipartite graph is a graph whose vertices can be divided into two disjoint sets such that no two graph vertices within the same set are adjacent.
If a bipartite graph contains cycles, all such cycles must be of even length. The girth of a bipartite graph is the length of its shortest cycle, which will be an even number.
Circumference of a Graph
The circumference of a graph is defined as the length of the longest cycle within the graph. If the graph does not contain any cycles, its circumference is considered to be zero.
Circumference helps in identifying the largest cyclic structure within the graph, providing details into the overall structure and complexity of the graph.
Calculating the Circumference
To compute the circumference of a graph, follow these steps −
- Identify all cycles in the graph.
- Determine the length of each cycle.
- The circumference is the length of the longest cycle.
Example: Simple Graph Circumference
Consider the same graph used in the girth example. We previously identified the cycles in the graph −
- Cycle 1: 1 - 2 - 3 - 1 (length = 3)
- Cycle 2: 2 - 3 - 4 - 2 (length = 3)
- Cycle 3: 3 - 4 - 5 - 3 (length = 3)
- Cycle 4: 2 - 3 - 5 - 2 (length = 3)
- Cycle 5: 2 - 3 - 5 - 4 - 2 (length = 4)
Therefore, the circumference of the graph is 4, as the longest cycle has a length of 4.
Importance of Circumference
Understanding the circumference of a graph is important for several reasons, they are −
- It provides information about the largest cycle in the graph, which is crucial for analyzing the graph's complexity.
- Graphs with large circumferences are complex and have long cyclic structures, which is important in network analysis and design.
- Circumference is used in studying the properties of random graphs and extremal graph theory.
Circumference of Tree
As trees do not contain any cycles, their circumference is not defined. Trees are acyclic by definition, which is why their girth is infinite and circumference is considered nonexistent (zero).
Circumference of Complete Graphs
In a complete graph Kn, the longest cycle includes all n vertices. Therefore, the circumference of a complete graph Kn is n, as every vertex can be included in the cycle.
Circumference of Cyclic Graphs
In a cycle graph Cn (a single cycle with n vertices), the circumference is n, as this is the only cycle present. For more complex cyclic graphs, the circumference is the length of the longest cycle found within the graph.
In this graph, the circumference is 3.
Girth and Circumference of Various Graphs
Here are some examples of calculating the girth and circumference in different types of graphs −
| Graph Type | Girth | Circumference |
|---|---|---|
| Path Graph | Infinite (no cycles) | 0 (no cycles) |
| Star Graph | Infinite (no cycles) | 0 (no cycles) |
| Wheel Graph | 3 (smallest cycle) | n (cycle through all vertices) |
| Grid Graph | 4 (smallest square cycle) | Depends on grid dimensions |