
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

Project 2 ITCS 6114/8114 Spring 2009 Due Monday, April 20 Write a program to generate a random connected undirected graph on n vertices by generating random pairs of integers between 1 and n. Compute how many edges are needed to produce a connected graph (as a function of n). Implement the union-find algorithm, with the Weight Balancing and the Splitting Rule, to keep track of the connectivity. For each n = 5, 10, 15, 20, …, 95, 100, do 1000 experiments to find the average number of edges needed to get a connected graph. Plot the result of your experiments.