in Compiler Design edited by
3,067 views
6 votes
6 votes

A) 2

B)3

C) 4

D) 5

in Compiler Design edited by
by
3.1k views

1 comment

3 Internal node and 1 leaf node
2
2

1 Answer

16 votes
16 votes
Best answer

The idea of making DAG of a given expression is to construct corresponding syntax tree first and then we find the common occurence in the tree and join these common occurence to their common parent ; indicating that the same units are not taken repeatedly..This is shown as follow :

 

Hence number of internal nodes  =  3

Number of leaf node   =   1

Number of edges in DAG  =   6

selected by

1 comment

wow sir such a good question and Great answer
0
0