PaddedGraphNeighborhoodVolumes[graph_?GraphQ,verts_:All]:=Module{vertices=verts,rmax=Infinity},​​Switch[vertices,​​All,vertices=VertexList[graph],​​"Random"n_Integer,vertices=RandomSample[VertexList[graph],UpTo[Last[vertices]]]];​​Withres=AssociationParallelMapModule​​ vertexCounter=0,​​ lastDistance=-1,​​ #AppendIf[#==={},#,Rest[First[#]]]&@Reap[Catch[BreadthFirstScan[​​ graph,​​ #,​​ "DiscoverVertex"​​If[#3>rmax,Throw[0,"rmax"]];​​If[#3>lastDistance,​​lastDistance=#3;​​Sow[vertexCounter]];​​ vertexCounter++&],"rmax"]]2,vertexCounter&,vertices,​​With[{max=Max[Length/@res]},PadRight[#,max,Last[#]]&/@res]/;ListQ[vertices]
In[]:=
(*ForStephentorun-~10%samplesize,5samples*)
leanresults=Values[PaddedGraphNeighborhoodVolumes[theoremgraph,"Random"100]]
In[]:=
ListLinePlot[MeanAround/@Transpose[%380]]
In[]:=
Out[]=
uleanresults=Values[PaddedGraphNeighborhoodVolumes[UndirectedGraph[theoremgraph],"Random"100]];
In[]:=
ListLinePlot[MeanAround/@Transpose[%]]
ParallelTable[ListLinePlot[ResourceFunction["LogDifferences"][MeanAround/@Transpose[Values[PaddedGraphNeighborhoodVolumes[theoremgraph,"Random"3500]]]]],{5}]
ParallelTable[ListLinePlot[ResourceFunction["LogDifferences"][MeanAround/@Transpose[Values[PaddedGraphNeighborhoodVolumes[metamathGraph,"Random"3500]]]]],{5}]