Directed Acyclic Graphs (DAGs) in compiler design Explained step by step

  Рет қаралды 176,739

LearnVidFun

LearnVidFun

8 жыл бұрын

In this video, we will discuss about Directed Acyclic Graphs commonly known as DAGs and how to construct directed acyclic graphs (DAGs) in compiler design.
Topics covered in the video-
1) What are Directed Acyclic Graphs?
2) Use of Directed Acyclic Graph for optimizing basic blocks
3) Properties of a Directed Acyclic Graph
4) Applications of a Directed Acyclic Graph
5) Rules for the construction of a Directed Acyclic Graph
6) Problems based on Directed Acyclic Graphs
For details, please watch the video.
Get these handwritten notes from website here-
www.gatevidyalay.com/directed...
Click here to get notes-
www.gatevidyalay.com/directed...
Directed Acyclic Graphs is an important topic for semester examination as well as competitive examinations like GATE, NET etc.
Watch the complete Compiler Design Tutorials here-
• Syntax Trees in Compil...
Follow us on-
LearnVidFun Facebook : / learnvidfun
Gate Vidyalay Facebook : / gatevidyalay
Gate Vidyalay Website : www.gatevidyalay.com
For any doubts/ queries, please comment below...
Please...Like, share and comment if you really gained something from this video and don't forget to subscribe yourself for getting the latest updates!
Your support really encourages us to do better....Thank you!! :)

