Starting from:
$30

$24

CS 5001 HW #2 Solved

What to Do:

For this assignment you are to write a Python program that will analyze the dynamics of a social network of bottlenose dolphins. The network is represented as an undirected graph; each node represents a dolphin and each edge denotes frequent association between 2 dolphins.

Posted on Canvas is a text file1 (dolphins.gml) that contains data for the dolphin social network; it has 62 nodes and 159 edges. This file is in a special format called Geography Markup Language (GML). Networkx provides functions to read such files and create graphs; see https://networkx.org/documentation/stable/reference/readwrite/generated/networkx.readwri te.gml.read_gml.html

Listed below are the methods that we want you to use to analyze the social dynamics in this graph:

    (1) Degree: maximum, minimum, and average

    (2) Characteristic path length

    (3) Diameter



    1 This file was created on a Windows machine. If you’re using it on a Unix/Linux machine, you may want to run dos2unix on it first to remove any weird characters like ‘\r’


1
    (4) Center nodes and peripheral nodes

    (5) Effective eccentricity

    (6) Density

    (7) Clustering coefficient (overall)

    (8) Transitivity

    (9) Centrality: eigenvector, betweenness (normalized), and closeness (normalized)

For (1)-(8), you should output values. Additionally, write 1-2 sentences summarizing what the results tell you about: (i) whether or not this social network exhibits a small-world effect, and (ii) whether or not it is strongly cohesive.

For centrality (9), create three visualizations of the graph: one based on eigenvector centrality, one based on betweenness centrality (normalized), and one based on closeness centrality (normalized). In each visualization, make the size of the nodes proportional to the value of the of the centrality measure. Making the nodes be different colors based on some criterion might be nice too, but is optional.

Finally, write a few sentences (no more than ½ page) summarizing whether you think the 3 visualizations are all in agreement, all vastly different, differ in particular ways, etc. in terms of what they say about the flow of information (and which dolphin(s) communication mainly flows through) in the network. Here you may also want to consider the results you determined for the center and peripheral nodes.

What to Turn In:

You need to submit (via Canvas) the following (all as a single pdf file):

    • A listing of your source code.

    • A screen shot showing the output values for (1)-(8).

    • A 1-2 sentence summary of your conclusions about whether the social network exhibits a small-world effect and whether it is strongly cohesive.

    • Screen shots for the 3 different centrality measures. Make sure each screen shot is labelled so that we can tell which one is for which centrality measure!

    • A brief summary of your analysis for (9).

Grading:

Here’s how many points each task is worth:

Task

Points Possible
Degree (min, max, avg)

2
Characteristic path length

1
Diameter

1
Center

1
Periphery

1
Effective eccentricity

4
Density

1

2

Clustering coefficient
2
Transitivity
1
Eigenvector centrality display
2
Betweeness centrality display
2
Closeness centrality display
2
Analysis of small-world effect
3
Analysis of cohesiveness
2
Analysis of eigenvector centrality
5
Analysis of betweeness centrality
5
Analysis of closeness centrality
5
Total
40


















































3

More products