Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Data Structures and Algorithms Assignment 4: Social Network Experiment - Prof. Amit Jain, Lab Reports of Computer Science

Programming assignment 4 for compsci 342: data structures and algorithms, where students are required to experiment with random graphs simulating social networks using java. The assignment involves generating random graphs with specified average degrees, calculating various graph metrics, and plotting graphs using jfreechart for extra credit.

Typology: Lab Reports

Pre 2010

Uploaded on 09/17/2009

koofers-user-0i6
koofers-user-0i6 🇺🇸

10 documents

1 / 2

Toggle sidebar

Related documents


Partial preview of the text

Download Data Structures and Algorithms Assignment 4: Social Network Experiment - Prof. Amit Jain and more Lab Reports Computer Science in PDF only on Docsity! COMPSCI 342: Data Structures and Algorithms Programming Assignment 4 Due Date: 8th May (100 points) 1 Introduction In this assignment you will experiment with various random graphs that simulate social networks like Facebook. Start with the programs in the examples folder lab/graphs. Please make sure that the name of your main class is SocialNetworkExperiment. 2 The Experiment • Generate a random graph with specified average degree. Use the class RandomGraph provided in the example code. • Calculate the average, minimum and maximum degrees. • Calculate the number of connected components. • Calculate the diameter of each connected component. The diameter is the length of the longest shortest-path between any two pairs of vertices in that component. Print the minimum, average and maximum diameter of the components in the graph. • Repeat the experiment t times, where t is specified as a command line argument. 3 Extra credit: Using JFreeChart (20 points) You will need to download the fat-jar plug-in in order to bundle the JFreeChart jar files along with your class files in Eclipse. The fat-jar plug in update site for Eclipse is: http://kurucz-grafika.de/fatjar Now use the JFreeChart package to plot the following graphs from inside your program. • Plot the number of components versus the average degree. • Plot the diameter versus the average degree.
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved