Review: Primís Algorithm
MST-Prim(G, w, r)
††† Q = V[G];
††† for each u ő Q
††††††† key[u] = ;
††† key[r] = 0;
††† p[r] = NULL;
††† while (Q not empty)
††††††† u = ExtractMin(Q);
††††††† for each v ő Adj[u]
††††††††††† if (v ő Q and w(u,v) < key[v])
††††††††††††††† p[v] = u;
††††††††††††††† key[v] = w(u,v);
9
9
u
15
15