3.5 Prims and Kruskals Algorithms - Greedy Method
HTML-код
- Опубликовано: 30 май 2024
- Whats a Spanning Tree ?
What is a Minimum Cost Spanning Tree?
Prims Algorithm
Kruskals Algorithm
Problems for Spanning Tree
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...
This man is an absolute legend. I can't be bothered to listen to my tutor when I can do a simple youtube search and be done with the current topic in less than 30 minutes. Thank you for your contribution to our CS society, and I'm looking forward to learn from you more things. I'm speaking on behalf of all the CS students here...
We thank you!
But if he will give everything on RUclips no one will buy his paid courses on Udemy. He is awesome though!
@@abdul_bari No, that's a bad idea. People who don't wanna pay will never pay.
@@abdul_bari Yes sir, please do it. But your channel is so amazing and great knowledge. thoroughly explained concepts. Thank you.
Yup. This man is a treasure.
Sir ne pucha kya tha?
no ads, no subsrice-like-comment asking. You are a legend sir.
Yea..there is no rice
@@prajwal2178 🤣😂🤣
Still you dont subscribe 😅
Kam bolta bhai 😊
Anpad logg bhi lectures dekh rhe hai 😂💀
Abdul, you are one of the best computer science teachers on youtube. Keep it going!
He is not one of the best computer science teachers on RUclips
He is the one and only best teacher on youtube❤️
@@jeyaramt9066 where he upload videos now?
@@charlesjsescoto At udemy
Please do call him Abdul sir, considering he's a teacher and is probs reading this.
@@achintyanaithani889 I would argue it's more rude to tell others how to speak, than not to call someone "Sir", while praising them.
can I acknowledge the smooth relaxing tone that you use to deliver points across in a quick nutshell! It doesn't feel rushed, it's super soothing that I'm sure even those students with assignment deadlines are so chilled out right now as they follow through!
hhhhhh you're so right
07:46 Prims algorithm
11:33 Kruskals algorithm
Not all capes wear heroes
@@sakshamtiwari3209 *not all heroes wear cap
@@shubhamgarg2359 "Not all heroes wear capes"
@@darkeli8335 *caps
@@abdul_bari hahahahahaha
If u already know the meaning of minimum spanning tree skip to 7:35
thanks lol
thanks buddy
Shawn Koo right..😅😅😂😂
Thanks a lot brother god bless you
Ty
In Prim's Algorithm, it is not necessary to choose the minimum cost edge initially. 8:02
You can choose an arbitrary vertex V and then start building the tree from it.
Yes. Great video but its an important point raised here that you can start at any vertex and get the same result.
Yes but starting off with minimum spanning vertices will cause no harm rather it will help us to recall main motive of prims algo😁
@@akashchhetri4827 Well you obviously don't know the correctness of Prim's algo. You just want to remember it instead of understanding why any arbitrary vertex can be the starting point
@@Artaxerxes. The way I am understanding it is that since ultimately after selecting every vertex,what we are doing is that ,we are selecting the edge attached to it which is smallest.
So,infact we are selecting the smallest edge attached to every vertex. So,there is no need to begin with the smallest edge
Can we start with an edge that will not appear in the final minimum cost spanning tree? like the edge between 1 and 2 in this example?
Dear PhD.Abdul Bari,
Words fail to describe the amount of thanks and respect for your generosity
you are one of your kind, i have never seen a professional professor like you all the respect to you
the way you explain and teach the topics is exceptional
You are in the status of prophets
Kindest Regards
your student
ruclips.net/video/LYRksNpPEGM/видео.html
He's a good professor, but "status of prophets"? Dont exaggerate, you have committed a grave mistake.
@@hamzamuslim6141😂😂
glazing
You put away my depression and pressure that I was suffering. Thank you for your help. May Allah bless you and your family. I bought you C++ beginner to advanced course from Udemy. I hope I will buy Your Data structure and algorithm course also after finishing C++ course insha-Allah. Thank you sir.
Faith in humanity restored!!!💐
indeed
Sir you're the best teacher... without you I would not have even thought to pass DAA in my sems ♥ Love you loads
From your loving student 😇
Hello Mam, What you are upto nowdays?
@@Icelander00 Hello Simp, which girl do you stalk these days?
@@utkarshvashisht6505 lol
@@utkarshvashisht6505 lol
Today is my DAA exam 😐
You are absolutely the best person who have skills how to convey knowledge...Even in the 9 months of Smester i can't understand what basically data structure is...just because of you I understand complete course of data structure in 3 days and even ready for exam tomorrow....I salute you man😍Allah give you more for this great work👍
Like if you think that this man is a KING👑
Hi sir ! Thanks for the gorgeous video.
I’ve noticed some wrong point in your video.
You explained how many MST can have the differ shape as formual E C (V-1) - no.cycle
But I think this is wrong and I think it should be fixed this way.
E C (V-1) -(Number of graphs containing cycles by selecting V-1 edge on E edge)
So, 7C5-(7) = 14.
Yes I noticed this too. I was quite stuck on it but I'm glad someone else caught it.
thanks but how did you get as no of cycles=7?
This man is a legend, literally getting carried through this com sci degree
Please make a series on
Compilers
Operating Systems
Computer Architecture
and other computer science courses if possible
you are an amazing teacher and explain everything so well
Bro which number is this
Give the videos of other subject also
Yes
ruclips.net/video/LYRksNpPEGM/видео.html
I watch your videos whenever I am stuck and the best thing is , not only you make us understand the topics but also clear the related and necessary concepts required to understand the topic. Thank you so much sir!!!
I would like to give my thanks to you. I am a tutor at a university where I teach these topics. I often refer to your videos for inspiration on how to teach well and make sure students understand. Your explanations are wonderful and they make the topics seem so simple. Too many lecturers make these things seem complex but in their essence they can be quite simple when explained well. I often teach your way and students are thrilled. I also often recommend your videos and point the students here as well. Thank you for being a wonderful example on how education should be done!
Bless you good sir! You managed to explain to me in 20 minutes what my tutor couldn't in an hour.Thanks to your marvelous videos I have a chance to survive the course!
The amount of hard-work you put for making this playlist is absolutely commendable. Thanks a lot for such a clear and concise explanation.
You should make more and more videos.........you are best........please go for java , c++ and C video......as well as web development.........your channel get huge success .......i wish so
@@abdul_bari sir do you have any offline coaching at Hyderabad?😊
@@abdul_bari 🙏 start one please.
Please prepare videos of computer organisation because many teachers couldn't convey efficiently.
sir...pls. include java implementations as well. Thanks. v.nice work.
and python
I am at the end of an incredibly busy semester and my class ended up with only a couple of weeks to actually study for Data Structures & Algorithms 2. Your lectures are going to help me pass with flying colours. I like the way you give the simplest example to make your explanation easy & brief. From there I can manage the rest. Thank you very much Sir.
ruclips.net/video/LYRksNpPEGM/видео.html
Sir u r soo awesome u helped our whole department gor this semester thanks alot sir
U have gained a huge fan base by u r ALGORITHMS TUTORIAL
THANKS ALOT SIR
In all Sincerity, this man deserves an award for his deep understanding of computer science logic and his amazing style of teaching, if @youtube should see this comment, please do something, cos I believe a very high number of students, not only computer science students benefit from his lectures.
This man seems to my eyes that he knows every single thing!
Sincerely, thank you!
That fly tho 😅
I have followed all your lectures throughout my masters, and I am really thankful to you, the lectures are very easily understood even for the tougher topics.
Dude you just saved my final and I am so grateful you are an absolute legend that came from heaven. What my prof couldn't do in an hour you did it in 20 minutes, me and my entire algorithms class are grateful for your existence, keep rocking it dude!
thank you so much for taking the time to provide such great explanations :) I always start with your videos before seeing the stuff that my tutor explains. You're just outstanding!
Proud to be taught by computer science professor Abdul Bari Mohammed.
Best thing about your videos->no time waste,straight to the point and very easy to grasp.
thank you for always being patient enough to write a step by step example. And for keeping it simple. Its true that you can learn anything with a good enough teacher.
Thank you Mr. Bari for helping me understand the material before I do my final. Bless you for taking the time into making these videos
This is a teaching of another level when you can make complex things seem to be simple as well as in less time. ALGO GURU.
Really you are the best lecturer I have never seen sir ,I understood all your videos thank you somuch sir
I am so grateful for youtube and for you at this moment. You literally have some really great and clear explanations. Thank you thank you thank you!!!
he was born to teach this - I love your videos! very clear and concise
Mr. Abdul Bari you are an amazing teacher. You've made the concepts very clear and concise. I am watching your videos just a day before the exam and I think that's enough. Please start teaching other subjects like Operating Systems and Computer Organization also.
The best thing I love about this lecture series is the calmness with which he explains the algos, which are among the most complicated things one could lay his hands on...However, one observation. I'm not sure if the formula Edges C (Vertices-1) - 2 works everywhere. I've graphs where this doesn't work.
You are amazing ❣️ Cut my studying time down and helped me feel confident. Was really stressed out before.
Sir, the way you start explaining the concept and till the end each and everything is simply outstanding. Salute to your teaching method and knowledge as well.
You are outstanding sir
You made very easy learning... thankyou sir...I am very unhappy because I didn't find you till now
Join Vani Institute
sir.. u make very nice videos tanks very much i learn a lot tonight
I love your explanation and the deep insights I got from your lecture is something very difficult to bind using my words. Thank you so much for arising curiosity inside me for learn data structure this way.
One stop solution to understand DSA. Thank you sir.
May all the CSE students should follow you for your precious lectures. I fell like somebody shows me some magic tricks. I feel thrilled after watching this.
Tomorrow morning is DAA exam
Thank you so much sir 🙏❤
Without this teacher, I would have failed in algorithm! Thank you🙏
What a rare gem from my neighbourhood this guy. A legendary tutor, who has for sure helped millions of CS in graduating. And who gets the credit?
wdym by neighbourhood?
@@believer8754 He is from India. I am from Pakistan.
You are really awesome! I love the way you teach, along with multiples examples and explanations.
In some of the lectures, you do not have the coding part, we would like to see them too!
I love all your lectures, you are one of the best teachers ever sir.
Thank you soo much for these beautiful lectures.
I specifically watch all your youtube ads to increase whatever profit you can gain from youtube.
So nice of you
Thank You Abdul Ji, I could understand these algorithms in 20 mins so clearly which I could not understand in 2 Hours of classes and 2 days of trying to understand on my own......THanks YOu very much.
I read the text book and listen to my CS prof talk in hand waves and confusing terminology for hours trying to understand, yet I understand in 20 minutes from you! Crazy that I pay so much just to end up on RUclips listening to free lectures and learn more.
Are you Indian? Do you understand Indian accent well?
Explain everything in such a simply way..... Thank you sir
This is one of the best playlist for algorithms. Thank you sir!!
Literally god level data structures education, watching your videos makes me depressed about how much money I'm throwing at my awful college classes that cannot seem to manage this level of clarity.
The Best Teacher Of Design and Analysis of Algolrithm I've ever seen.
now I like my Subject: ALGORITHM because of this GREAT instructor, Thank You, Sir Abdul Bari
I never understood Algorithms in college, but you made it so easy, thank you Sir
ruclips.net/video/LYRksNpPEGM/видео.html
This is the first video I have watched of yours, but I give you the title of best teacher, which you deserve
Clear, concise, calm and detailed explanations with various examples. Amazing video sir.
Bari, you make my learning very simple and enjoyable. Thanks
Excellent! You don't know sir how have you helped me! I passed graduation long back and now I have no books with me, and have forgotten all these algorithms. Your videos helped me to prepare for the interview I have after 2 days. Thank you so much!
Thank you so much Sir! It went good. Much grateful to you. :)
@@chandrimad5776 bit late but congrats!
You’ve taken something I’ve been struggling with and made it so simple to understand. Thank you so much!
The BEST explanation on RUclips. The reason I got an offer for Amazon SDE, thank you!
this man is absolutely excellent
Brilliant explanation of both algorithms. I wish you are my teacher of data structure.
Mate this video is class! I imagine you get this comment alot but i genuinely can't understand what my lecturers are saying half the time and this video takes the exact same topic and puts it in a much more clear and consise format. Thank you very much.
Best CS teacher out there! Always coming back for more help undergrad and graduate school - thank you so much!
Compared To U My Teacher Is Some Kg Student... Your Explanations .... No Words.... I Wish we Had Someone Like You To Teach Us
Always respect your teachers, if your preferred way of understanding doesn't align with their way of teaching then just watch lectures online, there's no need to be bitter about it. Successful people have always respected their mentors no matter what.
@@llliiilll3624 Just compared the levels of teaching of both of em, this doesn't mean i am not respecting my teachers or elders, don't drive into conclusions so fast.
@@MadMaXxFx Oh okay, you said KG student so I got the wrong impression. Sorry about that.
@@llliiilll3624 Regret Saying That, But This Guy Teaches Like You Teach Alphabets, My Joy Made That Comparison 😁.
I like your videos. Thanks a lot for sharing your knowledge!!!
Clearly understood 👍🏼 never seen such an incredible teacher!
the best part is ,you always explain time complexity along with the algorithm....thankyou sr...
1:00 MST
7:55 prim's algo
11:34 Kruskals Algorithms
Sir these videos are awesome ! Perfect explanation.
You're so good at explaining things man.. Thankyou!
Thank you very much your videos made my algorithm class very easy. I hated that subject but now I'm planning on redoing the entire video playlist in summer .
Thank u Sir u are awesome ur vedios are sooo nice nd easy to understand
Sir , I have understand the concepts that are teach by you. You made the learning so easy sir
You are truly a great mind, you make these things very easy to grasp.
Thanks for your service, no matter the motivation for this, its a great job.
Thank you again sir
Dear Abdul, you win the hearts and i'm rooting for becoming your life long PATREON. Much respect and love on your way.
4:19 Number of Spanning trees is not 7C5-2. Did someone else encounter this problem as well??
Another great video Mr. Bari! One more cookie for you! :-)
The best teacher on RUclips!
This is honestly a way better introduction than the one my professor and ta gave us. Learning all further topics from this guy.
It can't be explained any better than this.
non relevant comment :
I couldn't help but notice.. where is his mic ??
He must be using some really high quality mic with such nice quality voice without any noise...
under my shirt 😊
Respect. Mad respect. I type comments on all your videos, and then erase them before i actually post them because i always feel like words aren't enough to express my appreciation. This is my first comment ever, and the first time ever i've turned on youtube ads, i'm waiting for an ad to show up that i can click. Of course, turning on the ads pales in comparison to you saving my life. Thank you very much!
Abdul Bari is the GOAT of programming, the best teacher, the way he explains dsa is too good!!!! legend for a reason, long live Abdul Bari
you're the best teacher 🔥
Sir, which edge to select in the beginning if there are multiple minimum edges of the same cost scattered around the tree? Thank You.
What a boss. We live in a world where good teachers are impossible to find.
An easy concept that most professor fails to explain. Thank you for showing how it should be done.
Amazing, thank you!
I First Time Understand The Subject Of Algorithm When I See Your Videos Thank You Sir
But in this topic(prim's and kruskal's algorithm) where is the algorithm part ?
Never think anyone can explain that much easier and interestingly. Really I spend 2 days to understand this before and this man make it happen in just 10 min. Salute you 👍
You have an amazing ability to make these concepts make sense to anyone, I will always watch your videos first
Thank you for this great tutorial. I discovered that for the last example you gave Prim's MST cost was 14 and Kruskal's was 12. Does that mean Kruskal can do better than Prim's? Thanks always
Thnk q sir....nice explanation
Sir your way of teaching is really exceptional.
Its awesome.
We are happy to get teacher like u sir even we are not offline also u became a good teacher through the online for us if the explanation is so long also u explained step by step I didn't see lecture like u who explain in deep like u sir thank you sir
i don't know why it took me so hard to find you