How to compute the cyclomatic complexity?
The cyclomatic complexity can be computed by any one of the following ways.
1. The numbers of regions of the flow graph correspond to the cyclomatic complexity.
2. Cyclomatic complexity,V(G),for the flow graph G is defined as:
V(G)=E-N+2,
E -- number of flow graph edges,
N -- number of flow graph nodes
3. V(G)=P+1
Where P is the number of predicate nodes contained in the flow graph.