Question about Prim's Algorithm

I would like to know how the minimum spanning tree can be achieved in
this way, just a few explanation for guidance is ok:

In the following example, 999 represents they are not connected. There
are altogether 6 vertexes.

The adjacency matrix:
(0 2 999 3 999 999,
 2 0 999 999 5 999,
 999 999 0 1 999 999,
 999 3 999 1 0 999 7,
 999 5 999 999 0 4,
 999 999 999 7 4 0)

The starting vertex:
0

Minimum spanning tree:
0 2 999 999 999 999
2 0 999 999 5 999
999 999 0 1 999 999
999 999 1 0 999 7
999 5 999 999 0 4
999 999 999 7 4 0


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/algogeeks
-~----------~----~----~----~------~----~------~--~---

Reply via email to