edited by
3,050 views

1 Answer

Best answer
16 votes
16 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

Related questions

2 votes
2 votes
1 answer
1
0 votes
0 votes
1 answer
2
phprashanthans asked Dec 3, 2017
851 views
What will be the DAG representation of a=b+c , b= b+c
0 votes
0 votes
1 answer
3
thor asked Jan 22, 2017
642 views
How does answer change when it is in SSA form? does answer remains 4 or 5
4 votes
4 votes
1 answer
4
Tendua asked Dec 21, 2016
2,817 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 ...