AlgoFrames

Spanning trees and connectivity

Connect everything at minimum cost, and find the parts a graph cannot lose.

  • Kruskal's algorithm Kruskal’s algorithm builds a minimum spanning tree by taking edges from cheapest to most expensive, skipping any edge that would form a…
  • Prim's algorithm Prim’s algorithm grows a minimum spanning tree from one vertex, always adding the cheapest edge that reaches a new vertex.
  • Strongly connected components: Kosaraju and Tarjan In a directed graph a strongly connected component is a set where every vertex reaches every other. Find them with Kosaraju’s or Tarjan’s…