## Network Analytics and Epidemics

This example demonstrates (i) how to generate and analyse networks with specific structure and (ii) how to implement an epidemic model on these networks.

**Read carefully what you need to accomplish for this exercise. You need to submit your source code and your plots. For plotting, use the provided functions in the Python template.**

#### Networks

You will implement two networks using graph generator functions from NetworkX. You need to initialize both networks with your student number (matriculation number) as seed:

- Implement a power law network with N=100 nodes and 950 edges using the graph generator function powerlaw_cluster_graph from NetworkX.
- Implement a small world network with N=100 nodes and 5 cliques with 20 edges using the graph generator function connected_caveman_graph from NetworkX.

This functionality is already provided by HelperClass.generateGraph.

#### Part A

In Part A, you compute and plot interesting network quantities on the networks you generate. You can use all functions from NetworkX for your implementation. You will compute and plot the following network quantities:

- Degree distribution
- Clustering coefficient distribution.
- Shortest path distribution.
**Plot all three distributions in a separate plot with the function provided in the python template.**

#### Part B

In Part B, you will use both networks that you generated in Part A to implement two SIR models: one on each network. The SIR model divides the population of the N=100 nodes in your networks into three groups: susceptible (S), infected (I), and resistant (R) nodes. Implement the SIR models as follows:

- Initialize the models with a single infected node.I_0, chosen at random. All other nodes are in state S, i.e. susceptible. No single node is recovered, i.e. in state R
- Set the infection rate beta: 0.1
- Set the recovery rate gamma: 0.05
- All other nodes are initially susceptible S_0 = N - I_0 - R_0.
- Iterate the models 10 000 times
- At each iteration, update the status S, I, R for one node
- Every 100th time step the number of infected, susceptible and recovered should be measured and the values should be saved in the corresponding lists (susceptibles, infected, recovered)
**Plot S, I, R using the function provided in the python template.**