Network1
April 2, 2018
Network1
Network2
Network3
For example
Vertices = {A,B,C,D,E}
Edges = ({A,B},{A,C},{B,C},{C,E})
It is "better" to draw it:
Network4
Network5
Network6
Network7
Random Network
Randomply connecting pairs of nodes with some probabily \(p\)
Scale-Free Network Few nodes has a large number of links, most nodes have very few.
## Random Graph g <- erdos.renyi.game(10, 1/10) plot(g)
degree_distribution(g)
## [1] 0.4 0.4 0.2
## Scale Free N <- 20 g <- sample_fitness(5*N, sample((1:20)^-2, N, replace=TRUE)) plot(g)
V = {A,B,C,D,E}
Edges = ((A,B),(A,C),(B,C),(C,E))
A = 1, B = 2, C = 3, D = 4, E = 5
g <- graph(c(1,2, 1,3, 2,3, 3,5),n =5)
g <- graph(c(1,2, 1,3, 2,3, 3,5),n =5) plot(g)
print(g)
## IGRAPH 356935f D--- 5 4 -- ## + edges from 356935f: ## [1] 1->2 1->3 2->3 3->5
vcount(g)
## [1] 5
ecount(g)
## [1] 4
\[ \begin{bmatrix} & A & B & C & D & E\\ A & 0 & 1 & 1 & 0 & 0\\ B & 1 & 0 & 1 & 0 & 0\\ C & 1 & 1 & 0 & 0 & 1\\ D & 0 & 0 & 0 & 0 & 0\\ E & 0 & 0 & 1 & 0 & 0 \end{bmatrix} \]
A directed graph is called strongly connected if there is a path in each direction between each pair of vertices of the graph.
– In a directed graph G that may not itself be strongly connected, a pair of vertices u and v are said to be strongly connected to each other if there is a path in each direction between them.
g <- erdos.renyi.game(20, 1/15) plot.igraph(g)
Either: Just simulate a random graph (n = 10, p = 0.3) and print out its adjacency matrix
Or: Download any network data and print it as a graph.