pa2 - Programming Assignment 2 CSCI4041 – Spring 2010...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Programming Assignment 2 CSCI4041 – Spring 2010 Released: 16 April 2010 Due: 7 May 2010 Assignment Purpose The goal of this assignment is to gain a practical understanding of some basic data structures for disjoint sets (Chapter 21) and some elementary graph algo- rithms (Chapter 22). You will write a program (in c/c++/java) called Graphtool which can read in a text file containing a set of nodes and edges, and answer queries about the disjoint sets and graphs that exist. There are 3 specific queries that you must handle: 1. For a pair of vertices, return whether they are connected or not. 2. For a given vertex, return all vertices that it is connected to. 3. For a given vertex, return the list of all vertices it is directly connected to (its adjacency list). Input Format Graph Input Your program must take a filename as a command-line argument and read that file to get the graph structure. The format of the files is very simple. The first line in the file will contain the number of vertices...
View Full Document

This note was uploaded on 10/21/2011 for the course CSCI 4041 taught by Professor Arindambanerjee during the Spring '09 term at Minnesota.

Page1 / 3

pa2 - Programming Assignment 2 CSCI4041 – Spring 2010...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online