ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 14 Jul 2016 18:45:51 +0200connected graphshttps://ask.sagemath.org/question/34079/connected-graphs/ How to list all the nonishomorphic connected graphs with 9 vertices?Wed, 13 Jul 2016 18:46:18 +0200https://ask.sagemath.org/question/34079/connected-graphs/Answer by kcrisman for <p>How to list all the nonishomorphic connected graphs with 9 vertices?</p>
https://ask.sagemath.org/question/34079/connected-graphs/?answer=34080#post-id-34080You may find [this link](http://doc.sagemath.org/html/en/reference/graphs/sage/graphs/graph_generators.html#sage.graphs.graph_generators.GraphGenerators) helpful. Though perhaps connectedness isn't heritable, so be warned:
> Remember that the property argument does not behave as a filter, except for appropriately inheritable properties:
Still, on that page you should find a syntax that helps you.Wed, 13 Jul 2016 20:00:19 +0200https://ask.sagemath.org/question/34079/connected-graphs/?answer=34080#post-id-34080Answer by slelievre for <p>How to list all the nonishomorphic connected graphs with 9 vertices?</p>
https://ask.sagemath.org/question/34079/connected-graphs/?answer=34084#post-id-34084Following the link given by @kcrisman you learn about `nauty_geng`.
sage: gen = graphs.nauty_geng("9 -c")
sage: sum(1 for g in gen)
261080
Thu, 14 Jul 2016 12:29:36 +0200https://ask.sagemath.org/question/34079/connected-graphs/?answer=34084#post-id-34084Comment by tmonteil for <p>Following the link given by <a href="/users/41/kcrisman/">@kcrisman</a> you learn about <code>nauty_geng</code>.</p>
<pre><code>sage: gen = graphs.nauty_geng("9 -c")
sage: sum(1 for g in gen)
261080
</code></pre>
https://ask.sagemath.org/question/34079/connected-graphs/?comment=34092#post-id-34092Moreover it is very fast !Thu, 14 Jul 2016 18:45:51 +0200https://ask.sagemath.org/question/34079/connected-graphs/?comment=34092#post-id-34092