I am using the code provided in the answer for this other question. It is shown below:
allEdges[n_]:=Flatten[Table[UndirectedEdge[i,j],{i,1,n},{j,i+1,n}]]; allConnected[n_]:=Select[Map[Graph[Range[n],#,VertexLabels->Automatic]&, Subsets[allEdges[n]]],ConnectedGraphQ]; allConnectedUpToIso[n_]:=DeleteDuplicates[allConnected[n],IsomorphicGraphQ]; However, I am trying to do n = 9 for 9 nodes, and Mathematica is telling me I don't have enough RAM to compute it (closing all applications and restarting my computer didn't help). I was able to complete 6 notes/n = 6. Is there a way to have it generate only a limited number of graphs for n = 9 rather than all of them, so I can actually run the program? Thank you.
Edit: Or, if there's a fix to make it not use so much memory, that would be greatly appreciated.
Import["! geng -c 9", "Graph6"], or with IGraph/M (faster and more supported import formats)IGImport["! geng -c 9", "Nauty"]. Search for my answers that utilize nauty / geng on this site. $\endgroup$Graph[GraphData[#, "Graph"], VertexLabels -> "Name"] & /@ GraphData["Tree", n]. (There are 47 trees on 9 nodes.) Then you can add as many edges as you want. $\endgroup$