Question:
Cyclomatic Complexity of a flow graph \(G\) with \(E\) edges and \(N\) nodes and 1 connected component is calculated as:
\(E\) किनारों और \(N\) नोड्स वाले एक प्रवाह ग्राफ का साइक्लोमैटिक जटिलता (Cyclomatic Complexity) सूत्र क्या है?
Options:
- \(V(G) = E – N + 2\)
- \(V(G) = E + N – 2\)
- \(V(G) = E – N + 1\)
- \(V(G) = N – E + 2\)
- \(V(G) = E – N + 2\)
- \(V(G) = E + N – 2\)
- \(V(G) = E – N + 1\)
- \(V(G) = N – E + 2\)
Correct Answer: a)
Explanation:
McCabe’s Cyclomatic Complexity formula for a single connected component is: **\(V(G) = E – N + 2\)** (or \(P + 1\) where \(P\) is predicate nodes) (Option a).
McCabe का साइक्लोमैटिक जटिलता सूत्र: **\(V(G) = E – N + 2\)** होता है (विकल्प a)।