GATE CSE
First time here? Checkout the FAQ!
x
0 votes
153 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 (385 points)   | 153 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 (4.9k 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 (8k points)   | 71 views


Top Users Jun 2017
  1. Bikram

    3704 Points

  2. Hemant Parihar

    1502 Points

  3. junaid ahmad

    1432 Points

  4. Arnab Bhadra

    1416 Points

  5. Niraj Singh 2

    1391 Points

  6. Debashish Deka

    1246 Points

  7. Rupendra Choudhary

    1194 Points

  8. rahul sharma 5

    1158 Points

  9. Arjun

    956 Points

  10. srestha

    950 Points

Monthly Topper: Rs. 500 gift card
Top Users 2017 Jun 19 - 25
  1. Bikram

    1960 Points

  2. Niraj Singh 2

    1386 Points

  3. junaid ahmad

    502 Points

  4. Debashish Deka

    414 Points

  5. sudsho

    410 Points


23,373 questions
30,079 answers
67,406 comments
28,396 users