Discussion
Given a flow graph with 10 nodes, 13 edges and one connected components, the number of regions and the number of predicate (decision) nodes in the flow graph will be
Answer: B
The flow graph has 5 regions and 4 predicate nodes, which is option B. Cyclomatic complexity gives the number of regions as \(V(G) = E - N + 2P\), with E = 13 edges, N = 10 nodes and P = 1 connected component.
\[ V(G) = 13 - 10 + 2 = 5 \]
The number of predicate (decision) nodes is one fewer than the cyclomatic complexity, \(V(G) - 1 = 4\). The pair 4, 5 reverses the two values, and 3, 1 and 13, 8 do not satisfy either formula.
No comment is present. Be the first to comment.
Loading…
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development