北美代写essay,程序代写,Java代写代做,Java代考-焦点论文

Assignment 1, Due date: 3/18, 3:30 PM COMP5800. UMASS, Lowell

Network Metrics

In this assignment, you are required to write a program to compute several metrics you’ve learned in the class against any given network. We provided a sample network in this package (see the file net-sample.txt in the left menu) that contains a sample graph. You can use this network to run your experiments and make sure the resulting output of your program are in the required format (see below). We will grade your assignment based on a test network which is different from the sample network.

北美代写essay,程序代写,Java代写代做,Java代考-焦点论文 Your program should compute the following metrics for a given network and generate an output file named output.txt that must be in the following format (numbers on the same line are separated by single spaces):

? Line 1: density of the graph (rounded to 5 decimal digits) (5 pts).
? Next line: diameter of the graph (5 pts).
? Next line: number of connected components (5 pts).
? Next line: maximum degree of a node (5pts).
? Next n lines (n is the number of nodes in the graph): where line i contains the following two values about node i: node degree centrality and node closeness centrality separated by space (rounded to 5 decimal digits). For this assignment, set the edge weights to 1 for all edges. Moreover, if there is no path between two nodes, their distance should be set to 10 3 (40 pts).
? Next K lines (K is the number of connected components in the graph): where line i lists all nodes belonging to component i. The nodes in the same component have to be listed in increasing order, and the components have to be listed in increasing order of their first nodes (40 pts)

Figure 1: A example graph with two connected components.

For example, given the network in Figure 1, your output.txt should contain:
0.33333
2
2
2
0.33333 0.002
0.33333 0.002
0.33333 0.002
0.33333 0.002
0.33333 0.0015
0.33333 0.0015
0.33333 0.0015
1 2 3 4
5 6 7

Important Notes

You must submit a single zip file named NAME STUDENTID.zip that contains the following three files in its root:
1. One script named compute-metrics for computing the graph metrics. You can use any programming language. However, we highly recommend Python.
2. One text file named output.txt containing the metrics computed against the input graph. This file should be produced by your compute-metrics script.
3. One text file named README.txt explaining steps to run your program.

北美代写essay,程序代写,Java代写代做,Java代考-焦点论文 We expect your script will be EASY to run. Specifically, if you use Python, we will run this command:

$ python compute-metrics.py net-sample.txt

If you use C++, we will run these commands:
$ g++ compute-metrics.cpp -o compute-metrics -O2 -Wall

$ ./compute-metrics net-sample.txt

北美代写essay,程序代写,Java代写代做,Java代考-焦点论文 Also note that:

? Thetestnetworkwillhavethesameformatastheprovidedsamplenetwork, net-sample.txt. Your program has to follow this input format.
? Your output.txt should be in the exact format as described above. Your file must have n + K + 4 lines. Do NOT omit any line. Otherwise you will receive a 0 grade. If you don’t know how to compute certain lines, use a blank line instead.
? Your Zip file must be submitted to the link available at the course homepage, otherwise it will be ignored. Do not email your files.
That’s it. Good luck with the assignment!

在線客服

售前咨詢
售后咨詢
微信號
Essay_Cheery
微信
澳大利亚essay代写,编程代写,代码代写,程序代写-三洋编程 加拿大essay代写|程序代写代做||Python代写|Matlab代写-Meeloun 澳大利亚代写,代写essay,代写毕业论文,留学生代写-小马代写 日本代写,北美作业代写,新加坡代写,essay代写-无时差服务 加拿大代写,作业代写,exam代考,Report代写,代写文章-最靠谱最低价 新加坡代写,北美CS代写,python代写,CS编程代写-新顾客立减20% 加拿大essay代写,paper代写,Homework代写-致远教育 新西兰代写,代写论文,paper代写,Essay代寫,代做功課-浩天教育 美国论文代写,essay代写,留学生作业代做-留学写作网 马来西亚代写,essay代写,留学生网课代修代考,论文代写-小精灵代写