Kruskal's Algorithm:
1.It is an Algorithm in graph theory that finds a minimum spanning tree for a connected weighted graph.
2.Kruskal is where we order the nodes from smallest to largest and pick accordingly.
3.Kruskal allows both new-new nodes and old-old nodes to get connected.
4.Kruskal's algorithm builds a minimum spanning tree by adding one edge at a time.The next line is always the shortest only if it does not create a cycle.
5.Kruskal's require us to sort the edge weight's first.
Prim's Algorithm:
1.It is the Algorithm that finds a minimum spanning tree for a connected weighted unidirected graph.
2.In Prim's algorithm we select an arbitrary node then correct the ones nearest to it.
3.Prim's always joins a new vertex to old vertex.
4.Prim's builds a minimum spanning tree by adding one vertex at a time. The next vertex to be added is always the one nearest to a vertex already on a graph.
5.In Prim's algorithm we select the shortest edge when executing the algorithm.
great ..........
ReplyDeletethumbs up...............
WHat exactly do u mean when u say "3.Kruskal allows both new-new nodes and old-old nodes to get connected."?
ReplyDeleteDoes old node mean selected/processed node in the set?and the new one which is the next node to be processed?
ofcors it means the same. you understood it correctly....
ReplyDeletegrest effort!! it is a useful post...
nce,,,
ReplyDeletevery clearly expressive ... great one :)
ReplyDeletevery brief... nice
ReplyDeleteGreat!!
ReplyDeleteThanks man Great !!!
ReplyDeleteThanks man Great !!!
ReplyDeletethanku bhai :) awesome *_*
ReplyDeletei am understand easly ............
ReplyDeletebut when would we prefer kruskal's algorithm over prim's algorithm??
ReplyDeletebut when would we prefer kruskal's algorithm over prim's algorithm??
ReplyDeleteWhen we have a Sparse Graph then generally we use Kruskal's and for Dense Graph use Prim's....
ReplyDeletenice
ReplyDeleteHow to use my youtube account on Vimeo
ReplyDeleteI like watching movies. There's a lot of 'fandom' in youtube to mp3 converter reviews the world about the movie. It's the best way to go all in with