MST

Work in Progress

Summary

MST algorithms

Time ComplexityConstraintType of Graph ADT
kruskal’s algorithmEL
prim’s algorithmundirected graphAL
boruvka’s algorithmTODOTODO

boruvka’s algorithm is not in the cs2040s syllabus

MST related problems

  • maximum spanning tree - negate all weights
  • minimum spanning forest - early termination, kruskal’s invariant
  • minimum tree with k verticies - early termination, prim’s invariant
  • kth minimum spanning tree - NP hard

Cayley’s formula

  • number of spanning trees in a complete graph/among n verticies

Concept

Minimum spanning tree(MST)

  • usually on U/W graphs
  • subtree that spans all verticies with the smallest total weight
  • not necessarily unique
  • 6 vertex graph
012345243343322012345243343322012345243343322

Cycle reduction

  • eliminate the largest weight in each cycle
  • destructive method
012345243343322012345243343322012345243343322012345243343322

Cut vertex construction

  • choose the bridge edge with the lowest weight
  • constructive method
012345243343322012345243343322012345243343322012345243343322