1. AllKcomponentsGraphs:=proc(n,k) local S,s,C: S:=AllGraphs(n): C:={}: for s in S do if nops(CCs(s))=k then C:=C union {s}: fi: od: C: end: NuKcomponentsGraphs:=proc(N,K) local n1: [seq( nops(AllKcomponentsGraphs(n1,K)),n1=1..N)]: end: NuKcomponentsGraphs(5, 2) = [0, 1, 3, 19, 230] = A323875 NuKcomponentsGraphs(5, 3) = [0, 0, 1, 6, 55] = A323876 2. AveNuCC:=proc(n,K,M) local i,ans: ans:=0; for i from 1 to M do ans:=ans + nops(CCs(RandGr(n,K))): od: evalf(ans/M): end: AveNuCC(30,50,1000) = 1.841000000 1.824000000 1.782000000 1.794000000 1.753000000 1.838000000 At M=1000, the averages vary. At around M=10000, the numbers are closer with usually less than a .1 difference (1.801000000, 1.810500000, 1.808900000,...). 3. EstimateCutOff:=proc(n,M) local i,j,max,ans: max:=binomial(n,2): for i from 1 to max do: ans:=0: for j from 1 to M do ans:=ans + nops(CCs(RandGr(n,i))): od: if evalf(ans/1000) < 1.05 then i: break: end if: od: end: