Software to generate graphs with specific properties.

combinatoricsgraph theorymath-softwareprogrammingreference-request

Does anyone know if there is any software that can generate graphs and compute their chromatic polynomials?

For example, say I want to generate all simple graphs on 8 vertices with 16 edges with clique number 5 and have their chromatic polynomials computed (or at least know the specific number of proper $\lambda$-colorings for a specific $\lambda$). Is this possible?

Thank you in advance.

Best Answer

Actually it will be better to use sage. I had to wait a minute for sage to generate the 1312 graphs with 8 vertices and 16 edges, but it took no time to filter out the 94 graphs with clique number 5, and no time to compute the chromatic polynomials.

The program geng in the nauty package would generate the graphs much more quickly. But you still have to determine clique numbers and chromatic polynomials and I don't think this is part of nauty's skill set - it didn't use to be, but I haven't checked for a while.

Once you're looking at graphs on more than 8 vertices, it would be much better to produce them using geng and then read them into sage. [And it would even better to follow Gordon Royle’s comment!]