in IS&Software Engineering retagged by
258 views
0 votes
0 votes

McCabe’s cyclomatic complexity number of a program control graph ‘$G$’ with $e$edges, $n$ nodes and $p$ disconnected paths is defined as

  1. $n – e + 2p$
  2. $e – n + 2 + p$
  3. $e – n +2p$
  4. $n – e + p$
in IS&Software Engineering retagged by
by
258 views

1 Answer

1 vote
1 vote

McCabe's Cyclomatic Complexity (V) is defined as:

V=E−N+2P

Where:

  • E is the number of edges in the program control flow graph.
  • N is the number of nodes in the program control flow graph.
  • P is the number of connected components (disjoint subgraphs or independent paths) in the graph.
  • So, for a program control graph with E edges, N nodes, and P disconnected paths, you would use these values in the formula to calculate the cyclomatic complexity V.

Related questions

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