How do I generate list of connected graphs with given number of vertices?
I have used this short nauty program to generate graphs with given number of vertices, edges and degree information. c =0 for G in graphs . nauty_geng (’9 12 -d4D4 ’) : c = c +1 print " graph "+str( c ) +" ( graph6 string ’"+ G . graph6_string () +" ’):" G . adjacency_matrix () G . show () print "" print ""
It generates a list of all graph with given information. My query is that How do I filter them to get only connected ones?