Introduction - If you have any usage issues, please Google them yourself
The idea of ER random graph construction algorithm:
(1) initialization: a given N node and an edge probability p~[0,1]
(2) random edge:
1. choose a pair of different nodes that are connected without edge.
2. generate a random number r~ (0,1).
3. if R < p, then add an edge between this pair of nodes, otherwise it will not be added.
4. repeat 1,2,3 until all node pairs are selected.