edited by
419 views
2 votes
2 votes

A flow graph $F$ with entry node $(1)$ and exit node $(11)$ is shown below:

How many predicate nodes are there and what are their names?

  1. Three: $(1,(2,3),6)$
  2. Three: $(1,4,6)$
  3. Four: $((2,3), 6, 10, 11)$
  4. Four: $((2,3), 6, 9, 10)$
edited by

2 Answers

1 votes
1 votes
In the flow graph predicate (decision) node, those nodes that have out-degree are $\geq$ 2.

Note: Out degree of vertex = number of outgoing edges.

In given flow graph $F$  three predicate node present:$(1,(2,3),6)$

Option $(A)$ is correct.
1 votes
1 votes

Concept
Predicate node is a node that contains a condition. This node has 2 or more outgoing edges from it.
Explanation
In the given graph, the nodes with a condition or with 2 or more outgoing edges are – 1, (2.3), 6.
Hence, there are 3 predicate nodes.

Related questions

1 votes
1 votes
2 answers
1
4 votes
4 votes
6 answers
3
soujanyareddy13 asked May 12, 2021
1,920 views
The Boolean expression $AB+A \overline{B}+\overline{A}C+AC$ is unaffected by the value of the Boolean variable _________.$A$$B$$C$$A, B$ and $C$