For this task, you can use your own (or shared) data or the gnutella network gnutella2.gdf. The Guess toolbars, downloadable as resiliencedegree.py and resiliencebetweenness.py from cTools will work on modestly sized networks (~1000 nodes) that are undirected. If your network is directed, you will need to either make an undirected version of it for these scripts to work (or modify the scripts). The resilience toolbars will let you specify the % of nodes to be removed and whether it is random failure (nodes are selected at random) or targeted attack (the highest degree nodes or nodes with highest betweenness are removed). It will also compute the size of the largest component and display the network after the nodes are removed. You may also do this assignment in igraph or any other software.

Please answer the following about the network (turn in 1 image of the original network, and 1 image of the network at less than 1/2 of its original size according to one of the attack strategies).

- What network you are using (what are the nodes and edges).
- What percentage of the nodes need to be removed to shrink the giant component to 1/2 of its size in degree targeted vs. betweenness targeted vs. random failure?
- Comment on this result with respect to the degree distribution and community structure (or lack thereof) in your network.
- Construct a random network with the same number of nodes and edges
(you can do this by selecting 'Empty' when starting up Guess and then typing
`makeSimpleRandom(numberofnodes,numberofedges)`) - How do the percentages of nodes removed compare in the intentional attack and random failure in order to reduce the size of the largest component in this network by 1/2?
- How does the resilience of your network compare to that of this equivalent random graph?

Open the NetLogo applet:
Click on '`setup`' to start out with a cycle of 5 vertices.
Click on '`Run`' to add vertices one by one, each with m edges. Play with the m and gamma parameters.

- Select m=1 and gamma=0. Add 300 vertices. Click on the '
`resize nodes`' button to size the vertices by their degree. Repeat the same, but with m = 1 and gamma = 1. What differences do you observe between the two networks, e.g. in terms of appearance, the number of vertices with degree 1, and the maximum degree of any vertex? - Generate two networks with 1000 vertices and m = 4. (You can run this faster by adjusting the speed slider at the top.) For one network select gamma = 0, and for the other gamma = 1. Which degree distribution looks more like a power law?

- Go to http://ccl.northwestern.edu/netlogo/models/GiantComponent and launch the applet. Click 'setup' and then 'go'.
- Try it with 80 nodes and then 400 (if your computer can not compute, use smaller node sizes). Observe what happens right around the point where the average degree is 1 (the vertical line in the plot). Comment about the variation in the size of the largest component as you increase the number of edges/nodes.

Submission of your homework is via WebCT. You must submit all the required files in a single tar or zip file containing all the files for your submission.

Acknowledgement: The assignment is modified from Lada Adamic.