degree distribution

Assignment 1

 

2024, ינוי7 -7.6.24 השגה

 

Please combine any code together with text responses in a single upload file to Lemida by the deadline.

 

1. Read in the file uploaded with the assignment airport-network.gml. You can read the file into network using the network command nx.read_gml(‘airportnetwork.gml’), where the argument in the middle is the filename.

 

a. Make a log-log plot of the degree distribution of this network. Also

 

compute its global clustering coefficient using the command

 

nx.transitivity(G).

 

b. Make an Erdos-Renyi Graph with the same average degree as this network

 

and plot its degree distribution. You may use the network command

 

nx.erdos_renyi_graph(), with the appropriate values of N and p (you will

 

have to calculate the correct p). Compare this to the actual degree

 

distribution

 

c. Using nx.configuration_model(G), create a network with the same degree

 

distribution as the original network and compare its clustering coefficient

 

value.

 

2. Consider an Erdos-Renyi network with N=6,000 nodes, connected with

 

probability p=0.0001.

 

a. What is the expected number of links L?

 

b. In what regime is the network (critical, subcritical, supercritical, fully

 

connected).

 

c. Assuming the same value of p, what value of N would lead to a network

 

with an average degree of k=10.

 

3. Degree and components

 

a. Consider an undirected network of size N in which each node has exactly

 

degree k = 1 (not average degree k=1!). What has to be true of N for this

 

network to exist? What is the degree distribution of this network? How

 

many components does this network have?

 

b. Consider now a network in which each node has degree k = 2 and

 

clustering coefficient C = 1. What has to be true of N for this network to

 

exist? Describe what this network looks like.

Assignment 1