[Math] Number of connected / disconnected / total graphs with V vertices of degree d or d – 1

combinatoricsgraph theoryprobability

I've been at this for a couple of days now and I guess I just can't find a decent bijection to combinatorics for this.

In the end what I really need is the probability of the graph to be connected / disconnected, but any 2 of the 3 numbers will get me that.

  • How many undirected graphs exist for a given a number of vertices $v$ and a degree $d$ if self-connections are allowed (but are discarded and not taken into account for equality purposes, so technically the degree ends up being $d$ or $d-1$ for all vertices in the graph)?
  • How many of these graphs are connected or disconnected?

I've been going at this with sieving. What I've got is that for any given $d$, there obviously exist graphs with $[\lceil\frac{v(d – 1)}{2}\rceil; vd]$ edges — since two nodes can sample "overlapping" connections. Given that a $v$-vertex graph has $\frac{v(v-1)}{2}$ edge "slots", for each particular number of edges there obviously are $\binom{\frac{v(v-1)}{2}}{e}$ unique graphs. What I find particularly troublesome is sieving out the unneeded graphs. The $d$ parameter limits the lower (and upper) bound of every vertex's degree, i.e., for $v = 5,\, d = 2$ if we want all graphs with 5 edges, we take all graphs $\binom{10}{5}$ and sieve out the ones that contain a vertex with degree $0$ (the answer is 222, btw). This case is easy. I don't get how to sieve out graphs with one or more vertices of degree $1$.
If I manage this sieving, then I can obviously find the total number of graphs by just summing the values for each particular number of edges.

The other part of the question about how to find the number of those graphs that are disconnected I don't even know where or how to begin.

The practical purpose that this came from is this: I have a large set of input data and a distance function that I can calculate for every two of the items. The distance function is expensive to calculate, but the distance property is strongly transitive. Calculating the full adjacency matrix is impossible and I'd like to minimize the number of distance calculations but still get a connected graph with some high enough probability. The amount of data is large enough to force parallelization, so each node would calculate a constant number of distances to randomly selected other nodes independently.

Best Answer

Presumably the problem shouldn't get harder if we drop the possibility to have degree $d-1$ and just try to count the $d$-regular graphs on $v$ labeled vertices. The answers to this MO question say that no closed form is known for this, so I doubt you'll find one for your problem. They do give asymptotic results and potentially useful references, though. You might also want to take a look at the MathWorld article on regular graphs.

Regarding connected and disconnected graphs, note that quite generally whenever a property of graphs is such that a graph has the property if and only if all its connected components have the property, then the exponential generating functions $g(x)$ for the number of graphs with the property and $c(x)$ for the number of non-empty connected graphs with the property are related by $g(x) = \exp(c(x))$. Thus, if you can determine $g(x)$, which will generally be easier than determining $c(x)$ directly, you can get $c(x)$ as $\log g(x)$.