Difference between Prim's and Kruskal's Algorithm | Conceptual Points for Exams

preview_player
Показать описание
In this video, we will discuss the differences between Prim's Algorithm and Kruskal's Algorithm. Also, the video covers some conceptual points about Prim's Algorithm and Kruskal's Algorithm.

Topics covered in the video-

1) Does Prim's Algorithm and Kruskal's Algorithm always produces same results?
2) Which Algorithm - Prim's Algorithm or Kruskal's Algorithm is preferred over other?
3) Difference between Prim's Algorithm and Kruskal's Algorithm

For details, please watch the video.

Get these handwritten notes from website here-

Prim's Algorithm and Kruskal's Algorithm are important topics for semester examination as well as competitive examinations like GATE, NET etc.

Watch the complete Algorithms Tutorials here-

Follow us on-

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!! :)

All the best...Keep learning :)
Рекомендации по теме
Комментарии
Автор

Hey Guys, Now we have launched our own website www.gatevidyalay.com
Kindly visit that website and you can download the notes from there and get other study material!
If you can provide any suggestions regarding the improvement of YouTube channel as well as website...we would definitely love to have them!
All the best...Keep learning :)

LearnVidFun
Автор

nice explain.. and ur hand writting is too good..

apoorvajoshi
Автор

Good, so it's just a difference of the order.

WTFax
Автор


"If the edges are already sorted [...]
In this case, time complexity of Kruskal’s Algorithm = O(E + V)"

From a theoretical perspective, Prim's algorithm (with Fibonacci Heaps) is never worse than Kruskal's. In fact, Prim's algorithm can be further improved to O(E log* V) rather easily, where log* is the iterated logarithm. This can be found in the Fredman-Tarjan paper where they introduced Fibonacci Heaps and is, unfortunately, not so well-known. It works roughly like this: Grow a tree until the heap size exceeds a certain threshold, then start growing another tree in some unused vertex, etc. Then contract the trees and continue on the same graph, but with an adjusted heap threshold.

Flovus