## 10.1 Basic graphs

1. Create a small ring graph in igraph and plot it.
g <- graph.ring(20)
- Look in the manual of igraph for a function that will get you the degree of each node.
- ALso, get the average path length.
1. Create a “Small world” graph and plot it.
• Get the degree, average path length and transitivity
g <- watts.strogatz.game(1, 20, 5, 0.05)
1. Directed scale-free graph
• Get the degree, average path length and transitivity
g <- barabasi.game(20)
 - There should be a power law relation between nodes and degree ... (but this is a very small network)
plot(log(1:20),log(degree(g)))