Initially the code without any Optimization is :
a = b * c
d = b
e = d * c
b = e
f = b + c
g = f + d
DAG for this can be drawn like :
This DAG consists of $6$ Nodes and $8$ Edges.
If some Optimization is done on the code, then I can write the final code as :
a = b * c
e = b * c
f = e + c
g = f + b
(Either 1st or 2nd instruction can be removed. If anyone of them is not removed, then it won't affect)
DAG for this can be drawn like :
This DAG consists of $5$ Nodes and $6$ Edges.