4.1 MultiStage Graph - Dynamic Programming

  Рет қаралды 1,003,395

Abdul Bari

Abdul Bari

Күн бұрын

Multistage Graph Problem
Solved using Dynamic Programming
Forward Method
PATREON : www.patreon.co...
Courses on Udemy
================
Java Programming
www.udemy.com/...
Data Structures using C and C++
www.udemy.com/...
C++ Programming
www.udemy.com/...

Пікірлер: 379
@marykapodistria7204
@marykapodistria7204 3 жыл бұрын
the best videos on DP. You have a great charisma. Thank you for all your videos.
@ABRAHAMMENGISTU-A1M
@ABRAHAMMENGISTU-A1M 16 күн бұрын
Hi
@gurashishanand3082
@gurashishanand3082 Жыл бұрын
Sir, may you have the most wonderful life ahead. We need more professors like you.
@kinglygaurav
@kinglygaurav 4 жыл бұрын
The reason the books are messed up and so confusing is because they start at the formula that you described at 16:47 haha. Thank you for your patient teaching sir. You rock!
@shashanksagarjha2807
@shashanksagarjha2807 4 жыл бұрын
please watch this playlist for detailed explanation of dynamic programming..kzbin.info/aero/PLeF0b8iqbx4mTBJZ5ukIYj92_B4k2L1-8..
@RizzyClipz
@RizzyClipz 3 жыл бұрын
@@shashanksagarjha2807 uour link doesn't work
@shashanksagarjha2807
@shashanksagarjha2807 3 жыл бұрын
@@RizzyClipz Please check this: kzbin.info/aero/PLeF0b8iqbx4mTBJZ5ukIYj92_B4k2L1-8
@N-e0N
@N-e0N 3 жыл бұрын
@Luka Karsyn @Enoch Kobe STFU BOTS.
@sachinfulsunge9977
@sachinfulsunge9977 2 жыл бұрын
He teleported at 16:44
@reyvanadryan2513
@reyvanadryan2513 4 жыл бұрын
I've got my degree, because of people like you sir! Thanks a lot!
@thomasdante9309
@thomasdante9309 Жыл бұрын
Probably the clearest explanation on Multi Stage Graphs out there. Much easier to understand than ones that use too much technical jargon.
@shambhaviojha92
@shambhaviojha92 3 жыл бұрын
Sir your explanation was very simple, to the point and easy to learn. Thank you for making dynamic programming easy and fun😀
@Abin_oommen
@Abin_oommen 2 жыл бұрын
Cool
@aamgaming1238
@aamgaming1238 Жыл бұрын
😊😮
@eugeniaancilla351
@eugeniaancilla351 Жыл бұрын
Your explanation on the topic of multistage graph really helps me understand the topic better. I really like your approach to explaining the topic, where you explain the topic using an example first, then give the formula afterward. This helps me understand the concept instead of just following a formula. Your explanation makes this complicated topic look so simple, thank you for your clear explanation!
@davithov
@davithov 2 жыл бұрын
I think you should start teaching teachers how to teach.
@rajime1645
@rajime1645 5 ай бұрын
Nowadays teachers are working hard but students are not showing their interest
@ChandanGowda-f1x
@ChandanGowda-f1x 3 ай бұрын
I guess ur teacher​@@rajime1645
@kanishqsoni
@kanishqsoni 2 ай бұрын
Teachers are already studying by him
@shrikantdamale1859
@shrikantdamale1859 21 күн бұрын
He is
@jimmylander2089
@jimmylander2089 4 жыл бұрын
Algorithms is such an interesting subject to explore. It disappoints me greatly how little passion my lecturers seem to have for teaching it. During the corona virus lockdown they abandoned us students (they did not organize any online activity or chat) and did not provide us with any materials to study from or upload any videos (all we had were the presentations which naturally had little to no information in them). Not that they were very good teachers in the first place. Regardless, thank you for these wonderful videos!
@rheinokatili8120
@rheinokatili8120 Жыл бұрын
Another excellent video. It's really amazing how you can explain the process of solving multistage graphs with ease. The way it uses dynamic programming as the forward technique to solve the problem has got to be my favourite.
@avinashshankarbharadwaj6064
@avinashshankarbharadwaj6064 6 жыл бұрын
This is possibly the best video to watch and understand multistage graphs. Thank you so much!
@devanshusachdev9190
@devanshusachdev9190 6 жыл бұрын
Sir your way of explaining methods is too good.... I have to cover the whole syllabus of daa within 2 weeks and following your lectures,I think i can do it.... Thank u soo much sir for putting so much efforts for us....
@almostnoob6986
@almostnoob6986 3 жыл бұрын
I have my exam tomorrow... and here I am
@manojramesh4598
@manojramesh4598 2 жыл бұрын
@@almostnoob6986 so am i
@yz1938
@yz1938 3 жыл бұрын
How much do I wish you were my algorithm professor...you explain things in such a clear and precise manner. It is an art
@kadelchess42
@kadelchess42 2 ай бұрын
Many of the cuts are horrendous, but you make absolutely up for it by being splendid! Thanks a lot sir for the great, clear explanations.
@vincentl94
@vincentl94 Жыл бұрын
The explaination is very clear, the textbook formula makes it really confusing, but the way you explain it makes the formula make sense.
@ambatikalyani2317
@ambatikalyani2317 25 күн бұрын
The way he teaches is outof the box
@swathivenkatesh465
@swathivenkatesh465 6 жыл бұрын
Superb sir..you have taught the multistage graph very easily..Thank you
@nathanraditya7288
@nathanraditya7288 Жыл бұрын
This video cleared up the couple of things I had a hard time understanding. Your explanations are very easy to understand.
@chinmaydas4053
@chinmaydas4053 6 жыл бұрын
Sir you are awesome, great, explain actual algorithm problems.. actually helpful..
@TheKevin12343
@TheKevin12343 5 жыл бұрын
One of the best explanation available on internet.
@MrWorld-4
@MrWorld-4 2 жыл бұрын
I don't have such a beautiful words to introduce the beauty of your teaching I love you my respected sir ❤️❤️❤️
@eliasq11421
@eliasq11421 5 жыл бұрын
Thanks to you and your videos I was able to approve Programming 3! I'm glad of finding your channel on KZbin.
@y.so.sarthak
@y.so.sarthak 3 жыл бұрын
sir u donno but ye videos humm jaise students li life changing hoti hai
@sharathnagendran3754
@sharathnagendran3754 2 жыл бұрын
Abdul guru ji. You are the best teacher that I have seen so far.
@alica5796
@alica5796 Жыл бұрын
Thank you for the clear explaination on Multistage Graph sir Abdul! This helps me to understand the topic a lot better, especially on the part where you show us the example first and then the formula. It’s very detailed yet its not making the topic becomes complicated, instead, it becomes simpler. Thank you sir!
@ridhishjain8886
@ridhishjain8886 3 жыл бұрын
me kafi time se dhoondh rha google, YT pr graph modelling kya cheej h, GS coding round me aai thi cost and graphs related.............. finally ye video mili.....and dil ko sukoon bhi
@santoshbehara2589
@santoshbehara2589 6 жыл бұрын
Peaceful explanation 😃
@Danish-saifi1
@Danish-saifi1 Жыл бұрын
By peaceful community
@vallurideepak3677
@vallurideepak3677 4 жыл бұрын
sir we are expecting network flow algorithm for you hopefully we would be waiting for it, most of the students from our collage were following your lectures and your teaching is simply awesome
@huajinqu7883
@huajinqu7883 5 жыл бұрын
you explained the complex concept so easily. a lot of respects Sir
@SamJam-24
@SamJam-24 5 жыл бұрын
DAA Ki devudu sir meru 🙏🙏
@akhilhenry1844
@akhilhenry1844 4 жыл бұрын
Nijame
@sheharyardawar4463
@sheharyardawar4463 4 жыл бұрын
wow
@devanlucian1598
@devanlucian1598 Жыл бұрын
This video is very helpful, Although at first i was intimidated by the graph, at the end of the video I understand how to solve a problem like this. I liked how after the example, you gave the equation and explained clearly what the symbols are, which was very easy to understand since you started with the example first, hence not intimidating people with a sudden equation that they may or may not know where it came from. Thank you for the great explanation sir.
@anshuprakash5022
@anshuprakash5022 6 жыл бұрын
Wow... Amazing crystal cleared sir, huge respect.. 🙏🙏🙏🙏
@rohittechlife6415
@rohittechlife6415 4 жыл бұрын
Best teacher than our school professor
@bobitttt
@bobitttt Жыл бұрын
Thank you for your detailed explanation; it helped me understand the process.
@esther.vemberly
@esther.vemberly Жыл бұрын
Thank you sir for the clear explanation, Sir! I like how you gave the formula after you had explained the steps with the graph and table, instead of giving it right away at the start. I also understand better how dynamic programming works in this multistage graph because you emphasized it at the end.
@AnitShrestha
@AnitShrestha 5 жыл бұрын
I was finding it hard to visualize any problem in terms of Dynamic Programming technique as I was not able see how a problem 1. has an optimal substructure 2. has overlapping subproblems that are two criteria for a problem to identify that it could solved through dynamic programming. This presentation indeed has added a lot of value in terms of clarifying some of my confusions. The description of the function to find the optimum solution in the end of the video has been a lot of help as I could read a lot of such statement in many other sources but was not able to relate them overall in my thinking or analysis of the problem solving process. Explanation is of the highest quality, being clean and precise. Thank you very much!
@AnitShrestha
@AnitShrestha 5 жыл бұрын
@@abdul_bari I have already done that Sir. Thank you. I am just looking at your comments on the notification and replying to ones I can find. Thank you again.
@ashishkumaryadav5252
@ashishkumaryadav5252 Жыл бұрын
Sir greedy work karti to hai, hum nodes ko min heap me store karte hai aur kisi bhi node ka distance tabhi finalise hota hai jab hum use min heap se pop karle, jaise first time distance 25 aaya to vo final thodi hua hai hum aur nodes ko min heap se pop karenge or check karenge ki isse better option hai kya, similar to dijkstra to isse time complexity better hi aaegi in comparison to (V^2). Do you agree?
@asterynn941
@asterynn941 Жыл бұрын
you always give clear explanation, the topics in your videos are easy to understand. and i appreciate you drawing the graphs since it's super helpful
@justinevan9750
@justinevan9750 Жыл бұрын
Thank you so much for the lecture sir, your videos are really helpful especially because you give detailed and easy to follow explanations. My favorite part is when you explain about the shortest path with forward method vertex by vertex. It helps a lot!
@seanwijaya2404
@seanwijaya2404 Жыл бұрын
Thank you sir for the clear explanation. Because of this video I now understand better about dynamic programming and multistage graph specifically. I really like how you explained it by walking us through all the steps with simple examples which makes it easy to understand.
@raymondp2809
@raymondp2809 Жыл бұрын
Very clear and concise explanation as always. Made me really understand more about how to obtain the formula with the way you teach. Thanks.
@nathanjlee5247
@nathanjlee5247 Жыл бұрын
Thank you sir! A very elegant demonstration of Dynamic Programming and path storing. It was also very cool how you derived the formula from the process you already did, makes it so much more intuitive than just a bunch of fancy letters. Math would've been so much easier if it followed this teaching style :P
@shawnyasha7715
@shawnyasha7715 Жыл бұрын
Thank you, sir. Your explanation is really clear about the multistage graph where you teach from the basics of how to do the table, the formula, and the sequence of decisions because it is needed in dynamic programming .
@avenger1898
@avenger1898 12 күн бұрын
Really helpful sir ,No one teaches like you sir .
@timothyliundi1893
@timothyliundi1893 Жыл бұрын
Thank you so much sir. I'm confused at first on what is "c( )" and the difference with "cost( )". But then at 14:39 you explained it and it cleared the confusion. I like how after the tough finding each and every minimum path on each vertex, using "d( )" you can easily trace the minimum path. Your explanation is very easy to understand. What a take up and way to express!
@SRNR_PODCAST.
@SRNR_PODCAST. 3 жыл бұрын
a gold mine in KZbin.
@shubhambatham49
@shubhambatham49 4 жыл бұрын
I have seen people in the comment section mentioning other ways to solve the problem.With an attempt to further clarification.I have attempted filling the table from the source and got exactly the same result.And to those mentioning that it is easier using Dijkstra, I agree, but Dijkstra is going to take slightly more time considering the additional updations required for each node, oterwise it is just fine.
@aubreysitepu5249
@aubreysitepu5249 Жыл бұрын
The video provide a very clear explanation about the problem and solution. Every minute I spend watching is very insightful. Thank you for making this video sir!
@ShubhamYadav-eq8gs
@ShubhamYadav-eq8gs 4 жыл бұрын
Your teaching methodology is really good....
@blekekok
@blekekok Жыл бұрын
Thank you sir for this. Your teachings are always straightforward and understandable :)
@spartaninfo3273
@spartaninfo3273 10 ай бұрын
sir, ur explanation is rod.you r making simple problem into complex with your way of explanation.
@jason-yb9qk
@jason-yb9qk Жыл бұрын
The explanation is very easy to understand. Very helpful video for a computer science student like me. Thanks a lot sir!
@cs_39_sharma_priyansh75
@cs_39_sharma_priyansh75 Жыл бұрын
Sir very very veryyyyy good explanation thank you sir you are life saver no one can explain better than you
@tutuStillLearning
@tutuStillLearning 4 ай бұрын
That's sooo clear! Thank you sir and thank you for all your videos!
@egidiusvico9313
@egidiusvico9313 Жыл бұрын
Thanks for the lecture on the multistage graph topic. your videos are always clear and easily understandable and the examples you provide helps me understand the topic even furhter
@carlac1482
@carlac1482 Жыл бұрын
Your video is very helpful, sir! it's clear and simple. The explanation for each steps are very detailed and it's easy for me to understand, thank you sir.
@waifuhunter9815
@waifuhunter9815 Жыл бұрын
Thank you for the explanation method. It make a complex explanation easier
@hadisurya09
@hadisurya09 Жыл бұрын
Thank you for this sir, your teaching is straightforward and easy to understand.
@scholli99
@scholli99 6 жыл бұрын
you explain this by far better than this MIT guy. Thank you sir. Adblock off only here :)
@Artaxerxes.
@Artaxerxes. 4 жыл бұрын
but G2 got fucked by LPL
@pattrickritter2706
@pattrickritter2706 Жыл бұрын
great explanation as always sir, I really like when you explain it while giving us examples so we can understand it better 👍
@jeffrbe
@jeffrbe Жыл бұрын
A very good explanation sir. I like how simple you explain the steps to get the formula.
@TarangaDatta
@TarangaDatta 4 жыл бұрын
Amazing explanation Sir...needed to cover this portion and a few others for my upcoming exam at IIM Calcutta. You made sure I'll never forget these concepts in this lifetime!
@booleangray2225
@booleangray2225 3 жыл бұрын
Small correction in the formula: cost(i, j) = min{ cost(i, j), c(j, l) + c(i + 1, l)} And the array would have been initialized with Integer.MAX_VALUE.
@vijayreddy7585
@vijayreddy7585 2 жыл бұрын
You are great tutor for beginners Now I am clear with the algorithm concept
@katrielwidjaja2839
@katrielwidjaja2839 Жыл бұрын
Thank you, sir, for the explanation. I really like your explanation it was very simple and straightforward. It helped me understand this topic better.
@tanishkaachaturvedi2173
@tanishkaachaturvedi2173 11 ай бұрын
Just no words for the great explanation. Thank you very much 🙏
@subramaniyanvg6367
@subramaniyanvg6367 Жыл бұрын
Best teacher anyone can get.
@ashar5511
@ashar5511 3 жыл бұрын
First I thing this program is very difficult to understand , after I saw ur lecture i can solve the problem
@sheelstera
@sheelstera 5 жыл бұрын
Hello @Abdul Bari, Thank you so much for the video. I am having slight trouble trying to understand the "decision making" nature of dynamic programming here. The problem here has been divided into two phases. Phase 1 - fills up the cost and distance data structure and bears a striking similarity to Dijkstra's where we find the vertex with the shortest path to the preceding stage starting from the sink Phase 2 - uses the populated data structure from Phase 1 to trace its way back from the source to sink. My questions are: i. I am trying to make the most of the individual points you mentioned about Dynamic Programming: (a) memoization/tabulation and (b) decision making at each stage. In this particular case, Phase 1 seems to be doing the tabulation part where you fill in the data structure to use it later in Phase 2. And as you said in the video, the decision making part happens in the second Phase: the Forward method. Please correct me if I am wrong. If my understanding is right then, this leads me into the second question. ii. Where is the decision making happening in Phase 2 considering the data structure from Phase 1 has already given you the path or at least the vertex to be chosen at each stage and we are just using the one and only obvious vertex at each stage as populated in the data structure from Phase 1 to trace back to the sink starting from the vertex! Request your thoughts.
@sheelstera
@sheelstera 5 жыл бұрын
Alright.. Sorry about that The problem here has been divided into two phases. Phase 1 - fills up the "cost and distance" data structure (tabulation) Phase 2 - uses the populated data structure from Phase 1 to make decisions to trace its way back from the source to sink and we call that forward method My question is: where really is the "dynamic" decision making happening considering the data structure has already given you the vertex to be chosen at each stage and we are just using the entry as populated in the data structure to trace back to the sink starting from the source?
@sheelstera
@sheelstera 5 жыл бұрын
@@abdul_bari Alright thank you so much
@sudaminis1302
@sudaminis1302 2 жыл бұрын
Your videos are priceless! Much gratitude!
@Emma-ud9xm
@Emma-ud9xm 5 жыл бұрын
Thank you so much..It is very helpful... is this method applicable to other directed weighed graphs such that vertex 1 is directly linked to vertex 6 for example (stage 1 to stage 3)? if i want to use the dynamic programming strategy to solve the shortest path problem for a given graph... is that all the problem can be presented as multistage (example of graph your video 3.6 Dijkstra Algorithm - Single Source Shortest Path - Greedy method) Otherwise what is the best algorithm using DP to solve single sorce shortet path?
@deepanshsharma7354
@deepanshsharma7354 11 ай бұрын
Please make a video professor on the proof of optimality that this dynamic approach guarantees an optimal solution
@havetocheckhavetocheck1761
@havetocheckhavetocheck1761 4 жыл бұрын
still the best tut among other KZbinr explanations
@ms_admires
@ms_admires 4 жыл бұрын
extremely crisp and clear. very easy approach. Thank you so much..
@sriseenu5937
@sriseenu5937 4 жыл бұрын
Thank you sir..it's very useful & I understand clearly..way of ur teaching is very nice
@369media
@369media Жыл бұрын
am from Ethiopia thanks so much
@Voice1804
@Voice1804 Ай бұрын
The best teacher, thank you sir
@chaithu_art_world5076
@chaithu_art_world5076 3 жыл бұрын
Every time I got a doubt my mind simply tells me watch abdulbari channel "Tq sir "
@mariazeb5145
@mariazeb5145 4 жыл бұрын
How do we find the cost. If I find through graph it gives different value and if I find it through table it gives different.
@bharaths3075
@bharaths3075 3 жыл бұрын
Sir! Why cant we solve this using greedy method?.We can use Dijkstra's shortest path right?
@rajavarma1227
@rajavarma1227 2 жыл бұрын
Sir, Thank you so much for nice explanation, I have a doubt at 02:00. How to apply dynamic programming for this problem? We are thinking of series of decisions on which vertex to choose next for optimal solution. Do we have a list of decisions to choose from? The only decision i see here is: choosing an edge with minimum weight. The same we follow in greedy method as well. Please clarify sir, when you find time. In dijkstra algo also, we choose which vertex to explore next.
@shaikhmukhtar8072
@shaikhmukhtar8072 2 жыл бұрын
In greedy approach, we directly go another vertex which is min cost. But in this we go every vertex by stages in graph . Then we have to choose min of them.
@nishitkakkad4976
@nishitkakkad4976 6 жыл бұрын
Sir, what if there is an edge between vertices in same stage like 2 to 3 in stage 2 or 7 to 8 in stage 3. Will this formula work in that scenario?
@mearaftadewos8508
@mearaftadewos8508 2 жыл бұрын
NO. It's only for multi-satge meaning every vertex is connected to the next stage.
@aadarshmishra1488
@aadarshmishra1488 5 жыл бұрын
sir i think here one lit bit mistake in cost(3,6) mean third stage 6th vertex but we write the equal cost(3,6)=min{cost(6,9)+cost (4,9)....and so on where cost(6,9) means 6th stage 9 th vertex which is wrong how can we write sir?
@roshithborra4713
@roshithborra4713 10 ай бұрын
great explanation sir
@khenir99
@khenir99 5 жыл бұрын
Meri dua hai ki app aur 100 saal jiyo abdul baari ji, mai chahata hu ki mere bacche ke bacche ko bhi aap algorithm sikhao
@hann06_.
@hann06_. Жыл бұрын
Astonishing video sir, thankyou for providing a video on this topic.
@ekosaputra5887
@ekosaputra5887 Жыл бұрын
Amazing explanation sir, it helps me to understand the concept of this topic 👍👍
@johnc4624
@johnc4624 Жыл бұрын
Thanks for the exhaustive explanation. Can you give account for the revelance of needing stages in the formula?
@aguy9371
@aguy9371 Жыл бұрын
simple yet very easy to grasp, thank you sir!
@devashiskhandelwal598
@devashiskhandelwal598 6 жыл бұрын
Sir if there is a path from i th stage to (i+2) th stage will it be still a multi stage graph and can we solve it by dynamic approach?
@_rahul_jay_2813
@_rahul_jay_2813 2 жыл бұрын
watched every vedio just one time and I'm going to write exam tmrw💝
@merflyco4152
@merflyco4152 Жыл бұрын
Thank you for the clear explanation. It really helps.
@sachitank9287
@sachitank9287 6 жыл бұрын
Superbly Explained
@kumarshivam8077
@kumarshivam8077 4 жыл бұрын
Sir, we are applying the greedy method approach. For example, we are going to a local maxima everytime. So please clear this to me?
@apoorvmishra704
@apoorvmishra704 10 ай бұрын
Sir, there is confusion when you are generating g(2,{3})=15 but later on g(2,{4})=8, but it should be 18 as g(2,{3})=15(same way)
@pushpagaddi1682
@pushpagaddi1682 5 жыл бұрын
Sir this multiple stage graph may also possible in backward then we use the same formula...for solving in backward
@giorgi23
@giorgi23 3 жыл бұрын
Big respect Sir. I have one question. What stages do in programming or they are used only for visual presentation? What they tell us? If we remove them what would happen?
@adityaojha2701
@adityaojha2701 3 жыл бұрын
Because we visit vertices stage-wise to find the cost.
@nikhilnagdev641
@nikhilnagdev641 5 жыл бұрын
Thanks for explaining it in the best way :)
@sasikanth8378
@sasikanth8378 Жыл бұрын
In search of gold we lost diamond love u sir 👍👍
@joschk8331
@joschk8331 4 жыл бұрын
Thanks for giving away such an informative video for free!
4.1.1 MultiStage Graph (Program) - Dynamic Programming
14:26
Abdul Bari
Рет қаралды 317 М.
4.2 All Pairs Shortest Path (Floyd-Warshall) - Dynamic Programming
14:13
إخفاء الطعام سرًا تحت الطاولة للتناول لاحقًا 😏🍽️
00:28
حرف إبداعية للمنزل في 5 دقائق
Рет қаралды 79 МЛН
ДЕНЬ УЧИТЕЛЯ В ШКОЛЕ
01:00
SIDELNIKOVVV
Рет қаралды 4 МЛН
🕊️Valera🕊️
00:34
DO$HIK
Рет қаралды 7 МЛН
Watermelon magic box! #shorts by Leisi Crazy
00:20
Leisi Crazy
Рет қаралды 116 МЛН
4.5 0/1 Knapsack - Two Methods - Dynamic Programming
28:24
Abdul Bari
Рет қаралды 2,8 МЛН
5 Simple Steps for Solving Dynamic Programming Problems
21:27
Reducible
Рет қаралды 1 МЛН
3.5 Prims and Kruskals Algorithms - Greedy Method
20:12
Abdul Bari
Рет қаралды 2,8 МЛН
L-5.6: Multistage Graph | Dynamic Programming
17:32
Gate Smashers
Рет қаралды 254 М.
4 Principle  of Optimality  - Dynamic Programming introduction
14:52
Abdul Bari
Рет қаралды 1,1 МЛН
Introduction to Graph Theory: A Computer Science Perspective
16:26
3.6 Dijkstra Algorithm - Single Source Shortest Path - Greedy Method
18:35
4.3 Matrix Chain Multiplication - Dynamic Programming
23:00
Abdul Bari
Рет қаралды 1,7 МЛН
إخفاء الطعام سرًا تحت الطاولة للتناول لاحقًا 😏🍽️
00:28
حرف إبداعية للمنزل في 5 دقائق
Рет қаралды 79 МЛН