Тёмный

4.2 All Pairs Shortest Path (Floyd-Warshall) - Dynamic Programming 

Abdul Bari
Подписаться 988 тыс.
Просмотров 2,5 млн
50% 1

Floyd-Warshall All Pairs Shortest Path Problem
Dynamic Programming
PATREON : www.patreon.com/bePatron?u=20...
Courses on Udemy
================
Java Programming
www.udemy.com/course/java-se-...
Data Structures using C and C++
www.udemy.com/course/datastru...
C++ Programming
www.udemy.com/course/cpp-deep...

Опубликовано:

 

15 фев 2018

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 1,2 тыс.   
@karanpuri1617
@karanpuri1617 5 лет назад
you're a perfect example of how a CSE Teacher should be.
@sundaramsaroj2087
@sundaramsaroj2087 2 года назад
Very true!!!!!!
@justinjohnson7717
@justinjohnson7717 2 года назад
Correct 😀. This is my homework. I did my homework with the help of this video. 😁
@karanpuri1617
@karanpuri1617 2 года назад
@@abhaykumarkanaujia abbe chuttad vo mujhe class mein ni padhata.
@karanpuri1617
@karanpuri1617 2 года назад
@@abhaykumarkanaujia ab tujhe gadhe ko yahan bi ni samajh aaya to fir chhod hi de tu
@omsatpathy5455
@omsatpathy5455 2 года назад
@@karanpuri1617 chodh bhai wo production waala hai😂
@riley_6913
@riley_6913 4 года назад
In less than 15 minutes you managed to clearly explain something my professor couldn't explain in an entire semester. Eventhough I'm late relative to when this video was uploaded, I still wanted to take this time to thank people like you, who provide an invaluable service to us all.
@devbhavsar7799
@devbhavsar7799 2 года назад
I think your syllabus is shit..my college does not teach me only warshall for 6 month
@mr.aravindreddy
@mr.aravindreddy 3 года назад
Sir At 6:39 I think for A^1[4,2] the value is 5 but not 8.
@OneLordeAnimeClips
@OneLordeAnimeClips 2 года назад
You are correct.
@MiEthioEntertainmentPLC
@MiEthioEntertainmentPLC 2 года назад
@@OneLordeAnimeClips yep
@MiEthioEntertainmentPLC
@MiEthioEntertainmentPLC 2 года назад
Ure crct
@shubhamchaudhari9475
@shubhamchaudhari9475 2 года назад
Correct
@andrewsa7980
@andrewsa7980 2 года назад
Crt
@jd7073
@jd7073 5 лет назад
Dear sir, You have been an incredible help in my studies. I didn’t understand my courses very Well Because the teacher wasn’t the greatest, But Thanks to you i was able to pass all my finals! I am so grateful for these amazing video’s and i truly hope you Will continue to make such Good video’s! You are one of the best teachers when it comes to algorithms, bravo!
@lucutes2936
@lucutes2936 Год назад
ZOV
@Gowtham_1188
@Gowtham_1188 Месяц назад
Atleast you have teachers to teach, but in my college no lectures, no labs, no proper mid exams and they say it is as self learning , faculty don't even know subject to teach, we only go to college only for attendance.😢
@ssshukla26
@ssshukla26 4 года назад
I am just passing my algo exams because of you sir. Thank you so much...
@ayushsharma397
@ayushsharma397 6 лет назад
thanks, sir ! hats off to your efforts, you are providing quality lectures on algorithms.The best material available on youtube would say .
@JoseSanchez-vv1zd
@JoseSanchez-vv1zd 4 года назад
Greetings from southern California! You make learning algorithms so much easier and interesting! Thank you for your great work, Abdul!
@sachinprabhuk6241
@sachinprabhuk6241 5 лет назад
I just started watching your tutorials and even though they are a lil longer compared to other tutorial channels, its soo worth it. You have such awesome insight on the concepts. Thank you very much. Keep up the awesom work
@JohnCena12355
@JohnCena12355 6 лет назад
Thank you so much! the instances of matrices is a unique way of teaching this and made me understand instantly! Much better than starting with the algorithm and following from there. Bravo!
@who_fkn_cares
@who_fkn_cares 5 лет назад
Your ability to clearly explain algorithms is very effective. One of the best teachers I've come across. I look forward to your other videos.
@Sa-jx6rm
@Sa-jx6rm 11 месяцев назад
I have never been so jealous in my life How lucky they are whom have the opportunity to attend your classes . Truly, you are the best professor ever ! thank you so much
@thefahad449
@thefahad449 3 года назад
Your students are lucky to have a professor like you. I wish all my professors thought CS like you do!
@Virtualexist
@Virtualexist 3 года назад
You are so humble, explanations are simple. This shows the skill of an awesome teacher- explaining anything such that anyone can understand. 🙏
@tausifahmad2007
@tausifahmad2007 4 года назад
sir i think at 6:39 for A-1[4,2] there will be 5 not 8
@bhavikabharti66
@bhavikabharti66 4 года назад
Yes
@umernasir4217
@umernasir4217 4 года назад
Agreed.
@coolboy98iscool
@coolboy98iscool 4 года назад
agreed
@abhipatel3512
@abhipatel3512 4 года назад
Yes
@someonesoumya
@someonesoumya 3 года назад
yess
@triarii9257
@triarii9257 3 года назад
Thank you so much! Your videos are well titled and by far the best explanations on RU-vid. PS: Love those long pauses where you look at the camera like a professor giving a student time to absorb it all.
@silvasilkfern3752
@silvasilkfern3752 5 лет назад
Thank you so much for making these videos! It's crazy how much better I understand Floyd-Warshall now
@qiyueliang6089
@qiyueliang6089 2 года назад
Very good logic, very clear explanation, very nice example, makes me understand the idea immediately after watching the first half of the video without having to check other information. You're one of the best lecturers I've ever seen!
@Joqu1nn
@Joqu1nn 3 года назад
This could not have been a more concise and clear lesson. Thank you sir
@Superalexandru2
@Superalexandru2 4 года назад
Thank you professor for this wonderful explanation! Your videos mean so much to students all over the world. Greetings from Politehnica University of Bucharest ! (Romania)
@akaari3820
@akaari3820 Год назад
Didn't understand anything in a 90 minutes lecture, immediately understood the algorithm after just 4 minutes of this video. You're legendary
@samsmith1583
@samsmith1583 5 лет назад
Really appreciate your effort of such a patient explanation. This really helped me to understand the problem that I wouldn’t figured out maybe for hours merely by reading book.
@nickzervas4937
@nickzervas4937 4 года назад
When comparing the Floyd Warshall method with the Djiktra method , i think there are 3 important things you should have pointed out : 1) The Djiktra method can be achieved with less complexity , especially with sparse graphs . By using binary heap as a priority queue we achieve O(n*m*logn) and with a fibonacci heap we achieve O( (m+nlogn)*n). 2) The main advantage of this method compared to Djiktra is that it can be implemented in a graph even if we have edges of negative weights ( as long as there are no negatives circles ) . Djiktra is highly limited by that aspect . 3) The best algorithm for this method which benefits both from 1,2 is : Johnsons . It can be achieved in O( (m+nlogn)*n) even if we have negative weights ( no negative cycles )
@aurobindamohapatra6781
@aurobindamohapatra6781 Год назад
Absolutely
@applenrd
@applenrd 6 лет назад
I must have watched a dozen videos on Floyd Warshall and this is the only one I actually understand... THANK YOU SO MUCH!!!!!
@nishtha27
@nishtha27 6 лет назад
Probably the best explanation of Floyd-Warshall algo, thank you!
@jr.shivendra4271
@jr.shivendra4271 5 лет назад
I shared a link of this video to my professor........and next day he thanked me.
@solidname9085
@solidname9085 4 года назад
same with me
@saumyakraj1462
@saumyakraj1462 3 года назад
😂😂
@princeprasanth5705
@princeprasanth5705 3 года назад
Haha😂😂
@monkeytrollhunter
@monkeytrollhunter 4 года назад
Thank you sir, I have final exam for my algorithms class next week. You're a great supplement for me when I try to understand the materials. Greetings from the U.S !
@vijaybabaria3253
@vijaybabaria3253 4 года назад
Respect, You made some of the concepts so easy to understand... That I should have known 20 years ago but skipped it in school because it was hard to grasp.. thank you very much for all the clarity... Amazing quality
@EscapedConvict2007
@EscapedConvict2007 2 года назад
The best thing happened to me today was stumbling upon this channel. I was just not getting the Floyd-Warshall explanation from wikipedia. The explanation here is crystal clear.
@manomay7029
@manomay7029 Год назад
Wow! What a phenomenally straightforward explanation. Hats off to you, Abdul Bari sir!
@Gagandeep-ou7cs
@Gagandeep-ou7cs 5 лет назад
Btech walon ke liye masiha ho aap.
@hanumanjikabhakt9148
@hanumanjikabhakt9148 2 года назад
Sahi gall aa❤️❤️
@lolzlolzlolzlolzlol1
@lolzlolzlolzlolzlol1 5 лет назад
his videos have been saving me so much time and effort. wish all professors could be as good as him!! many thanks
@jiayuetan8742
@jiayuetan8742 4 года назад
Soft and gentle tone with clear explanation
@josepaul2725
@josepaul2725 5 лет назад
Correction A1 matrix (4,2) = 5
@thomasjaszczult1118
@thomasjaszczult1118 5 лет назад
Thank you. I thought I was going crazy
@majidmohammed5412
@majidmohammed5412 5 лет назад
@@thomasjaszczult1118 same here haha
@onionindo
@onionindo 5 лет назад
same here 'hahaha
@tana36735
@tana36735 4 года назад
true
@rahulghosh4805
@rahulghosh4805 4 года назад
Right A1 is wrong
@kamenpetkov192
@kamenpetkov192 Год назад
My Algorithms teacher was struggling big time with this one lol. And here, sir Abdul Bari explained it perfectly in 14 minutes. Great teacher!
@a_bahador
@a_bahador Год назад
In one word. Brilliant! I wish you were my algorithm professor. I have an Algorithm exam in 2 days and if I hadn't seen your videos I would probably fail. You made this course super easy. Thank you so much for everything sir.
@heidarsaleh3455
@heidarsaleh3455 6 лет назад
That's by far the best explanation I've found. Thanks!
@MoHaMmADAlmo7taref
@MoHaMmADAlmo7taref Год назад
Well, ngl, it's kind of impressive finding people who can really explain things even better than our teachers! I can finally rest assured if I missed something in the college.
@ifanwang1796
@ifanwang1796 3 года назад
How come he makes every algorithm so simple to understand, much respect sir!
@excitinguniverseofmusictheory
@excitinguniverseofmusictheory 4 года назад
Thank you! This solved a problem I was working on, beautifully and quickly.
@anirudhhada4313
@anirudhhada4313 2 года назад
Whenever my exam comes I see your videos one day before. There are no words for complimenting you. Thank you so much sir for your hard work and dedication!!!!! All teachers should be like you......
@soudafathimakurnool6521
@soudafathimakurnool6521 6 лет назад
Thank you very much sir for such a clear and efficient explaination.. I'm Truely benefiting from it!
@tabreazahmedzerdi9844
@tabreazahmedzerdi9844 6 лет назад
this type of lectures in India for us this is really heaven sir
@funshortsguru
@funshortsguru 4 года назад
Abdul bari uplaods videos so long without applying any additional ads. Great Man!
@camilaperez7580
@camilaperez7580 Год назад
Thank you so much. I understood more in the first 4-minutes of this video than in any of my network flow classes.
@VarunPK_Vlogs
@VarunPK_Vlogs 6 лет назад
Thank you sir I liked ur videos bkz you aren't only trying to make money by these videos. You are putting lot more efforts to teach us in an easy manner.
@TM-lf6os
@TM-lf6os 6 лет назад
Mr. Bari: Thanks so much for your videos. They are very clear and concise, and help me learn these concepts way faster than my expensive professors ever could. You are a god send! Thank you so much for what you do.
@epicmoffe
@epicmoffe 5 лет назад
Your videos are really good. Both your language and content are really clear, and that is something i can appreciate.
@heshansandamal2731
@heshansandamal2731 Год назад
This is a person who actually wants us to learn algorithms. Thank you very much.
@dryoldcrabman6890
@dryoldcrabman6890 4 года назад
Dude you rock! I was going to end my life but after watching your video you gave me hope.
@talhaiftikhar57
@talhaiftikhar57 4 года назад
i submit my all assigment after watching your algorithm videos,thats really helpful.👍
@hamzamuslim6141
@hamzamuslim6141 2 года назад
I literally spent 1 hour right before my exam looking at your videos and understood everything I needed to know highly recommend the dijkstra prim kruskal floyd lessons were amazing.
@sakhigundeti6785
@sakhigundeti6785 2 года назад
Sir, thanks to your amazing lectures, I was able to clear my algorithms subject! I don't know what I'd have done otherwise. Keep up the great work!
@gauravkarwa5241
@gauravkarwa5241 4 года назад
Sir your amazing.....wish we had teacher like you in our college!
@ronitkumar1838
@ronitkumar1838 6 лет назад
finally i understand this algo...thank you so much
@Cas7nova
@Cas7nova 2 года назад
I wish i had someone like you in my college, all of us deserve a teacher like you, you're just phenomenal, thankyou sir for teaching us❤️✨
@Grrmrlg
@Grrmrlg 3 года назад
I gave up the lecture videos from my professors and watched yours. Super helpful.
@CaptainLongNick
@CaptainLongNick 4 года назад
I love you, you magnificent creature. You saved both my degree and love life.
@ipek2556
@ipek2556 3 года назад
dude wait how did he save ur love life I'm genuinely curious haha
@heyyou8771
@heyyou8771 Год назад
in video - at 8:36 AND 8:38 they changed the value of A'[4][2]=5 , don't get confuse...
@rimshamahboob9582
@rimshamahboob9582 Год назад
👍
@karankhune7311
@karankhune7311 5 лет назад
One of the best Teachers......cleared all my doubts..ws able to complete my syllabus 2days before exam..
@VikasSharma-cv1su
@VikasSharma-cv1su 2 года назад
excellent Explanation , In a single go i understood i didn't need to watch this video second time. Thanks Bari
@TheGodfather101
@TheGodfather101 4 года назад
It says something and I mean REALLY says something about exceptional teaching ability when you have a teacher whose accent is this thick but is vastly superior in facilitation of core concepts than the most elegant English speaker. Mr Bari. You sir are the best teacher of computer science on the web. Period. There are people who pay tens of thousands of dollars for years only to fall short in what you can manage help us achieve in mere hours.
@user-fi2ty4bm2n
@user-fi2ty4bm2n 4 года назад
I am at almost the end of this semester. Every time after our teacher's lecture, I come here to build the comprehensive concept :")
@user-fi2ty4bm2n
@user-fi2ty4bm2n 3 года назад
@@sohamshinde1258 From Taiwan, though
@mallikarjunagoudarahunasi9922
@mallikarjunagoudarahunasi9922 6 лет назад
The way your teaching is super sir!!! Getting the points is very easy ,,,thank you.
@hjkc6000
@hjkc6000 4 года назад
Your videos help people all over the world! Thank you sir!
@ammarnusair
@ammarnusair 5 лет назад
You are teaching better than our teacher respect ,🙇🏻‍♂️
@uniqueelsa5959
@uniqueelsa5959 2 года назад
I've exam in 2 hrs and now I understood why he's called the God of Algorithms
@alexboiar5319
@alexboiar5319 2 года назад
Apparently university is just an expensive subscription to youtube. Do unis find teachers who can't teach on purpose to get more money from people retaking the course? Sir, you've been saving my grades for 3 years now! I cannot thank you enough for making such great and easy to understand content. Thank you !
@JonathanPeel
@JonathanPeel 2 года назад
I watched a few videos, this is the first one that made any sense. Thank you 👏 Because of your breakdown, and well done explanation this got a like and a subscribe.
@kunalchoudhary7477
@kunalchoudhary7477 5 лет назад
correction A^1[4,2]=5.
@eurus7509
@eurus7509 4 года назад
I was looking for this comment.I thought i made a mistake taking 5...ty
@mitali7959
@mitali7959 4 года назад
@@eurus7509 same here
@srinjoydas1314
@srinjoydas1314 3 года назад
eggzacly , thanks
@abhishekpandey1741
@abhishekpandey1741 3 года назад
I am an undergrad student at IITD I was really having a tough time understanding this but this video made it so easy.....
@malteiwa
@malteiwa 3 года назад
thank you very much, this was much better explained than from my own professor. Greetings from Berlin, Germany
@kamranmammadli5850
@kamranmammadli5850 6 лет назад
Searched all of available explanations on youtube and found this one which is perfect. Normally, I stay away from indian accent videos. Thank you sir for very detailed video
@syedchand995
@syedchand995 6 лет назад
Great experience sir. Plz upload more videos
@siddharthmanumusic
@siddharthmanumusic 3 года назад
Thank you for the beautiful explanation. One observation: Isn't the time complexity of Dijkstra to find all pairs shortest path same as that of Floyd Warshall? I think the only advantage of FW is that it can also find it for negative weights plus it's easier to implement - no priority queue or extra space complexity.
@Matthew-iu6ie
@Matthew-iu6ie 3 года назад
Hello from Canada! These videos are awesome and help me learn much better than my regular prof.
@TridibSamanta
@TridibSamanta 5 лет назад
Great ! You are a great Teacher. Thanks for saving my Design and analysis of Algorithm Paper. #Respect
@pranavkasera5584
@pranavkasera5584 4 года назад
Thankyou from NIT Warangal
@chetanktatia2297
@chetanktatia2297 Год назад
Guru Brahma guru Vishnu guru deva Maheshwara ,guru shakshat param bhrahma tasmayeshri gurudev namah ,.pranam sir , algorithms guru ji 🙏🙏deep respects sir
@nsami7035
@nsami7035 4 года назад
Very clean and to the point explanation. Thank you very much sir. You are such an inspiration.
@Pandreou261
@Pandreou261 3 месяца назад
you are saving my life.Thank you brother. Brother from different mother :)
@gregprice3097
@gregprice3097 5 лет назад
Thanks Abdul! See you at England v Holland.
@christophergithegi4689
@christophergithegi4689 5 лет назад
Hi there Gregory how are you
@Endrit719
@Endrit719 5 лет назад
yahahaha my friends were telling me I would fail this subject because of those algorithms because I didn't attend the classes but thank god internet exist I will pass like a boss
@francisnwose8291
@francisnwose8291 3 года назад
Your videos are the best resources for my algorithm classes. Thank you very much
@GravitySmashify
@GravitySmashify 6 лет назад
Thank you so much. Without a doubt the best video on this algorithm.
@sanjeebbaitha96
@sanjeebbaitha96 6 лет назад
till 8:31 there was a mistake 4,2=8 instead of 8.....but corrected nice video
@vivekbkumbar
@vivekbkumbar 6 лет назад
Sanjeeb Baitha yeah i noticed also
@PankajKP
@PankajKP 6 лет назад
GOD !!!
@gao_yuan
@gao_yuan 3 года назад
Thank you sooo much sir, you made the complex algorithms much more easy and vivid to understand!
@yingtingchen3133
@yingtingchen3133 4 года назад
Thank you so much for producing this video. You just saved me hours and hours of time trying to go through the unclear explanation in the book (probably only to give up at the end).
@Geethanjalireddyy
@Geethanjalireddyy 6 лет назад
Sir, There is a mistake in finding A1 A1=0 3 α 7 8 0 2 15 5 8 0 1 2 5 α 0 Can u check it sir....
@shiwanggupta8608
@shiwanggupta8608 6 лет назад
Dijkstra takes O(ElogV). So, if we calculate using Dijkstra it would be O(n^3*logn)
@shiwanggupta8608
@shiwanggupta8608 6 лет назад
For a dense graph E=O(V^2), So, worst case time complexity will be O(ElogV*V)=O(EVlogV)=O(n^3*logn)..
@sdsa007
@sdsa007 3 года назад
Thanks, i have a computer science background, and this video is is helping me understand how the basic ideas are expressed mathematically for dynamic programming.
@diptangshudutta3637
@diptangshudutta3637 3 года назад
you sir are the teacher we all hoped to get when we joined our colleges
@tanujgehlot2600
@tanujgehlot2600 5 лет назад
6:40,Correction A1 matrix (4,2) = 5
@nusratfans39
@nusratfans39 5 лет назад
he wasted my time for this mistake and even confused me
@_outcyrptolist
@_outcyrptolist 4 года назад
@@nusratfans39 always check for comments when u face such issue
@HARIHaran-ks7wp
@HARIHaran-ks7wp 4 года назад
@@_outcyrptolist true dat
@Kvs6263
@Kvs6263 2 месяца назад
how you come up with this bro
@preciousunique6650
@preciousunique6650 5 лет назад
love you sir. Lots of effort for easy understanding. Without your videos my MTECH would be a tragedy :) hats off
@ishanthapa6840
@ishanthapa6840 3 года назад
Best explanation for graph i have come across in any video!!
@ashishdwivedi5190
@ashishdwivedi5190 5 лет назад
@13:55 isn't the time complexity again n^3 which we were trying to avoid initially??
@techwithwhiteboard3483
@techwithwhiteboard3483 4 года назад
yes it is i think the constant term in this asymptotic n3 is lower than simply using djikstra several times
@kritikhetan
@kritikhetan 4 года назад
@@techwithwhiteboard3483 even my point is also the same...time complexity as of using dijkstra also n times .@abdul Bari sir plz solve this doubt..thanks for wonderful explanation
@abdul_bari
@abdul_bari 4 года назад
We were not trying to reduce time. We just saw a different approach
@kritikhetan
@kritikhetan 4 года назад
@@abdul_bari thanks a lot sir..was stuck in this concept..ur vedios have cleared lot of my doubts in algorithm
@markos9712
@markos9712 6 лет назад
you are my god, my lovely indian sir god
@piusyawgyamenah
@piusyawgyamenah 3 года назад
A big thank you from Ghana. You saved me a whole lot of time.
@pikaachu1644
@pikaachu1644 5 лет назад
It got into my head very easily...love ur videos...much helpful in my studies..way to go sir.....keep posting....
Далее
4.3 Matrix Chain Multiplication - Dynamic Programming
23:00
3.5 Prims and Kruskals Algorithms - Greedy Method
20:12
Дарю Самокат Скейтеру !
00:42
Просмотров 583 тыс.
4.5 0/1 Knapsack - Two Methods - Dynamic Programming
28:24
Floyd-Warshall algorithm in 4 minutes
4:33
Просмотров 663 тыс.
2.8.1  QuickSort Algorithm
13:43
Просмотров 3,1 млн
G-42. Floyd Warshall Algorithm
30:13
Просмотров 170 тыс.
Дарю Самокат Скейтеру !
00:42
Просмотров 583 тыс.