How can I count the number of ways to connect a graph with $X$ vertices and $Y$ edges?

591 Views Asked by At

If I have a graph with $X$ vertices, and $Y$ edges, where $Y$ is between $X-1$ and $(X(X-1))/2$, how can I count the number of unique ways to connect the graph (strictly no more than two paths between the two same points)?

1

There are 1 best solutions below

2
On

Looks like we're doing the same challenge ;). So far the best resource I found on this topic is http://oeis.org/A062734 but I'm not sure that the formula/mathematica expression is still valid for n=20 and I have not yet translated it to python. I plan to consult the referenced books, maybe tomorrow.