Next: KRUSKAL'S ALGORITHM
Up: PRIM-DIJKSTRA'S MST ALGORITHM
Previous: Data Structure for Prim's
Input: G=(V,E,w), a connected weighted graph
Output:
, a MST
-
-
/*
*/
/*
*/ - For
to n-1 do
- Find j such that
and w(j,NEAR[j]) is
min.
-
/*
*/
-
- /* update NEAR[j]=0 /*
*/
- for k=1 to n do
- if
AND
then NEAR[k] = j
- endfor
- endfor
Sushil Prasad
Thu Nov 4 14:09:59 EST 1999