───✱*.。:。✱*.:。✧*.。✰*.:。✧*.。:。*.。✱ ───

A spanning tree is a subgraph which includes all vertices, is connected, and has no cycles. The number of vertices in a spanning tree is always 𝑛1, where 𝑛 is the number of vertices in the graph.

A minimum spanning tree is the spanning tree with the smallest possible total edge weight.

Algorithms

Kruskel’s Algorithm

  • Sort all edges by weight (ascending)
  • Add edges one at a time, skip any that would form a cycle
  • Stop at 𝑛1 edges

Prim’s Algorithm

  • Start at any node
  • Grow the tree by always adding the lowest weight edge that connects to an unvisited node.
  • Repeat until all edges are visited

───✱*.。:。✱*.:。✧*.。✰*.:。✧*.。:。*.。✱ ───