GATE CSE
First time here? Checkout the FAQ!
x
0 votes
96 views
In questions like, when asked to find the edges or nodes in the DAG of following expression,

a=a+b*c-(a+b)+(b*c)

do we also consider "=" as a node and its related edges?
asked in Compiler Design by (371 points)   | 96 views

2 Answers

+1 vote

No,you should not conisder "=" while finding minimum nodes,but if in options you should not find any option without "=",then you may try using "=".

Please refer 

http://gateoverflow.in/2068/gate2014-3_34?show=2068#q2068

https://cs.nyu.edu/~gottlieb/courses/2000s/2006-07-fall/compilers/lectures/lecture-14.html

 

answered by Loyal (3.1k points)  
Thanks :)
0 votes
No we dont consider the equal sign , The answer for it will be , Number of Nodes = 8 , number of edges = 10.
answered by Active (2.2k points)  

Related questions

+1 vote
1 answer
1
0 votes
1 answer
2
asked in Compiler Design by Samujjal Das Boss (7.2k points)   | 59 views


Top Users Mar 2017
  1. rude

    4018 Points

  2. sh!va

    2994 Points

  3. Rahul Jain25

    2804 Points

  4. Kapil

    2608 Points

  5. Debashish Deka

    2104 Points

  6. 2018

    1414 Points

  7. Vignesh Sekar

    1336 Points

  8. Bikram

    1218 Points

  9. Akriti sood

    1186 Points

  10. Sanjay Sharma

    1016 Points

Monthly Topper: Rs. 500 gift card

21,446 questions
26,759 answers
60,943 comments
22,955 users