How to calculate cyclomatic complexity V(G) for a flow graph ,G?

Options
- V(G)= E-N+2
- V(G)= E+N+2
- V= E-N-2
- V(G)= E+N+2


CORRECT ANSWER : V(G)= E-N+2

Discussion Board
V(G)= E-N+2

Cyclomatic complexity is a software metric used to measure the complexity of a program. These metric, measures independent paths through program source code.
Mathematically, it is set of independent paths through the graph diagram. The complexity of the program is defined as -
V(G) = E - N + 2
Where,
E - Number of edges
N - Number of Nodes
V (G) = P + 1
Where P = Number of predicate nodes.

Sapna Ambadkar 03-23-2017 12:37 AM

Write your comments


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)


Advertisement