Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Nauty contains a program to let you enumerate such things (it is called nauty-genbg) but in Sage this feature is exposed through the method "hypergraphs.nauty" [1], which enumerates all hypergraph with a given number of vertices/edges. You can then obtain your bipartite graphs from a hypergraph H by calling H.incidence_graph [2].

[1] http://www.sagemath.org/doc/reference/graphs/sage/graphs/hypergraph_generators.html [2] http://www.sagemath.org/doc/reference/graphs/sage/combinat/designs/incidence_structures.html#sage.combinat.designs.incidence_structures.IncidenceStructure.incidence_graph