Docsity

Project 2 Report on Generate a Random - Algorithm and Data Structures | ITCS 6114, Study Guides, Projects, Research of Computer Science

Toggle sidebar
bg1
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.

Partial preview of the text

Download Project 2 Report on Generate a Random - Algorithm and Data Structures | ITCS 6114 and more Study Guides, Projects, Research Computer Science in PDF only on Docsity!

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.