The Gateway to Computer Science Excellence
+2 votes
2k views

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 | 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.

2 Answers

+7 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.6k points)
selected by
+6 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
by Active (2.8k points)
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,648 questions
56,460 answers
195,340 comments
100,198 users