
CS 302 Assignment 7:
Finding a minimum spanning tree.
Due date: Thursday, November 5, 2009, midnight.
We will finally work Homework 6 in an efficient way.
Write a program which
-
Reads in a weighted graph.
The number of vertices will not exceed 100.
-
Finds the minimum weight of a spanning tree for the graph, and also find
a minimum spanning tree, using Kruskal's algorithm.
-
Implements Kruskal's algorithm using Union-Find, and implements Union-Find
using the method shown in class. Be sure to use path compression.
-
Here are some practice graphs:
-
A weighted graph with 5 vertices.
A weighted graph with 100 vertices.
Another graph.
Another graph.
Another graph.