The cyclomatic complexity of the following flow graph is:

Solution
The correct answer is 4
Key Points
To determine the cyclomatic complexity of the given flow graph, we can use McCabe's formula: V(G) = E - N + 2P
where:
- V(G) is the cyclomatic complexity.
- E is the number of edges in the graph.
- N is the number of nodes in the graph.
- P is the number of connected components (for a single connected graph, P = 1.
Let's count the number of edges (E) and nodes (N) in the provided flow graph.
1. Count the Nodes (N):
There are 9 nodes labeled from 1 to 10.
2. Count the Edges (E): Counting these, we get 11 edges.
3. Calculate the Cyclomatic Complexity:
Using the formula: V(G) = E - N + 2P
Here, E = 11, N = 9, and P = 1.
V(G) = 11 - 9 + 2 x 1
V(G) = 11 - 9 + 2
V(G) = 4
So, the cyclomatic complexity of the given flow graph is: 2) 4