In[]:=
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]]]];Withres=AssociationParallelMapModule vertexCounter=0, lastDistance=-1, #AppendIf[#==={},#,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]
(*ForStephentorun-~10%samplesize,5samples*)
In[]:=
leanresults=Values[PaddedGraphNeighborhoodVolumes[theoremgraph,"Random"100]]
In[]:=
ListLinePlot[MeanAround/@Transpose[%380]]
Out[]=
In[]:=
uleanresults=Values[PaddedGraphNeighborhoodVolumes[UndirectedGraph[theoremgraph],"Random"100]];
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}]