Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Circuit Rank
The circuit rank (also called the cycle rank or cyclomatic number) of a connected graph tells you how many edges must be removed to eliminate all cycles and produce a spanning tree.
Let G be a connected graph with n vertices and m edges. A spanning tree of G contains exactly (n − 1) edges. Therefore, the number of edges you need to delete from G to get a spanning tree is −
Circuit Rank = m − (n − 1)
This formula works because a spanning tree must have exactly n − 1 edges. The remaining m − (n − 1) edges are the "extra" edges that create cycles in the graph.
Example 1: Direct Calculation
Take a look at the following graph ?
For this graph, m = 7 edges and n = 5 vertices −
Circuit Rank = m - (n - 1)
= 7 - (5 - 1)
= 7 - 4
= 3
This means 3 edges must be removed to eliminate all cycles and obtain a spanning tree (which would have 4 edges).
Example 2: Using Sum of Degrees
Let G be a connected graph with 6 vertices and the degree of each vertex is 3. Find the circuit rank of G.
First, find the number of edges using the sum of degrees theorem −
Sum of degrees = 2 × |E| 6 × 3 = 2 × |E| 18 = 2 × |E| |E| = 9
Now calculate the circuit rank −
Circuit Rank = |E| - (|V| - 1)
= 9 - (6 - 1)
= 9 - 5
= 4
The circuit rank is 4, meaning 4 edges must be removed to make the graph cycle-free.
Conclusion
The circuit rank of a connected graph measures the number of independent cycles in the graph. It equals m − (n − 1), where m is the number of edges and n is the number of vertices. A tree (which has no cycles) always has a circuit rank of 0.
