
 % make a random graph
   tic
   figure; hold on; grid on;
   %for n=[10,50,100,500,1000,5000,10000]
    for n=2.^[4:15]
      iter=200;
      prob = (1/n)*[0:.1:4];
      L=length(prob);
      comp=zeros(L,1);
      for s=1:L
         p=prob(s); 
         [n,s]
         toc
         for  t=1:iter
            G=make_rand_graph2(n,p);
            comp_list=conncomp(graph(G~=0));
            m=  max(comp_list);
            M=0;
            for k=1:m
               S=sum(comp_list==k);
               if S>M
                  M=S;
               end % if
            end % for k
            comp(s)=comp(s)+M;
         end % for t
         comp(s)=comp(s)/(n*iter);
      end % for s 
      plot(n*prob,comp);
      drawnow;
   end % for n
   toc
 
