clear all N=20; P=0.2; %Probability of an edge being present at a node C=1000; for count=1:C E=(rand(N,N)