retagged by
4,319 views
5 votes
5 votes

The Cyclomatic Complexity metric V(G) of the following control flow graph

  1. 3
  2. 4
  3. 5
  4. 6
retagged by

2 Answers

Best answer
9 votes
9 votes
Cyclomatic complexity = e - n + 2 p

= 7 - 5 + 2(1)

= 4

Or cyclomatic complexity is the number of regions enclosed = 4
selected by
8 votes
8 votes

Cyclomatic complexity is a software metric (measurement), used to indicate the complexity of a program.Cyclomatic complexity is computed using the control flow graph of the program

The complexity M is then defined as

M = E − N + 2P,

where

E = the number of edges of the graph.
N = the number of nodes of the graph.
P = the number of connected components.
 
Cyclomatic complexity(M) = E − N + 2P,
=7-5+2(1)=4
Answer:

Related questions

4 votes
4 votes
2 answers
1
Ishrat Jahan asked Nov 3, 2014
2,782 views
Tb carry out white box testing of a program, its flow chart representation is obtained as shown in the figure below:For basis path based testing of this program, its cycl...
6 votes
6 votes
2 answers
2
go_editor asked Jun 23, 2016
3,302 views
Warnier Diagram enables the analyst to representClass structureInformation HierarchyData FlowState Transition
6 votes
6 votes
2 answers
3
go_editor asked Jun 22, 2016
5,087 views
Black Box Software Testing method focuses on theBoundary condition of the softwareControl structure of the softwareFunctional requirement of the softwareIndependent paths...
4 votes
4 votes
2 answers
4
go_editor asked Jun 22, 2016
4,245 views
The above figure represents which one of the following UML diagram for a single send session of an online chat system?Package diagramActivity diagramClass diagramSequence...