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

Material Type: Project; Class: Algorithm & Data Structures; Subject: Computer Science; University: University of North Carolina - Charlotte; Term: Spring 2009;

Typology: Study Guides, Projects, Research

Pre 2010

Uploaded on 07/28/2009

koofers-user-acu
koofers-user-acu 🇺🇸

10 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

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.