Skip to main content
10 events
when toggle format what by license comment
Jun 8 at 22:25 vote accept JYB
Jun 7 at 5:38 answer added JYB timeline score: 3
Jun 6 at 20:14 comment added JYB @Szabolcs I don't think I necessarily need labelled graphs. I will try looking through your previous answers and working with nauty, and then I will see how that works out for me. Thank you!
Jun 6 at 8:52 comment added Szabolcs @A.Kato It's not possible to generate all graphs this way. If you want labelled graphs, starting with unlabelled trees is not going to work. If you want unlabelled graphs, adding edges to trees will create isomorphic duplicates. There is no need to try to come up with such hacks when there are excellent tools that get the job done (nauty).
Jun 6 at 8:32 comment added A. Kato You can get all trees on $n$ unlabeled nodes by 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.
Jun 6 at 8:24 comment added Szabolcs Do you want labelled graphs (as in the question you linked to)? If so, there's probably too many of these. Or do you want unlabelled ones? In that case use nauty, 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.
Jun 6 at 6:02 comment added Kiro The number of such graphs is given here, for N=9 it's only 261080, this should be manageable. The code in the linked answer is brute force, generating a significantly larger number of graphs and then filtering, which is where the problem lies. Unfortunately I don't know how to generate just the graphs you are looking for, but maybe the link is helpful.
Jun 6 at 5:33 history edited JYB CC BY-SA 4.0
added 100 characters in body
S Jun 6 at 5:23 review First questions
Jun 6 at 5:53
S Jun 6 at 5:23 history asked JYB CC BY-SA 4.0