Using Prim Algorithm With The Adjoining Array

The adjoining array can be used as a "data structure" to represent graphs.So it is useful to see how the Prim Algorithm can be implemented using the adjoining array.This array is specified by the costs,which means A(i,j)=c(eij).When we don't use directed graphs this array is symmetrical.

The Prim algorithm steps are now :

  1. We put a mark beside the first line and we delete the first column.
  2. Between the elements that are not deleted and belongs to a line with a mark we choose the least A(j,k).If all elements are deleted the algorithm terminates.
  3. We put a mark beside the k line and we delete k column.We return to step 2

In every step the Vk node become Vj 's child.

HTML PAGE DIRECTOR :Papaioannou Panagiotis