In [44]:
using GraphPlot, LightGraphs, LightGraphs.SimpleGraphs, SimpleWeightedGraphs, Plots, ProgressMeter, LinearAlgebra, Distributions
In [10]:
n=100
g=SimpleGraph(n);
for i in 1:100
    add_edge!(g, rand(1:n), rand(1:n));
end
gplot(g)
Out[10]:
In [2]:
n=1000
ensemble=[]
@showprogress for k in 1:100
    smc = [] # size of maximally connected graph as vertices are added 
    g = SimpleGraph(n);
    for i in 1:2000
        add_edge!(g, rand(1:n), rand(1:n));
        ccs = connected_components(g)
        sccs = map(x->length(x), ccs)
        push!(smc, maximum(sccs))
    end
    push!(ensemble, smc)
end
Progress: 100%|█████████████████████████████████████████| Time: 0:00:24
Out[2]:
0 500 1000 1500 2000 0 250 500 750 1000