Sunday, 7 June 2015

Q4,paper3 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



(A) 4, 5

 (B) 5, 4

(C) 3, 1

 (D) 13, 8



Answer B



Explanation.

E= edges.

N=nodes.

V(g)=e-n+2

V(g)=13-10+2=5
V (G) = P + 1
Where P = Number of predicate nodes (node that contains condition)
Hence p=4.
Number of regions =5.(the cyclomatic complexity.)

No comments:

Post a Comment

Note: only a member of this blog may post a comment.