The Gateway to Computer Science Excellence
+4 votes

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

  1. 3
  2. 4
  3. 5
  4. 6
in IS&Software Engineering by Active (1k points)
retagged by | 2.2k views
Do not study this dude, Its out of syllabus.
these questions coming in isro,,,,and other exams
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.

2 Answers

+8 votes
Best answer
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 by
What is e,n,p?
e - edge

n - node

P - component
+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,


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

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

Even this video has same definition.. 

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,737 questions
57,317 answers
105,107 users