Пікірлер: 383
@LearnVidFun
@LearnVidFun 5 жыл бұрын
In problem-02, there is no need of writing 'a' two times..That is wrong by mistake! So, please correct it..You may check the correct solution in notes available on the website :)
@NiteshSingh5375
@NiteshSingh5375 5 жыл бұрын
KINDLY give direct link of notes also.
@LearnVidFun
@LearnVidFun 5 жыл бұрын
@@NiteshSingh5375 The links for notes are already available in the description of each video :)
@KushChoudhary
@KushChoudhary 4 жыл бұрын
@@NiteshSingh5375 kzbin.info?event=video_description&redir_token=cDNeQXTNk6cRAnXecTYXJQK2c2t8MTU3MzQ0OTQwMUAxNTczMzYzMDAx&q=https%3A%2F%2Fwww.gatevidyalay.com%2Fdirected-acyclic-graphs%2F&v=FOZInDh8Ym0
@dheerajgadwala8874
@dheerajgadwala8874 4 жыл бұрын
at 10:20 in problem 4, why do we need 'd' when we can use 'b'?
@pavan3046
@pavan3046 5 жыл бұрын
Great explanation, thought to just have a glance but the explanation was so good that i forgot about the time and the video was over. Worth watch.
@nikhil1651998
@nikhil1651998 5 жыл бұрын
From handwriting to the explanation everything is just perfect. Thank you so much for the video. One suggestion though - You can increase your speed & decrease the video time (students prefer less video time lectures)
@KushChoudhary
@KushChoudhary 4 жыл бұрын
THen his video will be less monitized, Basically u can increase the speed... I found many educational channels decrease their video speed for this purpose.
@diveshmittal5091
@diveshmittal5091 4 жыл бұрын
@@KushChoudhary ek no 😂😂
@7guitarlover
@7guitarlover 7 жыл бұрын
We really need more tutors like you !! you are awesome !!!
@LearnVidFun
@LearnVidFun 7 жыл бұрын
Thanks a lot dear for your appreciation and support....All the best....Keep learning :)
@Soumodeeps
@Soumodeeps 7 жыл бұрын
You're doing a great work, Sir! Thank you so much for the tutorials.
@LearnVidFun
@LearnVidFun 7 жыл бұрын
Thanks buddy for the appreciation...Keep learning :)
@priyanamdev2911
@priyanamdev2911 6 жыл бұрын
Seriously very good..... I often like youtube tutorials but you are simply great....
@LearnVidFun
@LearnVidFun 6 жыл бұрын
Thanks a lot dear for your appreciation :) Keep learning :)
@BiranchiNarayanNayak
@BiranchiNarayanNayak 7 жыл бұрын
Very well explained in simple and easy way. I am able to understand it very easily being from a non CS branch.
@LearnVidFun
@LearnVidFun 7 жыл бұрын
Thanks a lot buddy for your appreciation..Happy to help you...All the best...Keep learning :)
@adityapangtey3501
@adityapangtey3501 2 жыл бұрын
thank u ,u made it very easy to understand
@gauravdhasmana166
@gauravdhasmana166 5 жыл бұрын
Very good and clear explanation sir. I appreciate your teaching.
@akshayraj3848
@akshayraj3848 7 жыл бұрын
Your doing a great job buddy.. quite helpful.. best of luck.. :)
@LearnVidFun
@LearnVidFun 7 жыл бұрын
Thanks a lot buddy.. :)
@ektapedenti7104
@ektapedenti7104 4 жыл бұрын
Awsm explaination.....
@rajmangukiya114
@rajmangukiya114 5 жыл бұрын
fab video bro..! thanku so much
@suryapratapsingh2114
@suryapratapsingh2114 5 жыл бұрын
Sir your method are wonderful and best
@maahiofficial40
@maahiofficial40 2 жыл бұрын
Ur writing is very gorgeous 👍👍
@rahulchaubey8988
@rahulchaubey8988 5 жыл бұрын
Bhai video bahut achi lagi. Thank you.
@pradyumnakubear5366
@pradyumnakubear5366 5 жыл бұрын
You're awesome bro I understood a lot
@ChandanGupta-oz4ty
@ChandanGupta-oz4ty 6 жыл бұрын
thank you so much your teaching technique is awesome...
@LearnVidFun
@LearnVidFun 6 жыл бұрын
Thanks a lot buddy for your appreciation :) We will keep working hard to make the content available to you people! All the best...Keep learning :)
@mohitgondaliya8600
@mohitgondaliya8600 5 жыл бұрын
sup...b explaination...thakns dude for save my result..
@OmitA25
@OmitA25 5 жыл бұрын
very nice explanation............
@varunsaproo4120
@varunsaproo4120 5 жыл бұрын
at 27:50, isn't the graph obtained in step 6 cyclic???
@UkRrh
@UkRrh 3 жыл бұрын
paper se ek din phly tyari hosaqti ah edr se thank you sir g
@prithvisingh5338
@prithvisingh5338 6 жыл бұрын
Awesome video yar! Thanks and GOD BLESS YOU
@LearnVidFun
@LearnVidFun 6 жыл бұрын
Thanks a lot buddy for your appreciation and blessings! All the best...Keep learning :)
@priyeshtiwari8309
@priyeshtiwari8309 6 жыл бұрын
bro you deserve more subscriber .nice explanation keep doing.
@LearnVidFun
@LearnVidFun 6 жыл бұрын
Thanks a lot buddy for your love and appreciation :) We will keep working hard to make the content available to you people! All the best...Keep learning :)
@anuragchowdhury4101
@anuragchowdhury4101 3 жыл бұрын
Very nicely explained.
@nihalmudhiraj7404
@nihalmudhiraj7404 7 жыл бұрын
Thanks, bro Excellent explanation Good examples
@LearnVidFun
@LearnVidFun 7 жыл бұрын
Thanks a lot for liking it...Please share with your friends! All the best.. :)
@amanchaurasia4645
@amanchaurasia4645 4 жыл бұрын
Unbelievable sir thanks
@nileshbharsawade3242
@nileshbharsawade3242 4 жыл бұрын
thnks man, very useful!
@deepumusic3106
@deepumusic3106 5 жыл бұрын
Vrrrryyyy usefulll vdo for me Tysm sir 😚😚 Gbu🙇🙇🙇
@prasanthbang9462
@prasanthbang9462 5 жыл бұрын
tqs for helping in my sem exams
@sudhamishra9322
@sudhamishra9322 6 жыл бұрын
sir ap bhut achha btate h english bi ir hindi bi..verry nice plz upload more vifeos
@LearnVidFun
@LearnVidFun 6 жыл бұрын
Thanks a lot dear for your appreciation :) Many more videos are coming! They will be uploaded soon! All the best...Keep learning :)
@vishmayvaidya810
@vishmayvaidya810 5 жыл бұрын
Great Teaching
@dalpratapyadav2277
@dalpratapyadav2277 5 жыл бұрын
Nice explanation dude
@gopeshkhandelwal9823
@gopeshkhandelwal9823 5 жыл бұрын
can we remove d=b also in problem 4?
@anjaliverma905
@anjaliverma905 3 жыл бұрын
Really helpful 🤗
@KajalSingh-fx4jf
@KajalSingh-fx4jf 6 жыл бұрын
Excellent work ,it seems just awesome 1 day befr exms...thanks alot
@LearnVidFun
@LearnVidFun 6 жыл бұрын
Happy to help you...All the best! Keep learning :)
@shruthipatkur3620
@shruthipatkur3620 5 жыл бұрын
is dag possible to represent in more than one way??
@anugupta3103
@anugupta3103 5 жыл бұрын
your handwriting
@priyuroy1666
@priyuroy1666 5 жыл бұрын
nice explanation........thankyou
@rajaryan3713
@rajaryan3713 7 жыл бұрын
Sir,your videos are really very helpful.
@LearnVidFun
@LearnVidFun 7 жыл бұрын
Hey dear...Thanks a lot buddy for your appreciation :) All the best...Keep learning :)
@manasvinsharma1740
@manasvinsharma1740 3 жыл бұрын
Best thing is you covered all kinds of question in one video with theory 😃.... But in question 2 there are two duplicate 'a'....
@farzeb1198
@farzeb1198 5 жыл бұрын
Love u man!
@alvinbanerjee8782
@alvinbanerjee8782 5 жыл бұрын
in the second last question. Can we remove d=b and inplace of g=f+d we write g=f+b. In that way we can also remove another statement
@mohnishpali9339
@mohnishpali9339 7 жыл бұрын
nice...i enjoyed the video
@LearnVidFun
@LearnVidFun 7 жыл бұрын
Thanks...Keep learning :)
@DigitalInfotainment
@DigitalInfotainment 7 жыл бұрын
Thanks Brother!! Very well taught..
@LearnVidFun
@LearnVidFun 7 жыл бұрын
Thanks a lot for your appreciation...Keep learning! :)
@kushalrusiya9843
@kushalrusiya9843 7 жыл бұрын
1 more thing, your writting is simple but d most attractive i have ever seen
@LearnVidFun
@LearnVidFun 7 жыл бұрын
Thanks buddy for such a nice compliment... :)
@kushalrusiya9843
@kushalrusiya9843 7 жыл бұрын
+LearnVidFun today was my semester exam...of compiler n i rocked..thank learnvidfun
@LearnVidFun
@LearnVidFun 7 жыл бұрын
Woow...I am glad to hear that! I would love to help you in future as well...Stay tuned! All the best..Keep learning...God bless you :)
@kushalrusiya9843
@kushalrusiya9843 7 жыл бұрын
+LearnVidFun thanks again.. n i ll blessed by dt..
@thelasttimeitookashowerwas7069
@thelasttimeitookashowerwas7069 5 жыл бұрын
Damn buddy, your handwriting is effing good!
@gourav.barkle
@gourav.barkle 4 жыл бұрын
itna saja saja ke likhenge to 3 ghante ke paper main 10 ghante lag jayege
@poojapatil1184
@poojapatil1184 6 жыл бұрын
Thankyou for these videos.
@LearnVidFun
@LearnVidFun 6 жыл бұрын
Keep learning :)
@trojanhorse8278
@trojanhorse8278 3 жыл бұрын
@30:04 we can even reduce one assignment d=b and so the last expression would be g=f+b. Please correct me if I misunderstood.
@ZUBAIRALI-ex4bu
@ZUBAIRALI-ex4bu 7 жыл бұрын
is it necessary thats first we create 3 address code then find its DAG or directly we can find DAG????
@LearnVidFun
@LearnVidFun 7 жыл бұрын
No, it's not necessary for you to first write 3AC when question comes in your exam to draw a DAG for a given expression. You can draw it directly if you can and the question is of less marks....Rest depends on your college faculty...Consult them once! All the best...Keep learning :)
@dolphinextreme48
@dolphinextreme48 5 жыл бұрын
Why do we keep the d=b statement? Is it not redundant? We could replace d with b in the upcoming statements, maybe?
@afzalali2448
@afzalali2448 5 жыл бұрын
Awesome bro
@iamrajagrawal
@iamrajagrawal 6 жыл бұрын
Your explanation is too good...Keep it up :)
@LearnVidFun
@LearnVidFun 6 жыл бұрын
Thanks buddy...Keep learning :)
@vasubhatt6160
@vasubhatt6160 3 жыл бұрын
in problem no. 4 @30:00 why we need d=b?..... because it's redundant, we can use g=f+b in the place of d, then why to keep unnecessary expression d=b? please explain.
@zeeshanzaheer5109
@zeeshanzaheer5109 7 жыл бұрын
luvd it awsome teaching Sir
@LearnVidFun
@LearnVidFun 7 жыл бұрын
Thanks a lot...Keep learning :)
@sourabhbanka
@sourabhbanka 7 жыл бұрын
very good video thanks a lot
@LearnVidFun
@LearnVidFun 7 жыл бұрын
Thanks a lot buddy for your appreciation...Keep learning :)
@suryapratapsingh7106
@suryapratapsingh7106 5 жыл бұрын
can u plz give an example where we have to use the assignment operator in dag
@korviyakshith1166
@korviyakshith1166 4 жыл бұрын
Tq sir 😍
@ashu030991
@ashu030991 7 жыл бұрын
what a handwriting man ... osumm
@LearnVidFun
@LearnVidFun 7 жыл бұрын
Thanks a lot buddy.. :)
@anshulbansal6734
@anshulbansal6734 7 жыл бұрын
great and easy explanation...thanks for sharing... but I have a doubt in question no. 3.... after optimising blocks you drew DAG which do not contain line between 'c' and 'f' I didn't get this 2nd DAG
@LearnVidFun
@LearnVidFun 7 жыл бұрын
I appreciate your learning! Yes, there should should be an edge between 'c' and 'f' for the DAG drawn in problem-4 corresponding to the third statement 'f=a+c' of the optimized code. It has been corrected in the video now! Thanks...All the best..Keep learning! :)
@prateekghamandi8445
@prateekghamandi8445 7 жыл бұрын
good explination. please upload more videos of compiler design of topics like sdt
@LearnVidFun
@LearnVidFun 7 жыл бұрын
Thanks for liking the videos....Many more videos are the way...Till then just subscribe yourself and stay tuned! :)
@shubhamthind8286
@shubhamthind8286 4 жыл бұрын
Nice explanation
@er.gopaljha7758
@er.gopaljha7758 7 жыл бұрын
nice very helpful.... nd plz upload more compiler construction vedio
@LearnVidFun
@LearnVidFun 7 жыл бұрын
Thank you so much for liking...Many more videos are on the way...so just subscribe yourself and stay tuned...All the best :)
@sumitramandal2253
@sumitramandal2253 7 жыл бұрын
thank you so much sir
@LearnVidFun
@LearnVidFun 7 жыл бұрын
Happy to help you... Keep learning :)
@karishmazsweblog5561
@karishmazsweblog5561 7 жыл бұрын
u save me :) thankyou so much
@LearnVidFun
@LearnVidFun 7 жыл бұрын
Happy to help you... Check out the channel for more such videos!! All the best....Keep learning :)
@vishwanathhosmane3834
@vishwanathhosmane3834 3 жыл бұрын
Sir how to draw directed acyclic graph for this expression : -(a+b)*(c+d)+(a+b+c) ?? Plz help.
@rahulsingh4219
@rahulsingh4219 7 жыл бұрын
Awesome explation...😀😁😁
@LearnVidFun
@LearnVidFun 7 жыл бұрын
Thanks a lot buddy! :)
@SHIVAMARORABCE
@SHIVAMARORABCE 7 жыл бұрын
Good Job the great work.
@LearnVidFun
@LearnVidFun 7 жыл бұрын
Thank you for your appreciation :)
@tech_soil3592
@tech_soil3592 5 жыл бұрын
In problem no. 4 , the optimized basic blocks are 1. a=b*c 2. d=b 3. f=a+c 4. g=f+d why don't we eliminate 2 (3 address code) , do we have the need of this code segment .
@raghunathpalyadaw7187
@raghunathpalyadaw7187 5 жыл бұрын
Right Sir....
@rakhisingh516
@rakhisingh516 6 жыл бұрын
Tq so much ....😊
@LearnVidFun
@LearnVidFun 6 жыл бұрын
Glad to help you dear! All the best...Keep learning :)
@shaggyy28
@shaggyy28 7 жыл бұрын
saved my day..
@LearnVidFun
@LearnVidFun 7 жыл бұрын
All the best...Keep learning! :)
@raunakmitra7868
@raunakmitra7868 5 жыл бұрын
It's a lovely presentation, brother. It was so informative😍
@sanjeevkumarsen4838
@sanjeevkumarsen4838 2 жыл бұрын
nice explanation sir ji
@aahanaarush181
@aahanaarush181 7 жыл бұрын
its really easy explanation with general terms & also helpful // but one thing i didnt understand it might b my mistake that in QNS 4 you said (b=e //b is assigned to e but i m confused that b assigned to e or E assigned to B ?)
@LearnVidFun
@LearnVidFun 7 жыл бұрын
Thanks for liking the video! :) Answer to your confusuion: In the statement b=e, '=' is an assignment operator which works from right to left which means that the value of 'e' gets assigned to 'b' and therefore now the value of 'b' becomes equal to 'e'. That is why, at 24:00 in the video, I said "humne b ko e ki value assign kar di hai". I hope now it is absolutely clear to you. Still if you have any doubts, do tell me I'll be happy to help you! All the best...Keep learning :)
@saurabhrajbhar7337
@saurabhrajbhar7337 4 жыл бұрын
there should not be a cycle in DAG but on 11:50 graph contains the cycle why?
@vivekrai4811
@vivekrai4811 5 жыл бұрын
Thanks
@mayurtayde3887
@mayurtayde3887 4 жыл бұрын
sir s7=s3*s6 already prform ho chuka hai qki yeh operation prfor krnese pailehi dag me aagr observe kreto s3 aur s6 already connect hai * ko phr bhi aapne new node q create kiya direct aapne s1,s4 ke side me s7 q nai likha aap chaho to 1 bar 35.37 pe chk kro.............and correct me if i m wrng
@tahamaaftab6412
@tahamaaftab6412 7 жыл бұрын
Thank you so much 😊
@LearnVidFun
@LearnVidFun 7 жыл бұрын
Happy to help you dear! All the best...Keep learning :)
@xiaomichina5884
@xiaomichina5884 5 жыл бұрын
Very beautiful 😍
@biswajitsingh8790
@biswajitsingh8790 7 жыл бұрын
hey bro appreciate ur effort. one request can u please make a video on quadruples,triples and indirect triples?? would be great if u can find some time to make one on this topic!
@LearnVidFun
@LearnVidFun 7 жыл бұрын
Thanks a lot buddy for your appreciation! I will definitely try to make videos on your given topics too!
@Nshree282
@Nshree282 7 жыл бұрын
i am confused about "dead code" will u plzz explain it with example?
@LearnVidFun
@LearnVidFun 7 жыл бұрын
Tell me your confusion in detail referring question number and timing in the video! :)
@atulsharma4848
@atulsharma4848 6 жыл бұрын
Your handwriting is so good
@LearnVidFun
@LearnVidFun 6 жыл бұрын
Thanks a lot for the appreciation! Glad to help you! All the best...Keep learning :)
@abhijeetnikam894
@abhijeetnikam894 7 жыл бұрын
Nice Explaination... :)
@LearnVidFun
@LearnVidFun 7 жыл бұрын
Thank you :)
@AmityCSE-
@AmityCSE- 8 жыл бұрын
nicely explained. Thank you
@LearnVidFun
@LearnVidFun 8 жыл бұрын
Thank you..:)
@shekhargoud5605
@shekhargoud5605 6 жыл бұрын
please send your notes please
@sachinbaraiya1622
@sachinbaraiya1622 5 жыл бұрын
ThankU bhai
@ishitasrivastava3543
@ishitasrivastava3543 5 жыл бұрын
Nice video
@RaviRanjan_ssj4
@RaviRanjan_ssj4 7 жыл бұрын
brilliant !!
@LearnVidFun
@LearnVidFun 7 жыл бұрын
Thanks a lot buddy for the appreciation...!!! All the best...Keep learning :)
@kashishsingh3211
@kashishsingh3211 2 жыл бұрын
thanks
@rajendrakumardangwal8084
@rajendrakumardangwal8084 7 жыл бұрын
In problem 2 cant we take 'a' only once for representing 'a + a'.Plsss help.
@LearnVidFun
@LearnVidFun 7 жыл бұрын
Yes...you are right! In the very starting, we will take only one 'a' to represent 'a+a' because while constructing DAG, a new node will be created only when the node we are about to create does not exists. Please don't be confused. Thank you so much for notifying it! :)
@udsingh3044
@udsingh3044 7 жыл бұрын
NICE EXPLANATION
@LearnVidFun
@LearnVidFun 7 жыл бұрын
Thanks.. :)
@subrotoroy7646
@subrotoroy7646 7 жыл бұрын
how to form a DAG of a negative expression? like in "A=B*-C+B*-C" how will "-C" be represented?
@LearnVidFun
@LearnVidFun 7 жыл бұрын
Hey dear...Just write a 3 address code for the given expression and then construct the DAG...You will get the solution!! We have already solved such problems...Kindly refer the videos :) All the best...Keep learning :)
@SHASHANKRUSTAGII
@SHASHANKRUSTAGII 6 жыл бұрын
i crave for your Handwriting
@LearnVidFun
@LearnVidFun 6 жыл бұрын
Thank you so much buddy for your love! And truly speaking, I crave for the lovely comments from all of you :) Stay tuned...!! All the best...Keep learning :)
@Juhi863
@Juhi863 4 жыл бұрын
Nice sir
@mahendratamta5615
@mahendratamta5615 6 жыл бұрын
Thanks sir..
@LearnVidFun
@LearnVidFun 6 жыл бұрын
Happy to help you dear :) Stay tuned to watch more videos!! All the best...Keep learning :)
@satyavineetha7084
@satyavineetha7084 7 жыл бұрын
GUD explanation
@LearnVidFun
@LearnVidFun 7 жыл бұрын
Thank you...Please share with your friends :)
@rajshrifand3016
@rajshrifand3016 7 жыл бұрын
beautiful explained
@LearnVidFun
@LearnVidFun 7 жыл бұрын
Thanks dear.. :)
@sharkk2979
@sharkk2979 7 жыл бұрын
Good explanation thnks
@LearnVidFun
@LearnVidFun 7 жыл бұрын
Thanks.. :)
@rudraprasadbera6663
@rudraprasadbera6663 7 жыл бұрын
Awesome ...
@LearnVidFun
@LearnVidFun 7 жыл бұрын
Thanks buddy...!! :)
@-Ashish-Singh-
@-Ashish-Singh- 7 жыл бұрын
bawa you're beautiful.. Thnxx bro..
@yashwardhanpauranik1670
@yashwardhanpauranik1670 7 жыл бұрын
Triplings right? :D
@-Ashish-Singh-
@-Ashish-Singh- 7 жыл бұрын
Yashwardhan Pauranik yeah bhai..
@LearnVidFun
@LearnVidFun 7 жыл бұрын
Thanks buddy.. :)
@xidrasid2708
@xidrasid2708 6 жыл бұрын
best explanation :)
@LearnVidFun
@LearnVidFun 6 жыл бұрын
Thanks dear! All the best...Keep learning :)
@ankansharma4897
@ankansharma4897 4 жыл бұрын
your everything thing is perfect, from lecture explanation to writing to example. Just one issue is its very very long, you either increase speed or break lectures and examples into two videos. You deserve much more subscriber but i think time is the main issue. I myself hesitating because its 40 min, though seeing in 2x still feels slow.
ЧУТЬ НЕ УТОНУЛ #shorts
00:27
Паша Осадчий
Рет қаралды 9 МЛН
Who has won ?? 😀 #shortvideo #lizzyisaeva
00:24
Lizzy Isaeva
Рет қаралды 64 МЛН
Double Stacked Pizza @Lionfield @ChefRush
00:33
albert_cancook
Рет қаралды 78 МЛН
Directed Acyclic Graphs (1) - Introduction to DAGs
11:12
Sacha Epskamp
Рет қаралды 22 М.
Directed Acyclic Graphs (DAGs)
20:42
Epidemiology Stuff
Рет қаралды 14 М.
Directed Acyclic Graph ( DAG ) 🔥🔥
9:34
Perfect Computer Engineer
Рет қаралды 71 М.
Compiler Design: DAG Representation of Basic Blocks
14:17
Anita R
Рет қаралды 172 М.
Fastest Way to Learn ANY Programming Language: 80-20 rule
8:24
Sahil & Sarra
Рет қаралды 793 М.