PRIM-MST(G): Select a root node r∈V and all adjacent edges to a Priority Queue Q Initialise the set T=∅ While queue Q is not empty: Dequeue shortest edge (u,v) from Q If T∪{(u,v)} is acyclic: Update T←T∪{(u,v)} Add to Q any new edges adjacent to u or v Return tree T