| Network analysis in cell biology: a new tool in bioinformatics |
|---|
Different kinds of random graphs are basically randomized algorithm for creating a graph. Different algorithms lead to different graphs with different probabilities. Then the ensemble of the graphs generated by a given random algorithm is studied, usually with statistical methods.
There are two kinds of these graphs, ie. there are two algorithms: G(n,p) and G(n,m).
G(n,p) graphs are generated this way: the graph contains n vertices. Then for every pair of vertices with probability p an edge is drawn connecting them. If p=1/2 then we could use a simple coin to generate the network. For each pair of vertices we toss the coin and if it is head we connect them. No edges are made for tails. This way we create a G(n,1/2) random graph. If p is not 1/2 then a special coin is needed which results head with probability p and the same procedure can be used.
You don't need coins to generate E-R graph in igraph just choose the “Random (Erdõs-Rényi G(n,p))” command from the “Create” menu and give n and p. Here is a G(n,p) graph with n=100 and p=2/100.

The second type of E-R graphs are called G(n,m). A G(n,m) graph has n vertices and m edges. The m edges are disributed completely (=uniformly) randomly among the vertices. G(n,m) graphs are handly if we want to preset the exact number of edges in the generated graph. Choose “Random (Erdõs-Rényi G(n,m))” from the “Create” menu to create such a graph.
A scale-free (also called Barabási-Albert) graph is generated by the preferential attachment mechnism. Preferential attachment is a grap evolution model, we gradually add the vertices to the network. First we start with a single vertex. Then we add vertices one by one. Each time a vertex is added it chooses “k” old vertices to connect to. (“k” is called “Edges per time step” in tkigraph.) The connections are not made (uniformly) randomly however, but a vertex having already more connections will have more chance to connect to. Ie. if vertex A has 10 incoming connections and vertex B has only 5 then the new vertex wants twice as much to connect to A than to connect to B. (It might still connect to B however, only this is less probable.) This is how such a graph looks like if k=1:

Choose “Random (Barabási-Albert)” from the “Create” menu to create such a network.
In the configuration model we fix the degree of the vertices, but apart from this the network is random. (The degree of a vertex is the number of edges connected to it.) This model is used as a null-model very often, see the section about network motifs as an example.
To create a graph according to the configuration model, select exactly one graph in the graph list and choose “Random (Configuration model)” from the “Create” menu. A new graph will be generated with the same vertex degrees as the selected graph. This works for directed and undirected graphs as well.
Note that the graph create with the configuration model may contain multiple edges or loop edges. Multiple edges mean that there are more than one edges edges connection the same pair of vertices, and a loop-edge means that a vertex is connected to itself. Choose “Simplify” from the “Create” menu to remove multiple edges and loops edges from a graph. “Simplify” will, again, create a new graph.
The Watts-Strogatz model is able to create regular and random structures and randomness can be set by a parameter. The graph is generated as follows: first a regular lattice is created (see Regular graphs, Lattice). Then in this lattice we connect every pairs of vertices which are closer to each other than another parameter. This way the lattice will be more connected. Then with a constant probability p (which is a parameter of the algorithm) the end point of each edge is rewired randomly. This means that for every edge end point we toss a p-probability coin, and if it's head we rewire that endpoint to a (uniformly) randomly chosen vertex.
Choose “Watts-Strogatz random graph” from the “Create” menu to create such a graph. Here is an example with different p values (p=0, p=0.1, p=1):

The p=0 case is the regular lattice, there is no chance for rewiring, the p=1 case is just a random network (G(n,m) type, see above), and the p=0.1 case is between order and randomness.
| << Regular Network Structures | Network Centrality >> |