# Random Graphs and Models of Small Worlds

In this homework, you will extend your work from the previous homework and generate random graphs using some properties of the real graph you created/used last time.

## 1. Random Graph

Choose one of the networks you created with Lost Circles, the Wikipedia code, or the Twitter notebook in the prior homeworks, which we'll call **Yg**, and use NetworkX to create a random graph (i.e., an Erdos-Renyi graph), we'll call **ER**, using the same number of nodes and approximately the same number of edges as your **Yg** graph.

What value of *p* did you use to construct your **ER** graph?

Provide a visualization of this **ER** and your **Yg** graph.

How many nodes are in **ER**?

How many edges are in **ER** and in **Yg**?

What are the densities of **ER** and **Yg**?

What are the average local clustering coefficients of **ER** and **Yg**?

What are the diameters of **ER** and **Yg**?

Construct a histogram for the degree distributions in both **ER** and **Yg**.

Describe your observations about the differences and similarities between these two graphs.

## 2. Random Proxy Graph

With the **Yg** network you chose above, create a Watts Strogatz network with the same number of nodes, which we'll call **WS**, to approximate your graph.

What value of *d* did you use to construct your **WS** graph?

Provide a visualization of this **WS** and your **Yg** graph.

How many nodes are in **WS**?

How many edges are in **WS** and in **Yg**?

What are the densities of **WS** and **Yg**?

What are the average local clustering coefficients of **WS** and **Yg**?

What are the diameters of **WS** and **Yg**?

Construct a histogram for the degree distributions in both **WS** and **Yg**.

Describe your observations about the differences and similarities between these two graphs.