A flow graph 𝐹 with entry node (1) and exit node (11) is shown below: How…
2019
A flow graph 𝐹 with entry node (1) and exit node (11) is shown below:

How many nodes are there in the longest independent path?
- A.
6
- B.
7
- C.
8
- D.
9
Attempted by 149 students.
Show answer & explanation
Correct answer: C
Answer: 8 nodes.
Explanation:
Interpretation of the diagram: the circle labeled "2,3" represents two distinct nodes, node 2 followed by node 3.
Find a longest simple (independent) path from the entry (1) to the exit (11). One such path is:
1 → 2 → 3 → 6 → 7 → 9 → 10 → 11
Count the nodes on this path: 1, 2, 3, 6, 7, 9, 10, 11 → total = 8 nodes.
There is another equally long path that uses node 8 instead of node 7: 1 → 2 → 3 → 6 → 8 → 9 → 10 → 11 (also 8 nodes).
Why 9 nodes is not possible: nodes 7 and 8 are on parallel branches that both lead into node 9, so a simple path cannot visit both 7 and 8 without repeating nodes. Therefore no path visits 9 distinct nodes.
A video solution is available for this question — log in and enroll to watch it.