Minimum Spanning Tree

Hi,
I'm required to write the following program.
I am not asking for anyone to do it for me in any way. I would just like some guidance on where to start, because I have no clue!

1
2
3
4
5
6
7
8
9
10
11
12
13
Write a program to find a minimum spanning tree in a graph using Kruskal’s algorithm.. This program can be useful in different scenarios. These include 
•	A house with electrical points. 
•	Many other applications that involve minimizing the delivery cost of goods in cities where goods are delivered from one central shop to different vendors.
Starting with a weighted undirected graph where the edges have been assigned weights which are proportional to their Euclidean distance between cities, the program will 
Use Kruskal’s algorithm to compute the minimum spanning tree in the graph as follows 
•	Sort edges into ascending weight order
•	for each edge {
a.	If an edge does NOT cause a cycle accept it 
b.	Else refuse edge
} 

You are required to:
1. Test your program on the weighted undirected graph below to find the minimum spanning tree. You will use the file g_test.txt as input.


I do not understand this at all, the input is three columns of integers, from what I understand, the numbers of each point and the weights of the links.

I do not understand what to output ??
Please help so I can get onto this.

Thanks,



Topic archived. No new replies allowed.