edited by
10,389 views
2 votes
2 votes

Which one of the following statements is incorrect?

  1. The number of regions corresponds to the cyclomatic complexity
  2. Cyclomatic complexity for a flow graph $G$ is $V(G)=N-E+2$, where E is the number of edges and N is the number of nodes in flow graph.
  3. Cyclomatic complexity for a flow graph $G$ is $V(G)=E-N+2$, where E is the number of edges and N is the number of nodes in flow graph.
  4. Cyclomatic complexity for a flow graph $G$ is $V(G)=P+1$, where P is the number of predicate nodes contained in the flow graph G.
edited by

3 Answers

Best answer
10 votes
10 votes

Answer : Cyclomatic complexity for a flow graph G is V(G)=E-N+2, where E is the number of edges and N is the number of nodes in flow graph.

Cyclomatic complexity is a software metric (measurement), used to indicate the complexity of a program

Cyclomatic complexity = E - N + P 
where,
  E = number of edges in the flow graph.
  N = number of nodes in the flow graph.
  P = number of nodes that have exit points

Reference : Cyclomatic Complexity

edited by
1 votes
1 votes

A. IS CORRECT COZ CP=# OF REGIONS OR # OF CLOSED REGIONS + 1

B IS INCORRECT....

C. IS CORRECT AS IT IS THE EASY WAY TO CALCULATE IF EDGE, NODES ARE GIVEN

D. IS CORRECT COZ CP =# OF DECISION STATEMENTS + 1 OR # OF PREDICATE NODES + 1

Answer:

Related questions

1 votes
1 votes
1 answer
2
go_editor asked Jul 7, 2016
1,464 views
Are we building the right product? – This statement refers toVerificationValidationTestingSoftware quality assurance
2 votes
2 votes
2 answers
3
1 votes
1 votes
2 answers
4