TransWikia.com

Bijective coding of general graphs (like Prüfer code but not for trees)

Mathematics Asked by alagris on January 24, 2021

I’am trying to find some way to effectively enumerate all possible graphs without repetition. I know there are Prüfer codes for trees, but what about other graphs? And if there is some coding, are there also codings for directed graphs or multigraphs? It would be ideal if all isomorphic graphs had the same code.

One Answer

As pointed out by @EthanBolker, the problem of describing all graphs upto isomorphism is not even known to be NP-hard. But, in case you want to just enumerate the number of graphs of order $n$, then as the graphs are nothing but binary non-reflexive, symmetric relations on a set of $n$ elements, their number is $2^{frac{n(n-1)}{2}}$. As for directed graphs, since these needd not be symmetric, therefore, we have their number of $n$ vertices equals $2^{n(n-1)}$. Also see here

Correct answer by vidyarthi on January 24, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP