Both algorithms serve to generate a Minimum Generating Tree from a graph.
No Prim
- Generate a single tree
- Throughout the algorithm, the set X is always a tree
No Kruskal
- Generate a forest before generating a Minimum Generating Tree
- There is a guarantee that it will only be a tree after the last iteration
But the biggest question is:
What would be the Advantage and Disadvantage between them?
Additional information
- Algorithm of Dijkstra solves the problem of the shortest path in a graph.
- Dijkstra and Prim algorithms are almost exactly the same, but Prim you do not add the result, but the execution is the same.
- The use of these two algorithms is for distinct problems (not are related to the same problem). One solves the shortest path while the other generates an AGM.