2.2k views

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

1. 3
2. 4
3. 5
4. 6

retagged | 2.2k views
0
Do not study this dude, Its out of syllabus.
+3
these questions coming in isro,,,,and other exams
+1
Not really. This question is from s/w engineering  and the anzwer is 4. As the no.  Of regions is 4. Three inner and one outer.

Cyclomatic complexity = e - n + 2 p

= 7 - 5 + 2(1)

= 4

Or cyclomatic complexity is the number of regions enclosed = 4
by Veteran (50.9k points)
selected
0
What is e,n,p?
0
e - edge

n - node

P - component
0
Yes.

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
by Active (2.9k points)
0

But this video from nptel has a different definition. watch at 11:34 sec .

Even this video has same definition..