Re: [sage-support] How to efficiently generate all graph isomorphism classes of a given size?

2023-01-31 Thread Shiyue Li
Thank you. Do you know what is an efficient way of getting these non-isomorphic graphs with n edges? Using your answer. I can use nauty_geng(2 * n), and then filter out all the graphs with n edges. But even going through nauty_geng(2*n) is more memory and spaces needed. On Tuesday, January 3

Re: [sage-support] How to efficiently generate all graph isomorphism classes of a given size?

2023-01-31 Thread Dima Pasechnik
On Tue, Jan 31, 2023 at 2:38 AM Shiyue Li wrote: > > Hi all, > > I am hoping to generate a list of all graph isomorphism classes of a given > size. The current code that I have first generate all the graphs on 2n, and > then take all the isomorphism class representatives of size n. But the first

Re: [sage-support] How to efficiently generate all graph isomorphism classes of a given size?

2023-01-31 Thread David Joyner
Since all the graphs you are counting are disconnected, my guess is that there is a combinatorial argument to determine their number, say L_n, in terms of the number of connected ones. Assuming you know the number of connected graphs on k vertices with n edges (where k<=n+1), call it M_{k,n}, my gu