Ticker

6/recent/ticker-posts

McCabe cyclomatic number in software engineering

 

McCabe cyclomatic number in software engineering

A measure of the complexity of a program was developed by McCabe.He developed a system that he called the cyclomatic complexity of a program.This system measures the number of independent paths in a program.

Thomas McCabe who is inventor of cyclomatic complexity. The cyclomatic Number V(G) of graph G may be computed

V(G)=e-n+2p

e=Number of edges.

n=Number of nodes.

p=Total number of strongly connected components.

For a strongly connected component p=2 whereas weakly connected component p=1.

Example

Number of edges(e)=12

Number of nodes(n)=9

Number of component(p)=1

Thus cyclomatic complexity V(G)=e-n+2p=12-9+2(1)=5




Post a Comment

0 Comments