**fig9_58.txt** /* 1*/ void /* 2*/ Kruskal( Graph G ) /* 3*/ { /* 4*/ Sets S( Num_Vertex ); /* 5*/ Binary_Heap H( Num_Edge ); /* 6*/ Vertex U, V; /* 7*/ Set_Type U_Set, V_Set; /* 8*/ Edge E; /* 9*/ int Edges_Accepted = 0; /*10*/ Read_Graph_Into_Heap_Array( G, H ); /*11*/ H.Build_Heap( ); /*12*/ while( Edges_Accepted < Num_Vertex - 1 ) /*13*/ { /*14*/ E = H.Delete_Min( ); // E = ( U, V ). /*15*/ U_Set = S.Find_And_Compress( U ); /*16*/ V_Set = S.Find_And_Compress( V ); /*17*/ if( U_Set != V_Set ) /*18*/ { /*19*/ // Accept the edge. /*20*/ Edges_Accepted++; /*21*/ S.Union_By_Height( U_Set, V_Set ); /*22*/ } /*23*/ } /*24*/ }