Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You can use the following function to test if a graph is complete bipartite:

def is_complete_bipartite(p):
    return p.is_bipartite() and p.num_edges() == mul(map(len, p.bipartite_sets()))

Then, you can do

dd = filter(is_complete_bipartite, d)

to get your list of complete bipartites.