GATE CSE
First time here? Checkout the FAQ!
x
0 votes
80 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)   | 80 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

0 votes
1 answer
1
asked in Compiler Design by Samujjal Das Boss (6.8k points)   | 52 views
+6 votes
0 answers
3
Top Users Feb 2017
  1. Arjun

    5278 Points

  2. Bikram

    4230 Points

  3. Habibkhan

    3942 Points

  4. Aboveallplayer

    3086 Points

  5. Debashish Deka

    2378 Points

  6. sriv_shubham

    2308 Points

  7. Smriti012

    2236 Points

  8. Arnabi

    2008 Points

  9. sh!va

    1672 Points

  10. mcjoshi

    1660 Points

Monthly Topper: Rs. 500 gift card

20,856 questions
26,009 answers
59,671 comments
22,107 users