graphs of order n
How to generate all the graphs of particular order n in sage?
is it possible to do the same up to isomorphism at least for small n?
Thank you.
How to generate all the graphs of particular order n in sage?
is it possible to do the same up to isomorphism at least for small n?
Thank you.
The documentation is at
and especially
In particular the following generators exist:
sage: graphs(5)
<generator object GraphGenerators.__call__ at 0x...>
sage: graphs.nauty_geng("5")
<generator object GraphGenerators.nauty_geng at 0x...>
sage: graphs.nauty_geng("5 -c")
<generator object GraphGenerators.nauty_geng at 0x...>
and there are many more options to nauty's geng.
Thank you. one doubt. graphs(5) gives the list of graphs up to isomorphism?
The documentation can be accessed with ?
:
sage: graphs?
and it says this generator produces one representative for each isomorphism class.
To get "all graphs", run through all subsets of the set of unordered pairs of integers among the first n integers and construct the corresponding graphs.
Asked: 5 years ago
Seen: 712 times
Last updated: Aug 03 '19