• edited by
3,772 views

1 Answer

Best answer
17 17 votes

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
Position:
Show:

Related questions

2 2 votes
1 1 answer
1.2k
1.2k views
Balaji Jegan asked Jan 20, 2018
1,214 views
Please answer this!Consider the basic block given below:\[\begin{array}{l}b=b+c \\d=b+d \\b=b-d \\e=d+b\end{array}\]The minimum number of nodes and edges present in the D...
0 0 votes
1 1 answer
1.2k
1.2k views
phprashanthans asked Dec 3, 2017
1,164 views
What will be the DAG representation of a=b+c , b= b+c
0 0 votes
1 answers 1 answer
1.2k
1.2k views
thor asked Jan 22, 2017
1,185 views
How does answer change when it is in SSA form? does answer remains 4 or 5
4 4 votes
1 answers 1 answer
4.5k
4.5k views
Tendua asked Dec 21, 2016
4,464 views
How to find unnecessary production while optimising DAG. for ex-a = b * c d = b e = d * c b = e f = b + c g = f + dHow many production need to be removed and how to find ...